HEADS UP: system python changed to 2.7

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

HEADS UP: system python changed to 2.7

Remi Pointel
Hello,

As you may have noticed the default python version has changed
to 2.7. Please note:

- if you have currently installed ports that use python, you will
need to upgrade them before installing new ports using python.
if you have a mixture of old+new you will have problems finding
libraries.

The simplest way to handle this is to use package snapshots
and make sure you run pkg_add -ui before adding anything new.
If a snapshot contains scapy-2.1.0p0.tgz then it was built
with python 2.7.

- IF YOU BUILD THINGS FROM PORTS THEN CVS UP THE WHOLE TREE.

- if you have created a symlink from /usr/local/bin/python to
python2.6, you will almost certainly want to switch it to
python2.7, again in order that libraries can be found.
(packages should always explicitly use the path to the version
of python they were built against; this symlink is a convenience
some of you might use for things outside of packages).

- test! test! test!

several of us have been running with 2.7 as the default python
version for a long time and have experienced no problems, but
we can't test everything. unlike the switch from 2.5 to 2.6
we don't really expect any incompatibility, but if you rely
on something that uses python, then please upgrade when
possible and check for problems.

Thanks to all people who worked with me on this version.

Remi.

Reply | Threaded
Open this post in threaded view
|

Re: HEADS UP: system python changed to 2.7

Samir SAADA
Hi,
with this patch I can compile pyhton 2.7 on loongson,
the same modifications are used in devel/libffi,
I don't know if there are side effects on ctypes though.

Samir.


regress test "ok":
test_ctypes
/usr/obj/pobj/Python-2.7.1/Python-2.7.1/Lib/ctypes/util.py:180: DeprecationWarning: the cmp argument is not supported in 3.x
  res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y)))
*** Signal 10


Index: lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h
===================================================================
RCS file: lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h
diff -N lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h 13 Jun 2011 16:58:06 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+--- Modules/_ctypes/libffi/src/mips/ffitarget.h.orig Mon Jun 13 14:31:24 2011
++++ Modules/_ctypes/libffi/src/mips/ffitarget.h Mon Jun 13 14:36:33 2011
+@@ -27,10 +27,12 @@
+ #ifndef LIBFFI_TARGET_H
+ #define LIBFFI_TARGET_H
+
+-#ifdef linux
+-# include <asm/sgidefs.h>
+-#else
+-# include <sgidefs.h>
++#if !defined(__OpenBSD__)
++#  ifdef linux
++#    include <asm/sgidefs.h>
++#  else
++#    include <sgidefs.h>
++#  endif
+ #endif
+ #  ifndef _ABIN32
+ #    define _ABIN32 _MIPS_SIM_NABI32

Reply | Threaded
Open this post in threaded view
|

Re: HEADS UP: system python changed to 2.7

Samir SAADA
On Mon, Jun 13, 2011 at 07:27:07PM +0200, Samir SAADA wrote:

> Hi,
> with this patch I can compile pyhton 2.7 on loongson,
> the same modifications are used in devel/libffi,
> I don't know if there are side effects on ctypes though.
>
> regress test "ok":
> test_ctypes
> /usr/obj/pobj/Python-2.7.1/Python-2.7.1/Lib/ctypes/util.py:180: DeprecationWarning: the cmp argument is not supported in 3.x
>   res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y)))
> *** Signal 10

woops I missed this one regress test:

test test_cmath failed -- Traceback (most recent call last):
  File "/usr/obj/pobj/Python-2.7.1/Python-2.7.1/Lib/test/test_cmath.py", line 350, in test_specific_values
    msg=error_message)
  File "/usr/obj/pobj/Python-2.7.1/Python-2.7.1/Lib/test/test_cmath.py", line 112, in rAssertAlmostEqual
    '{!r} and {!r} are not sufficiently close'.format(a, b))
AssertionError: log0010: log(complex(-1e-323, 0.0))
Expected: complex(-743.7469247408213, 3.141592653589793)
Received: complex(inf, 3.141592653589793)
Received value insufficiently close to expected value.

Reply | Threaded
Open this post in threaded view
|

Re: HEADS UP: system python changed to 2.7

Jasper Lievisse Adriaanse-2
In reply to this post by Samir SAADA
On Mon, Jun 13, 2011 at 07:27:07PM +0200, Samir SAADA wrote:

> Hi,
> with this patch I can compile pyhton 2.7 on loongson,
> the same modifications are used in devel/libffi,
> I don't know if there are side effects on ctypes though.
>
> Samir.
>
>
> regress test "ok":
> test_ctypes
> /usr/obj/pobj/Python-2.7.1/Python-2.7.1/Lib/ctypes/util.py:180: DeprecationWarning: the cmp argument is not supported in 3.x
>   res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y)))
> *** Signal 10
>
>
> Index: lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h
> ===================================================================
> RCS file: lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h
> diff -N lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/python/2.7/patches/patch-Modules__ctypes_libffi_src_mips_ffitarget_h 13 Jun 2011 16:58:06 -0000
> @@ -0,0 +1,20 @@
> +$OpenBSD$
> +--- Modules/_ctypes/libffi/src/mips/ffitarget.h.orig Mon Jun 13 14:31:24 2011
> ++++ Modules/_ctypes/libffi/src/mips/ffitarget.h Mon Jun 13 14:36:33 2011
> +@@ -27,10 +27,12 @@
> + #ifndef LIBFFI_TARGET_H
> + #define LIBFFI_TARGET_H
> +
> +-#ifdef linux
> +-# include <asm/sgidefs.h>
> +-#else
> +-# include <sgidefs.h>
> ++#if !defined(__OpenBSD__)
> ++#  ifdef linux
> ++#    include <asm/sgidefs.h>
> ++#  else
> ++#    include <sgidefs.h>
> ++#  endif
> + #endif
> + #  ifndef _ABIN32
> + #    define _ABIN32 _MIPS_SIM_NABI32
>

This diff is correct, though I really wonder I built python 2.7 earlier on my loongson..

--
Cheers,
Jasper

"Capable, generous men do not create victims, they nurture them."