Sun May 6 13:18:30 2012 UTC ()
Add python32 support.


(obache)
diff -r1.98 -r1.99 pkgsrc/lang/python/pyversion.mk

cvs diff -r1.98 -r1.99 pkgsrc/lang/python/pyversion.mk (expand / switch to unified diff)

--- pkgsrc/lang/python/pyversion.mk 2012/04/08 20:17:10 1.98
+++ pkgsrc/lang/python/pyversion.mk 2012/05/06 13:18:30 1.99
@@ -1,48 +1,48 @@ @@ -1,48 +1,48 @@
1# $NetBSD: pyversion.mk,v 1.98 2012/04/08 20:17:10 wiz Exp $ 1# $NetBSD: pyversion.mk,v 1.99 2012/05/06 13:18:30 obache Exp $
2 2
3# This file determines which Python version is used as a dependency for 3# This file determines which Python version is used as a dependency for
4# a package. 4# a package.
5# 5#
6# === User-settable variables === 6# === User-settable variables ===
7# 7#
8# PYTHON_VERSION_DEFAULT 8# PYTHON_VERSION_DEFAULT
9# The preferred Python version to use. 9# The preferred Python version to use.
10# 10#
11# Possible values: 25 26 27 31 11# Possible values: 25 26 27 31 32
12# Default: 27 12# Default: 27
13# 13#
14# === Package-settable variables === 14# === Package-settable variables ===
15# 15#
16# PYTHON_VERSIONS_ACCEPTED 16# PYTHON_VERSIONS_ACCEPTED
17# The Python versions that are acceptable for the package. The 17# The Python versions that are acceptable for the package. The
18# order of the entries matters, since earlier entries are 18# order of the entries matters, since earlier entries are
19# preferred over later ones. 19# preferred over later ones.
20# 20#
21# Possible values: 31 27 26 25 21# Possible values: 32 31 27 26 25
22# Default: (31) 27 26 25 22# Default: (32 31) 27 26 25
23# 23#
24# PYTHON_VERSIONS_INCLUDE_3X 24# PYTHON_VERSIONS_INCLUDE_3X
25# Wether the default PYTHON_VERSIONS_ACCEPTED should include 25# Wether the default PYTHON_VERSIONS_ACCEPTED should include
26# 3.x versions for for this package or not. 26# 3.x versions for for this package or not.
27# This variable must be set before including bsd.prefs.mk. 27# This variable must be set before including bsd.prefs.mk.
28# 28#
29# Possible values: yes no 29# Possible values: yes no
30# Default: no 30# Default: no
31# 31#
32# PYTHON_VERSIONS_INCOMPATIBLE 32# PYTHON_VERSIONS_INCOMPATIBLE
33# The Python versions that are NOT acceptable for the package. 33# The Python versions that are NOT acceptable for the package.
34# 34#
35# Possible values: 25 26 27 31 35# Possible values: 25 26 27 31 32
36# Default: (depends on the platform) 36# Default: (depends on the platform)
37# 37#
38# PYTHON_FOR_BUILD_ONLY 38# PYTHON_FOR_BUILD_ONLY
39# Whether Python is needed only at build time or at run time. 39# Whether Python is needed only at build time or at run time.
40# 40#
41# Possible values: (defined) (undefined) 41# Possible values: (defined) (undefined)
42# Default: (undefined) 42# Default: (undefined)
43# 43#
44# === Defined variables === 44# === Defined variables ===
45# 45#
46# PYPKGPREFIX 46# PYPKGPREFIX
47# The prefix to use in PKGNAME for extensions which are meant 47# The prefix to use in PKGNAME for extensions which are meant
48# to be installed for multiple Python versions. 48# to be installed for multiple Python versions.
@@ -68,36 +68,37 @@ PYTHON_PYVERSION_MK= defined @@ -68,36 +68,37 @@ PYTHON_PYVERSION_MK= defined
68PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)py([0-9][0-9])-.*/\2/} 68PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
69.elif defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:Mpy[0-9][0-9]-*) || \ 69.elif defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:Mpy[0-9][0-9]-*) || \
70 defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:M*-py[0-9][0-9]-*) 70 defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:M*-py[0-9][0-9]-*)
71PYTHON_VERSION_REQD?= ${PKGNAME_OLD:C/(^.*-|^)py([0-9][0-9])-.*/\2/} 71PYTHON_VERSION_REQD?= ${PKGNAME_OLD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
72.endif 72.endif
73 73
74.include "../../mk/bsd.prefs.mk" 74.include "../../mk/bsd.prefs.mk"
75 75
76BUILD_DEFS+= PYTHON_VERSION_DEFAULT 76BUILD_DEFS+= PYTHON_VERSION_DEFAULT
77BUILD_DEFS_EFFECTS+= PYPACKAGE 77BUILD_DEFS_EFFECTS+= PYPACKAGE
78 78
79PYTHON_VERSION_DEFAULT?= 27 79PYTHON_VERSION_DEFAULT?= 27
80.if ${PYTHON_VERSIONS_INCLUDE_3X:U:tl} == "yes" 80.if ${PYTHON_VERSIONS_INCLUDE_3X:U:tl} == "yes"
81PYTHON_VERSIONS_ACCEPTED?= 31 27 26 25 81PYTHON_VERSIONS_ACCEPTED?= 32 31 27 26 25
82.else 82.else
83PYTHON_VERSIONS_ACCEPTED?= 27 26 25 83PYTHON_VERSIONS_ACCEPTED?= 27 26 25
84.endif 84.endif
85PYTHON_VERSIONS_INCOMPATIBLE?= # empty by default 85PYTHON_VERSIONS_INCOMPATIBLE?= # empty by default
86 86
87BUILDLINK_API_DEPENDS.python25?= python25>=2.5.1 87BUILDLINK_API_DEPENDS.python25?= python25>=2.5.1
88BUILDLINK_API_DEPENDS.python26?= python26>=2.6 88BUILDLINK_API_DEPENDS.python26?= python26>=2.6
89BUILDLINK_API_DEPENDS.python27?= python27>=2.7 89BUILDLINK_API_DEPENDS.python27?= python27>=2.7
90BUILDLINK_API_DEPENDS.python31?= python31>=3.1 90BUILDLINK_API_DEPENDS.python31?= python31>=3.1
 91BUILDLINK_API_DEPENDS.python32?= python32>=3.2
91 92
92# transform the list into individual variables 93# transform the list into individual variables
93.for pv in ${PYTHON_VERSIONS_ACCEPTED} 94.for pv in ${PYTHON_VERSIONS_ACCEPTED}
94.if empty(PYTHON_VERSIONS_INCOMPATIBLE:M${pv}) 95.if empty(PYTHON_VERSIONS_INCOMPATIBLE:M${pv})
95_PYTHON_VERSION_${pv}_OK= yes 96_PYTHON_VERSION_${pv}_OK= yes
96_PYTHON_VERSIONS_ACCEPTED+= ${pv} 97_PYTHON_VERSIONS_ACCEPTED+= ${pv}
97.endif 98.endif
98.endfor 99.endfor
99 100
100# 101#
101# choose a python version where to add, 102# choose a python version where to add,
102# try to be intelligent 103# try to be intelligent
103# 104#
@@ -123,27 +124,33 @@ _PYTHON_VERSION?= ${pv} @@ -123,27 +124,33 @@ _PYTHON_VERSION?= ${pv}
123. endfor 124. endfor
124. endif 125. endif
125.endif 126.endif
126 127
127# 128#
128# Variable assignment for multi-python packages 129# Variable assignment for multi-python packages
129MULTI+= PYTHON_VERSION_REQD=${_PYTHON_VERSION} 130MULTI+= PYTHON_VERSION_REQD=${_PYTHON_VERSION}
130 131
131# No supported version found, annotate to simplify statements below. 132# No supported version found, annotate to simplify statements below.
132.if !defined(_PYTHON_VERSION) 133.if !defined(_PYTHON_VERSION)
133_PYTHON_VERSION= none 134_PYTHON_VERSION= none
134.endif 135.endif
135 136
136.if ${_PYTHON_VERSION} == "31" 137.if ${_PYTHON_VERSION} == "32"
 138PYPKGSRCDIR= ../../lang/python32
 139PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python32}:${PYPKGSRCDIR}
 140PYPACKAGE= python32
 141PYVERSSUFFIX= 3.2
 142PYPKGPREFIX= py32
 143.elif ${_PYTHON_VERSION} == "31"
137PYPKGSRCDIR= ../../lang/python31 144PYPKGSRCDIR= ../../lang/python31
138PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python31}:${PYPKGSRCDIR} 145PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python31}:${PYPKGSRCDIR}
139PYPACKAGE= python31 146PYPACKAGE= python31
140PYVERSSUFFIX= 3.1 147PYVERSSUFFIX= 3.1
141PYPKGPREFIX= py31 148PYPKGPREFIX= py31
142.elif ${_PYTHON_VERSION} == "27" 149.elif ${_PYTHON_VERSION} == "27"
143PYPKGSRCDIR= ../../lang/python27 150PYPKGSRCDIR= ../../lang/python27
144PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python27}:${PYPKGSRCDIR} 151PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python27}:${PYPKGSRCDIR}
145PYPACKAGE= python27 152PYPACKAGE= python27
146PYVERSSUFFIX= 2.7 153PYVERSSUFFIX= 2.7
147PYPKGPREFIX= py27 154PYPKGPREFIX= py27
148.elif ${_PYTHON_VERSION} == "26" 155.elif ${_PYTHON_VERSION} == "26"
149PYPKGSRCDIR= ../../lang/python26 156PYPKGSRCDIR= ../../lang/python26