Hello,

Now we have autoconf 2.65, I have worked on porting python 2.7.1 (theorically 
the last version of Python 2.x).

Attached 3 files :
- unified diff for Makefile, Makefile.inc and python.port.mk
- port python 2.7.1
- patch math/py-numpy to build with python 2.7.1

To know :
- there is no python-mode.el included in python 2.7.1 tarball (upstream)

Also, I need help concerning regress tests :
- 2 tests block the rest of the regress tests : test_io and test_socket (to 
continue other tests, you can delete these files manually after make 
extract...). This part must be improved.

I have tests few ports with this version, now I think we need more tests. I 
only tested on amd64.

Thanks for your help, it would be nice to have python 2.7.1 in ports.

Regards,

Remi.
Index: Makefile
===================================================================
RCS file: /cvs/openbsd/ports/math/py-numpy/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile    22 Nov 2010 09:30:38 -0000      1.29
+++ Makefile    10 Apr 2011 12:51:40 -0000
@@ -5,7 +5,7 @@ COMMENT=                fast array and numeric program
 MODPY_EGG_VERSION=     1.3.0
 DISTNAME=              numpy-${MODPY_EGG_VERSION}
 PKGNAME=               py-${DISTNAME}
-REVISION =             6
+REVISION =             7
 CATEGORIES=            math devel
 
 HOMEPAGE=              http://numpy.scipy.org/
Index: patches/patch-numpy_distutils_ccompiler_py
===================================================================
RCS file: patches/patch-numpy_distutils_ccompiler_py
diff -N patches/patch-numpy_distutils_ccompiler_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-numpy_distutils_ccompiler_py  10 Apr 2011 12:51:40 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+# Source :  http://projects.scipy.org/numpy/changeset/8260
+--- numpy/distutils/ccompiler.py.orig  Sun Mar 29 13:24:21 2009
++++ numpy/distutils/ccompiler.py       Sun Apr 10 08:50:35 2011
+@@ -2,9 +2,11 @@
+ import os
+ import sys
+ import new
++from copy import copy
+ 
+ from distutils.ccompiler import *
+ from distutils import ccompiler
++from distutils.errors import DistutilsExecError, DistutilsModuleError, 
DistutilsPlatformError
+ from distutils.sysconfig import customize_compiler
+ from distutils.version import LooseVersion
+ 
Index: Makefile
===================================================================
RCS file: /cvs/openbsd/ports/lang/python/Makefile,v
retrieving revision 1.56
diff -u -p -r1.56 Makefile
--- Makefile    1 Feb 2010 17:00:13 -0000       1.56
+++ Makefile    10 Apr 2011 12:24:42 -0000
@@ -4,6 +4,7 @@ SUBDIR =
 SUBDIR +=      2.4
 SUBDIR +=      2.5
 SUBDIR +=      2.6
+SUBDIR +=      2.7
 
 .include <bsd.port.subdir.mk>
 
Index: Makefile.inc
===================================================================
RCS file: /cvs/openbsd/ports/lang/python/Makefile.inc,v
retrieving revision 1.73
diff -u -p -r1.73 Makefile.inc
--- Makefile.inc        26 Nov 2010 14:50:10 -0000      1.73
+++ Makefile.inc        10 Apr 2011 12:24:42 -0000
@@ -44,7 +44,7 @@ MULTI_PACKAGES=       -main -tests -tools -gdb
 
 # Python 2.6 lists BSD db 4.6.x as unstable on most architectures (see
 # setup.py:allow_db_version). XXX revisit if databases/db/v4 is updated to 4.7
-.if ${VERSION} == "2.6"
+.if ${VERSION} == "2.6" || ${VERSION} == "2.7"
 ONLY_FOR_ARCHS-bsddb=  amd64 i386
 .endif
 
@@ -57,7 +57,7 @@ LIB_DEPENDS-main =    archivers/bzip2
 RUN_DEPENDS-main =
 WANTLIB-main =         ssl panelw m crypto c util z readline pthread \
                        ncursesw stdc++ expat ossaudio bz2
-.if ${VERSION} == "2.5" || ${VERSION} == "2.6"
+.if ${VERSION} == "2.5" || ${VERSION} == "2.6" || ${VERSION} == "2.7"
 LIB_DEPENDS-main +=    databases/sqlite3
 WANTLIB-main +=                sqlite3
 .endif
@@ -83,12 +83,12 @@ PKG_ARGS+=  -Dmm=1
 
 # XXX fix ctypes on powerpc for python2.6
 # The ctypes module is not supported on all platforms (in particular, ARM)
-.if ${VERSION} == "2.5" || ${VERSION} == "2.6"
+.if ${VERSION} == "2.5" || ${VERSION} == "2.6" || ${VERSION} == "2.7"
 .  if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || \
       ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" || \
       ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "m68k" || \
       ${MACHINE_ARCH:Mmips64*} || \
-      ( ${MACHINE_ARCH} == "powerpc" && ${VERSION} != "2.6" )
+      ( ${MACHINE_ARCH} == "powerpc" && ( ${VERSION} != "2.6" && ${VERSION} != 
"2.7" )
 PKG_ARGS+=     -Dctypes=1
 .  else
 PKG_ARGS+=     -Dctypes=0
@@ -97,7 +97,7 @@ PKG_ARGS+=    -Dctypes=0
 
 USE_GROFF =    Yes
 
-AUTOCONF_VERSION?=     2.61
+AUTOCONF_VERSION?=     2.65
 CONFIGURE_STYLE=       autoconf
 CONFIGURE_ARGS+=       ${CONFIGURE_SHARED}
 # --srcdir is needed for systrace to work correctly
Index: python.port.mk
===================================================================
RCS file: /cvs/openbsd/ports/lang/python/python.port.mk,v
retrieving revision 1.40
diff -u -p -r1.40 python.port.mk
--- python.port.mk      17 Nov 2010 08:05:18 -0000      1.40
+++ python.port.mk      10 Apr 2011 12:24:42 -0000
@@ -7,13 +7,15 @@ SHARED_ONLY=          Yes
 
 CATEGORIES+=           lang/python
 
-MODPY_VERSION?=                2.6
+MODPY_VERSION?=                2.7
 .if ${MODPY_VERSION} == 2.4
 MODPY_VSPEC = >=${MODPY_VERSION},<2.5
 .elif ${MODPY_VERSION} == 2.5
 MODPY_VSPEC = >=${MODPY_VERSION},<2.6
 .elif ${MODPY_VERSION} == 2.6
 MODPY_VSPEC = >=${MODPY_VERSION},<2.7
+.elif ${MODPY_VERSION} == 2.7
+MODPY_VSPEC = >=${MODPY_VERSION},<2.8
 .endif
 MODPYSPEC = python-${MODPY_VSPEC}
 

Attachment: python-2.7.1.tar.gz
Description: Binary data

Reply via email to