Lines 4-19
Link Here
|
4 |
# $FreeBSD: ports/Mk/bsd.python.mk,v 1.19 2002/01/22 12:53:27 tg Exp $ |
4 |
# $FreeBSD: ports/Mk/bsd.python.mk,v 1.19 2002/01/22 12:53:27 tg Exp $ |
5 |
# |
5 |
# |
6 |
|
6 |
|
7 |
.if !defined(Python_Include) |
7 |
.if !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include) |
8 |
|
8 |
|
9 |
Python_Include= bsd.python.mk |
9 |
Python_Pre_Include= bsd.python.mk |
10 |
Python_Include_MAINTAINER= tg@FreeBSD.org |
10 |
Python_Include_MAINTAINER= tg@FreeBSD.org |
11 |
|
11 |
|
12 |
# This file contains some variable definitions that are supposed to |
12 |
# This file contains some variable definitions that are supposed to |
13 |
# make your life easier when dealing with ports related to the Python |
13 |
# make your life easier when dealing with ports related to the Python |
14 |
# language. It's automatically included when USE_PYTHON or PYTHON_VERSION |
14 |
# language. It's automatically included when USE_PYTHON, PYTHON_VERSION or |
15 |
# is defined in the ports' makefile. Define PYTHON_VERSION to override the |
15 |
# USE_PYDISTUTILS is defined in the ports' makefile. Define PYTHON_VERSION |
16 |
# defaults that USE_PYTHON would give you. |
16 |
# to override the defaults that USE_PYTHON would give you. |
17 |
# |
17 |
# |
18 |
# The variables: |
18 |
# The variables: |
19 |
# |
19 |
# |
Lines 71-76
Link Here
|
71 |
# |
71 |
# |
72 |
# PYXML: Dependency line for the XML entension. As of Python-2.0, |
72 |
# PYXML: Dependency line for the XML entension. As of Python-2.0, |
73 |
# this extension is in the base distribution. |
73 |
# this extension is in the base distribution. |
|
|
74 |
# |
75 |
# USE_PYDISTUTILS: Use distutils as do-build and do-install target. |
76 |
# |
77 |
# PYDISTUTILS_BUILDARGS: Arguments to build with distutils. |
78 |
# |
79 |
# PYDISTUTILS_INSTALLARGS: Arguments to install with distutils. |
80 |
# |
74 |
|
81 |
|
75 |
# XXX Ugly hack, but running python is the best way to determine the |
82 |
# XXX Ugly hack, but running python is the best way to determine the |
76 |
# currently installed version. If Python is not installed, a default |
83 |
# currently installed version. If Python is not installed, a default |
Lines 161-166
Link Here
|
161 |
PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}- |
168 |
PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}- |
162 |
PYTHON_PLATFORM!= expr ${OPSYS:L}${OSREL} : '\(.*\)\.' |
169 |
PYTHON_PLATFORM!= expr ${OPSYS:L}${OSREL} : '\(.*\)\.' |
163 |
PYTHON_SITELIBDIR= ${PYTHON_LIBDIR}/site-packages |
170 |
PYTHON_SITELIBDIR= ${PYTHON_LIBDIR}/site-packages |
|
|
171 |
PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX} |
164 |
|
172 |
|
165 |
# dependencies |
173 |
# dependencies |
166 |
PYTHON_NO_DEPENDS?= NO |
174 |
PYTHON_NO_DEPENDS?= NO |
Lines 168-174
Link Here
|
168 |
.if ${PYTHON_NO_DEPENDS} == "NO" |
176 |
.if ${PYTHON_NO_DEPENDS} == "NO" |
169 |
BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} |
177 |
BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} |
170 |
RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} |
178 |
RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} |
|
|
179 |
|
180 |
.if defined(USE_PYDISTUTILS) && ${PYTHON_REL} < 200 |
181 |
BUILD_DEPENDS+= ${PYDISTUTILS} |
171 |
.endif |
182 |
.endif |
|
|
183 |
.endif # ${PYTHON_NO_DEPENDS} == "NO" |
172 |
|
184 |
|
173 |
# pkg/PLIST substrings |
185 |
# pkg/PLIST substrings |
174 |
PLIST_SUB+= PYTHON_VERSION=${PYTHON_VERSION} \ |
186 |
PLIST_SUB+= PYTHON_VERSION=${PYTHON_VERSION} \ |
Lines 176-179
Link Here
|
176 |
|
188 |
|
177 |
# XXX Hm, should I export some of the variables above to *_ENV? |
189 |
# XXX Hm, should I export some of the variables above to *_ENV? |
178 |
|
190 |
|
179 |
.endif # !defined(Python_Include) |
191 |
.endif # !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include) |
|
|
192 |
|
193 |
|
194 |
.if defined(_POSTMKINCLUDED) && !defined(Python_Post_Include) |
195 |
|
196 |
Python_Post_Include= bsd.python.mk |
197 |
|
198 |
# py-distutils support |
199 |
.if defined(USE_PYDISTUTILS) |
200 |
.if !target(do-build) |
201 |
do-build: |
202 |
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py build ${PYDISTUTILS_BUILDARGS}) |
203 |
.endif |
204 |
|
205 |
.if !target(do-install) |
206 |
do-install: |
207 |
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py install ${PYDISTUTILS_INSTALLARGS}) |
208 |
.endif |
209 |
.endif # defined(USE_PYDISTUTILS) |
210 |
|
211 |
.endif # defined(_POSTMKINCLUDED) && !defined(Python_Post_Include) |