1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Rename PYTHON_FEATURES to USE_PYTHON to comply to USE_PERL5 and to avoid a

conflict in behaviour with the read-only COMPILER_FEATURES knob
- Fix the deprecated USE_PYTHON_BUILD and USE_PYTHON_RUN behaviour, which
  usually should be mutually exclusive, but some ports include both knobs

Phabric:		D581
Recommended by:	danfe@, makc@
Reviewed by:	danfe, wg, antoine
Approved by:	portmgr
With hat:		python@
This commit is contained in:
Marcus von Appen 2014-08-14 17:04:30 +00:00
parent 634ecc67fe
commit a382bbffeb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364857
22 changed files with 93 additions and 64 deletions

View File

@ -22,10 +22,10 @@ AUTHOR: mva@FreeBSD.org
... ...
Additionally, several Python specific features have been converted Additionally, several Python specific features have been converted
to USES-inspired PYTHON_FEATURES=<featureA>,<featureB>. to USES-inspired USE_PYTHON=<featureA>,<featureB>.
USE_PYDISTUTILS becomes PYTHON_FEATURES=distutils USE_PYDISTUTILS becomes USE_PYTHON=distutils
PYDISTUTILS_AUTOPLIST becomes PYTHON_FEATURES=autoplist PYDISTUTILS_AUTOPLIST becomes USE_PYTHON=autoplist
... ...
Please read the header comments of Uses/python.mk for more details Please read the header comments of Uses/python.mk for more details

View File

