tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

python31 for pkgsrc



I have python31 in pkgsrc-wip. patch-ab needs to fixed.

Here is a patch for lang/python which I used so I could install 
py31-readline (it worked for me). Testers would be appreciated. I tested 
like:

(already had python31 installed from wip/python31)
cd devel/py-readline
make PYTHON_VERSION_DEFAULT=31 install
(then used a tool that used that readline extension)

(It may be useful to have a python metapackage to install many py 
packages. Any thoughts on that?)

Index: lang/python/egg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python/egg.mk,v
retrieving revision 1.9
diff -u -r1.9 egg.mk
--- lang/python/egg.mk  19 Apr 2009 14:48:17 -0000      1.9
+++ lang/python/egg.mk  3 Nov 2009 19:53:17 -0000
@@ -9,7 +9,7 @@
 PYDISTUTILSPKG=        yes
 PY_PATCHPLIST= yes
 # Only Python 2.4+ supported by devel/py-setuptools right now
-PYTHON_VERSIONS_ACCEPTED?=     26 25 24
+PYTHON_VERSIONS_ACCEPTED?=     31 26 25 24
 
 PLIST_SUBST+=  EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX}
 PLIST_SUBST+=  EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
Index: lang/python/pyversion.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python/pyversion.mk,v
retrieving revision 1.77
diff -u -r1.77 pyversion.mk
--- lang/python/pyversion.mk    25 Sep 2009 13:42:26 -0000      1.77
+++ lang/python/pyversion.mk    3 Nov 2009 19:53:17 -0000
@@ -8,7 +8,7 @@
 # PYTHON_VERSION_DEFAULT
 #      The preferred Python version to use.
 #
-#      Possible values: 24 25 26
+#      Possible values: 24 25 26 31
 #      Default: 25
 #
 # === Package-settable variables ===
@@ -18,13 +18,13 @@
 #      order of the entries matters, since earlier entries are
 #      preferred over later ones.
 #
-#      Possible values: 26 25 24
-#      Default: 26 25 24
+#      Possible values: 31 26 25 24
+#      Default: 31 26 25 24
 #
 # PYTHON_VERSIONS_INCOMPATIBLE
 #      The Python versions that are NOT acceptable for the package.
 #
-#      Possible values: 24 25 26
+#      Possible values: 24 25 26 31
 #      Default: (depends on the platform)
 #
 # PYTHON_FOR_BUILD_ONLY
@@ -73,12 +73,13 @@
 .else
 PYTHON_VERSION_DEFAULT?=               26
 .endif
-PYTHON_VERSIONS_ACCEPTED?=             26 25 24
+PYTHON_VERSIONS_ACCEPTED?=             31 26 25 24
 PYTHON_VERSIONS_INCOMPATIBLE?=         # empty by default
 
 BUILDLINK_API_DEPENDS.python24?=               python24>=2.4
 BUILDLINK_API_DEPENDS.python25?=               python25>=2.5.1
 BUILDLINK_API_DEPENDS.python26?=               python26>=2.6
+BUILDLINK_API_DEPENDS.python31?=               python31>=3.1
 
 # transform the list into individual variables
 .for pv in ${PYTHON_VERSIONS_ACCEPTED}
@@ -120,7 +121,13 @@
 _PYTHON_VERSION=       none
 .endif
 
-.if ${_PYTHON_VERSION} == "26"
+.if ${_PYTHON_VERSION} == "31"
+PYPKGSRCDIR=   ../../wip/python31
+PYDEPENDENCY=  ${BUILDLINK_API_DEPENDS.python26}:${PYPKGSRCDIR}
+PYPACKAGE=     python31
+PYVERSSUFFIX=  3.1
+PYPKGPREFIX=   py31
+.elif ${_PYTHON_VERSION} == "26"
 PYPKGSRCDIR=   ../../lang/python26
 PYDEPENDENCY=  ${BUILDLINK_API_DEPENDS.python26}:${PYPKGSRCDIR}
 PYPACKAGE=     python26
@@ -160,11 +167,11 @@
 
 .if exists(${PYTHONBIN})
 PYINC!=        ${PYTHONBIN} -c "import distutils.sysconfig; \
-       print distutils.sysconfig.get_python_inc(0, \"\")" || ${ECHO} ""
+       print(distutils.sysconfig.get_python_inc(0, \"\"))" || ${ECHO} ""
 PYLIB!=        ${PYTHONBIN} -c "import distutils.sysconfig; \
-       print distutils.sysconfig.get_python_lib(0, 1, \"\")" || ${ECHO} ""
+       print(distutils.sysconfig.get_python_lib(0, 1, \"\"))" || ${ECHO} ""
 PYSITELIB!=    ${PYTHONBIN} -c "import distutils.sysconfig; \
-       print distutils.sysconfig.get_python_lib(0, 0, \"\")" || ${ECHO} ""
+       print(distutils.sysconfig.get_python_lib(0, 0, \"\"))" || ${ECHO} ""
 
 PRINT_PLIST_AWK+=      /^${PYINC:S|/|\\/|g}/ \
                        { gsub(/${PYINC:S|/|\\/|g}/, "$${PYINC}"); \
Index: lang/python/srcdist.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python/srcdist.mk,v
retrieving revision 1.30
diff -u -r1.30 srcdist.mk
--- lang/python/srcdist.mk      3 Nov 2009 02:21:05 -0000       1.30
+++ lang/python/srcdist.mk      3 Nov 2009 19:53:17 -0000
@@ -2,7 +2,17 @@
 
 .include "../../lang/python/pyversion.mk"
 
-.if ${_PYTHON_VERSION} == "26"
+.if ${_PYTHON_VERSION} == "31"
+
+DISTNAME=      Python-3.1.1
+EXTRACT_SUFX=  .tar.bz2
+DISTINFO_FILE= ${.CURDIR}/../../wip/python31/distinfo
+PATCHDIR=      ${.CURDIR}/../../wip/python31/patches
+PYSUBDIR=      Python-3.1.1
+WRKSRC=                ${WRKDIR}/${PYSUBDIR}
+MASTER_SITES=  ftp://ftp.python.org/pub/python/3.1/
+
+.elif ${_PYTHON_VERSION} == "26"
 
 DISTNAME=      Python-2.6.4
 EXTRACT_SUFX=  .tar.bz2


Home | Main Index | Thread Index | Old Index