@ -40,7 +40,7 @@
# #
# Variables, which can be set by the port: # Variables, which can be set by the port:
# #
# PYTHON_FEATURES - A list of additional features and functionality to # USE_PYTHON - A list of additional features and functionality to
# enable. Supported features are: # enable. Supported features are:
# #
# concurrent - Indicates that the port can be installed for # concurrent - Indicates that the port can be installed for
@ -80,7 +80,7 @@
# when defined. Use this for ports that do *not* use # when defined. Use this for ports that do *not* use
# standard Python packaging mechanisms such as # standard Python packaging mechanisms such as
# distutils, and support *both* Python 2.x and 3.x. # distutils, and support *both* Python 2.x and 3.x.
# Not needed, if PYTHON_FEATURES=autoplist is set. # Not needed, if USE_PYTHON=autoplist is set.
# #
# pythonprefix - Says that the port installs in ${PYTHONBASE} instead # pythonprefix - Says that the port installs in ${PYTHONBASE} instead
# of ${PREFIX}. # of ${PREFIX}.
@ -169,7 +169,7 @@
# #
# There are PREFIX-clean variants of the PYTHON_*DIR variables above. # There are PREFIX-clean variants of the PYTHON_*DIR variables above.
# They are meant to be used by ports instead of the above variables, so the # They are meant to be used by ports instead of the above variables, so the
# ports respect ${PREFIX} (unless PYTHON_FEATURES=pythonprefix is specified). # ports respect ${PREFIX} (unless USE_PYTHON=pythonprefix is specified).
# #
# PYTHONPREFIX_INCLUDEDIR default: ${PREFIX}/include/${PYTHON_VERSION} # PYTHONPREFIX_INCLUDEDIR default: ${PREFIX}/include/${PYTHON_VERSION}
# PYTHONPREFIX_LIBDIR default: ${PREFIX}/lib/${PYTHON_VERSION} # PYTHONPREFIX_LIBDIR default: ${PREFIX}/lib/${PYTHON_VERSION}
@ -197,16 +197,16 @@
# Deprecated variables, which exist for compatibility and will be removed # Deprecated variables, which exist for compatibility and will be removed
# soon: # soon:
# #
# USE_PYDISTUTILS - Deprecated, use PYTHON_FEATURES=distutils instead # USE_PYDISTUTILS - Deprecated, use USE_PYTHON=distutils instead
# #
# PYDISTUTILS_AUTOPLIST # PYDISTUTILS_AUTOPLIST
# - Deprecated, use PYTHON_FEATURES=autoplist instead # - Deprecated, use USE_PYTHON=autoplist instead
# #
# PYTHON_PY3K_PLIST_HACK # PYTHON_PY3K_PLIST_HACK
# - Deprecated, use PYTHON_FEATURES=py3kplist instead # - Deprecated, use USE_PYTHON=py3kplist instead
# #
# PYDISTUTILS_NOEGGINFO # PYDISTUTILS_NOEGGINFO
# - Deprecated, use PYTHON_FEATURES=noegginfo instead # - Deprecated, use USE_PYTHON=noegginfo instead
# #
# PYTHON_MASTER_SITES # PYTHON_MASTER_SITES
# - Deprecated, use MASTER_SITE_PYTHON instead, # - Deprecated, use MASTER_SITE_PYTHON instead,
@ -223,9 +223,9 @@
# default: -py${PYTHON_SUFFIX} # default: -py${PYTHON_SUFFIX}
# #
# PYTHON_CONCURRENT_INSTALL # PYTHON_CONCURRENT_INSTALL
# - Deprecated, use PYTHON_FEATURES=concurrent instead # - Deprecated, use USE_PYTHON=concurrent instead
# #
# USE_PYTHON_PREFIX - Deprecated, use PYTHON_FEATURES=pythonprefix instead # USE_PYTHON_PREFIX - Deprecated, use USE_PYTHON=pythonprefix instead
# #
# PYDISTUTILS_INSTALLNOSINGLE # PYDISTUTILS_INSTALLNOSINGLE
# - Deprecated without replacement # - Deprecated without replacement
@ -247,44 +247,75 @@ python_ARGS= #empty
.endif .endif
# COMPAT KNOBS, remove them, once the tree is cleaned # COMPAT KNOBS, remove them, once the tree is cleaned
.undef _PY_COMPAT_OLD
# We will reuse USE_PYTHON with a different meaning, so make sure that, while
# we are in the transition phase from USE_PYTHON -> USES=python, it is mapped
# and reassigned correctly
.if defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN)
# old style
_PY_COMPAT_OLD= yes
.elif defined(USE_PYTHON)
.if ${USE_PYTHON} == "yes"
# old style
_PY_COMPAT_OLD= yes
.elif ${USE_PYTHON:C/[-0-9.+]*//} == ""
# old style X.Y, X.Y+, X.Y-, -X.Y, X.Y-Z.A
_PY_COMPAT_OLD= yes
.endif # ${USE_PYTHON} == "yes" ...
.endif # defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN)
.if defined(_PY_COMPAT_OLD)
.if defined(USE_PYTHON) .if defined(USE_PYTHON)
.if ${USE_PYTHON} != "yes" .if ${USE_PYTHON} != "yes"
python_ARGS= ${USE_PYTHON} python_ARGS:= ${USE_PYTHON}
.endif .endif
.elif defined(USE_PYTHON_BUILD) .else
.if defined(USE_PYTHON_BUILD)
.if ${USE_PYTHON_BUILD} != "yes" .if ${USE_PYTHON_BUILD} != "yes"
python_ARGS= ${USE_PYTHON_BUILD},build python_ARGS= ${USE_PYTHON_BUILD},build
.else
python_ARGS= build
.endif .endif
.elif defined(USE_PYTHON_RUN) .endif # defined(USE_PYTHON_BUILD)
.if defined(USE_PYTHON_RUN)
.if ${USE_PYTHON_RUN} != "yes" .if ${USE_PYTHON_RUN} != "yes"
python_ARGS= ${USE_PYTHON_RUN},run python_ARGS+= ${USE_PYTHON_RUN},run
.else
python_ARGS+= run
.endif .endif
.endif # defined(USE_PYTHON_RUN)
.endif # defined(USE_PYTHON) .endif # defined(USE_PYTHON)
.if !defined(PYTHON_FEATURES) # Everything passed to python_ARGS, undef USE_PYTHON, since we will reuse
PYTHON_FEATURES= # it with a different meaning below
.undef USE_PYTHON
.endif # defined(_PY_COMPAT_OLD)
.undef _PY_COMPAT_OLD
.if !defined(USE_PYTHON)
USE_PYTHON=
.if defined(USE_PYDISTUTILS) .if defined(USE_PYDISTUTILS)
PYTHON_FEATURES+= distutils USE_PYTHON+= distutils
.endif .endif
.if defined(PYDISTUTILS_AUTOPLIST) .if defined(PYDISTUTILS_AUTOPLIST)
PYTHON_FEATURES+= autoplist USE_PYTHON+= autoplist
.endif .endif
.if defined(PYTHON_PY3K_PLIST_HACK) .if defined(PYTHON_PY3K_PLIST_HACK)
PYTHON_FEATURES+= py3kplist USE_PYTHON+= py3kplist
.endif .endif
.if defined(PYTHON_CONCURRENT_INSTALL) .if defined(PYTHON_CONCURRENT_INSTALL)
PYTHON_FEATURES+= concurrent USE_PYTHON+= concurrent
.endif .endif
.if defined(USE_PYTHON_PREFIX) .if defined(USE_PYTHON_PREFIX)
PYTHON_FEATURES+= pythonprefix USE_PYTHON+= pythonprefix
.endif .endif
.if defined(PYDISTUTILS_NOEGGINFO) .if defined(PYDISTUTILS_NOEGGINFO)
PYTHON_FEATURES+= noegginfo USE_PYTHON+= noegginfo
.endif .endif
.endif # !defined(PYTHON_FEATURES) .endif # !defined(USE_PYTHON)
# COMPAT KNOBS END # COMPAT KNOBS END
# Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME> # Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME>
.for var in ${PYTHON_FEATURES:S/,/ /g} .for var in ${USE_PYTHON:S/,/ /g}
_PYTHON_FEATURE_${var:tu}= yes _PYTHON_FEATURE_${var:tu}= yes
.endfor .endfor
@ -468,10 +499,10 @@ _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp
# What makes a port 'bound' to a certain python version? # What makes a port 'bound' to a certain python version?
# - it installs data into PYTHON_SITELIBDIR, PYTHON_INCLUDEDIR, ... # - it installs data into PYTHON_SITELIBDIR, PYTHON_INCLUDEDIR, ...
# - it links against libpython*.so # - it links against libpython*.so
# - it uses PYTHON_FEATURES=distutils # - it uses USE_PYTHON=distutils
# #
.if defined(NO_STAGE) && defined(_PYTHON_FEATURE_CONCURRENT) .if defined(NO_STAGE) && defined(_PYTHON_FEATURE_CONCURRENT)
BROKEN= PYTHON_FEATURES=concurrent uses USES=uniquefiles, which is not stage-safe BROKEN= USE_PYTHON=concurrent uses USES=uniquefiles, which is not stage-safe
.endif .endif
.if defined(_PYTHON_FEATURE_CONCURRENT) .if defined(_PYTHON_FEATURE_CONCURRENT)

View File

@ -118,11 +118,12 @@ DEV_WARNING+= "USE_AUTOTOOLS=libtool is deprecated, please use USES=libtool"
DEV_WARNING+= "USE_GNOME=ltverhack is deprecated, please use USES=libtool" DEV_WARNING+= "USE_GNOME=ltverhack is deprecated, please use USES=libtool"
.endif .endif
.if defined(USE_PYTHON) .if defined(USE_PYTHON) && (${USE_PYTHON} == "yes" || ${USE_PYTHON:C/[-0-9.+]*//} == "")
.if ${USE_PYTHON} != "yes" _PYTHON_VAL := ${USE_PYTHON}
DEV_WARNING+= "USE_PYTHON is deprecated, please use USES=python:${USE_PYTHON}" .if ${_PYTHON_VAL} != "yes"
DEV_WARNING+= "USE_PYTHON=${_PYTHON_VAL} is deprecated, please use USES=python:${_PYTHON_VAL}"
.else .else
DEV_WARNING+= "USE_PYTHON is deprecated, please use USES=python" DEV_WARNING+= "USE_PYTHON=yes is deprecated, please use USES=python"
.endif .endif
.endif .endif
.if defined(USE_PYTHON_RUN) .if defined(USE_PYTHON_RUN)
@ -173,12 +174,12 @@ USE_FUSE_ALT= USES=fuse
USE_GETTEXT_ALT= USES=gettext USE_GETTEXT_ALT= USES=gettext
USE_SCONS_ALT= USES=scons USE_SCONS_ALT= USES=scons
USE_DRUPAL_ALT= USES=drupal USE_DRUPAL_ALT= USES=drupal
USE_PYDISTUTILS_ALT= PYTHON_FEATURES=distutils USE_PYDISTUTILS_ALT= USE_PYTHON=distutils
PYTHON_CONCURRENT_INSTALL_ALT= PYTHON_FEATURES=concurrent PYTHON_CONCURRENT_INSTALL_ALT= USE_PYTHON=concurrent
PYDISTUTILS_AUTOPLIST_ALT= PYTHON_FEATURES=autoplist PYDISTUTILS_AUTOPLIST_ALT= USE_PYTHON=autoplist
PYTHON_PY3K_PLIST_HACK_ALT= PYTHON_FEATURES=py3kplist PYTHON_PY3K_PLIST_HACK_ALT= USE_PYTHON=py3kplist
PYDISTUTILS_NOEGGINFO_ALT= PYTHON_FEATURES=noegginfo PYDISTUTILS_NOEGGINFO_ALT= USE_PYTHON=noegginfo
USE_PYTHON_PREFIX_ALT= PYTHON_FEATURES=pythonprefix USE_PYTHON_PREFIX_ALT= USE_PYTHON=pythonprefix
PYTHON_PKGNAMESUFFIX_ALT= PYTHON_PKGNAMEPREFIX PYTHON_PKGNAMESUFFIX_ALT= PYTHON_PKGNAMEPREFIX
PYTHON_MASTER_SITES_ALT= MASTER_SITE_PYTHON PYTHON_MASTER_SITES_ALT= MASTER_SITE_PYTHON
NO_INSTALL_MANPAGES_ALT= USES=imake:noman NO_INSTALL_MANPAGES_ALT= USES=imake:noman

View File

@ -12,7 +12,7 @@ COMMENT= ATK accessibility wrapper for python
USES= pkgconfig python:2 USES= pkgconfig python:2
USE_GNOME= atk USE_GNOME= atk
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
EXAMPLES= atkaction.py atkapplication.py atkcapi.c atktext.py atkvalue.py \ EXAMPLES= atkaction.py atkapplication.py atkcapi.c atktext.py atkvalue.py \
msaaapplication.py msaacapi.cpp msaaapplication.py msaacapi.cpp

View File

@ -22,8 +22,8 @@ MATPLOTLIB_DESC= Add support for Matplotlib
PYFITS_DESC= Add Support for PyFITS PYFITS_DESC= Add Support for PyFITS
PYGAME_DESC= Add Support for PyGame PYGAME_DESC= Add Support for PyGame
USES= python USES= python
PYTHON_FEATURES= distutils autoplist USE_PYTHON= distutils autoplist
MATPLOTLIB_RUN_DEPENDS= ${PKGNAMEPREFIX}matplotlib>=0.98:${PORTSDIR}/math/py-matplotlib MATPLOTLIB_RUN_DEPENDS= ${PKGNAMEPREFIX}matplotlib>=0.98:${PORTSDIR}/math/py-matplotlib
PYFITS_RUN_DEPENDS= ${PKGNAMEPREFIX}pyfits>=1.1:${PORTSDIR}/astro/py-pyfits PYFITS_RUN_DEPENDS= ${PKGNAMEPREFIX}pyfits>=1.1:${PORTSDIR}/astro/py-pyfits

View File

@ -11,6 +11,6 @@ MAINTAINER= mva@FreeBSD.org
COMMENT= PyAL is a binding of OpenAL for Python COMMENT= PyAL is a binding of OpenAL for Python
USES= openal:al python USES= openal:al python
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -12,7 +12,7 @@ COMMENT= Pure-Python Interface to the PostgreSQL Database
LICENSE= BSD3CLAUSE LICENSE= BSD3CLAUSE
USES= python:2 USES= python:2
PYTHON_FEATURES= distutils autoplist USE_PYTHON= distutils autoplist
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -18,7 +18,7 @@ RUN_DEPENDS= pytest:${PORTSDIR}/devel/py-logilab-common
USES= python USES= python
WRKSRC= ${WRKDIR}/logilab-astroid-e003574ae51b WRKSRC= ${WRKDIR}/logilab-astroid-e003574ae51b
MAKE_ENV= NO_SETUPTOOLS=1 MAKE_ENV= NO_SETUPTOOLS=1
PYTHON_FEATURES=distutils USE_PYTHON= distutils
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>

View File

@ -13,7 +13,7 @@ COMMENT= Dynamic Scripting for adaptive AI systems
LICENSE= ZLIB LICENSE= ZLIB
USES= python USES= python
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
OPTIONS_DEFINE= DOCS OPTIONS_DEFINE= DOCS

View File

@ -20,7 +20,7 @@ RUN_DEPENDS= ${PYNUMPY}
USES= python USES= python
USE_SDL= ttf image mixer sdl USE_SDL= ttf image mixer sdl
USE_GCC= any USE_GCC= any
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
SDLNOX11= sdl-nox11-[0-9]* SDLNOX11= sdl-nox11-[0-9]*

View File

@ -16,7 +16,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dateutil>0:${PORTSDIR}/devel/py-dateutil \
${PYTHON_PKGNAMEPREFIX}pytz>0:${PORTSDIR}/devel/py-pytz ${PYTHON_PKGNAMEPREFIX}pytz>0:${PORTSDIR}/devel/py-pytz
USES= python:2 USES= python:2
PYTHON_FEATURES= distutils, autoplist USE_PYTHON= distutils autoplist
DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME} DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
PORTDOCS= * PORTDOCS= *

View File

@ -15,6 +15,6 @@ LICENSE= LGPL20
USES= python USES= python
MAKE_ENV= NO_SETUPTOOLS=1 MAKE_ENV= NO_SETUPTOOLS=1
PYTHON_FEATURES=distutils USE_PYTHON= distutils
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -19,7 +19,6 @@ RUN_DEPENDS= ${LOCALBASE}/include/${PYTHON_VERSION}/pygame/pygame.h:${PORTSDIR}/
USES= python:2 USES= python:2
USE_GNOME= atk USE_GNOME= atk
USE_PYTHON= autoplist distutils
PYTHON_FEATURES= autoplist distutils
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -13,7 +13,7 @@ COMMENT= Python Lex-Yacc
LICENSE= BSD3CLAUSE LICENSE= BSD3CLAUSE
USES= python USES= python
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
PORTDOCS= ply.html internal.html README PORTDOCS= ply.html internal.html README

View File

@ -12,9 +12,9 @@ COMMENT= Python bindings to the SDL2 libraries
LICENSE= ZLIB LICENSE= ZLIB
USES= python USES= python
USE_SDL= sdl2 gfx2 image2 ttf2 mixer2 USE_SDL= sdl2 gfx2 image2 ttf2 mixer2
PYTHON_FEATURES= autoplist distutils USE_PYTHON= autoplist distutils
OPTIONS_DEFINE= DOCS OPTIONS_DEFINE= DOCS

View File

@ -12,7 +12,7 @@ COMMENT= Python source code checking tool to help hunting common bugs
LICENSE= BSD3CLAUSE LICENSE= BSD3CLAUSE
USES= python USES= python
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
DOCS= ChangeLog COPYRIGHT KNOWN_BUGS MAINTAINERS README TODO VERSION DOCS= ChangeLog COPYRIGHT KNOWN_BUGS MAINTAINERS README TODO VERSION

View File

@ -16,7 +16,7 @@ LICENSE= LGPL21
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}astroid>=1.1.0:${PORTSDIR}/devel/py-astroid RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}astroid>=1.1.0:${PORTSDIR}/devel/py-astroid
USES= python USES= python
PYTHON_FEATURES=distutils USE_PYTHON= distutils
OPTIONS_DEFINE= GUI OPTIONS_DEFINE= GUI

View File

@ -14,7 +14,7 @@ COMMENT= Programming Language for writing Python extension modules
LICENSE= APACHE20 LICENSE= APACHE20
USES= python:2 USES= python:2
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
post-install: post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}/Manual @${MKDIR} ${STAGEDIR}${DOCSDIR}/Manual

View File

@ -16,7 +16,7 @@ LICENSE= GPLv2
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/Crypto/__init__.py:${PORTSDIR}/security/py-pycrypto RUN_DEPENDS= ${PYTHON_SITELIBDIR}/Crypto/__init__.py:${PORTSDIR}/security/py-pycrypto
USES= python USES= python
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
USE_WX= 3.0+ USE_WX= 3.0+
WX_COMPS= python WX_COMPS= python

View File

@ -18,7 +18,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinte
${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging
USES= python tar:bzip2 USES= python tar:bzip2
PYTHON_FEATURES=autoplist distutils USE_PYTHON= autoplist distutils
PLIST_FILES= share/pixmaps/pysolfc.png PLIST_FILES= share/pixmaps/pysolfc.png
DATADIR= ${PREFIX}/share/PySolFC DATADIR= ${PREFIX}/share/PySolFC

View File

@ -14,8 +14,7 @@ LICENSE= GPLv2
USES= python:3 USES= python:3
USE_TEX= latex:build USE_TEX= latex:build
USE_PYTHON= autoplist distutils
PYTHON_FEATURES= autoplist distutils
OPTIONS_DEFINE= T1CODE KPATHSEA OPTIONS_DEFINE= T1CODE KPATHSEA
OPTIONS_DEFAULT= T1CODE KPATHSEA OPTIONS_DEFAULT= T1CODE KPATHSEA

View File

@ -15,8 +15,7 @@ LICENSE= GPLv2
USES= python:2 USES= python:2
USE_TEX= latex:build USE_TEX= latex:build
USE_PYTHON= autoplist distutils
PYTHON_FEATURES= autoplist distutils
OPTIONS_DEFINE= T1CODE KPATHSEA OPTIONS_DEFINE= T1CODE KPATHSEA
OPTIONS_DEFAULT= T1CODE KPATHSEA OPTIONS_DEFAULT= T1CODE KPATHSEA