aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2017-11-30 23:50:30 +0800
committermat <mat@FreeBSD.org>2017-11-30 23:50:30 +0800
commit32512cab3e8dd90b7cd0525bb5dc98007db431e2 (patch)
treed296c82a71504382f4faefa0bf8d7be384ea1105 /lang
parentb4ddc365e88ebdb48627086b02365b74119cf189 (diff)
downloadfreebsd-ports-gnome-32512cab3e8dd90b7cd0525bb5dc98007db431e2.tar.gz
freebsd-ports-gnome-32512cab3e8dd90b7cd0525bb5dc98007db431e2.tar.zst
freebsd-ports-gnome-32512cab3e8dd90b7cd0525bb5dc98007db431e2.zip
Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/cdent/Makefile4
-rw-r--r--lang/cython/Makefile6
-rw-r--r--lang/cython3/Makefile9
-rw-r--r--lang/micropython/Makefile2
-rw-r--r--lang/py-clojure/Makefile2
-rw-r--r--lang/py-hy/Makefile18
-rw-r--r--lang/py-qt5-qml/Makefile1
-rw-r--r--lang/pypy/Makefile2
-rw-r--r--lang/python-tools/Makefile4
-rw-r--r--lang/python34/files/pkg-message.in6
-rw-r--r--lang/python35/files/pkg-message.in6
-rw-r--r--lang/python36/files/pkg-message.in6
-rw-r--r--lang/tinypy/Makefile2
14 files changed, 29 insertions, 40 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 43b2f8c32bf3..9537ec578098 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -47,7 +47,6 @@
SUBDIR += cparser
SUBDIR += csharp-mode.el
SUBDIR += cython
- SUBDIR += cython3
SUBDIR += diveintopython
SUBDIR += dlang-tools
SUBDIR += dlv
diff --git a/lang/cdent/Makefile b/lang/cdent/Makefile
index bbc759585162..be75222be23a 100644
--- a/lang/cdent/Makefile
+++ b/lang/cdent/Makefile
@@ -10,9 +10,9 @@ MASTER_SITES= CHEESESHOP
MAINTAINER= lwhsu@FreeBSD.org
COMMENT= Portable Module Programming Language
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/yaml/__init__.py:devel/py-yaml
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/yaml/__init__.py:devel/py-yaml@${FLAVOR}
-USES= python
+USES= python:2.7
USE_PYTHON= distutils autoplist
.include <bsd.port.mk>
diff --git a/lang/cython/Makefile b/lang/cython/Makefile
index 95bafc0af125..9faed36fff74 100644
--- a/lang/cython/Makefile
+++ b/lang/cython/Makefile
@@ -6,6 +6,7 @@ PORTVERSION= 0.26
CATEGORIES= lang python
MASTER_SITES= http://www.cython.org/release/ \
CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= Cython-${PORTVERSION}
MAINTAINER= vmagerya@gmail.com
@@ -14,8 +15,9 @@ COMMENT= Compiler for Writing C Extensions for the Python Language
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-USES?= python
-USE_PYTHON+= autoplist distutils
+
+USES= python
+USE_PYTHON= autoplist distutils concurrent allflavors
post-install:
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/Cython \
diff --git a/lang/cython3/Makefile b/lang/cython3/Makefile
deleted file mode 100644
index 44228ec46f0a..000000000000
--- a/lang/cython3/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-MASTERDIR= ${.CURDIR}/../cython
-
-PKGNAMESUFFIX= 3
-
-USES= python:3.3+
-USE_PYTHON= concurrent
-UNIQUE_SUFFIX= ${PKGNAMESUFFIX}
-
-.include "${MASTERDIR}/Makefile"
diff --git a/lang/micropython/Makefile b/lang/micropython/Makefile
index 4752d6038bb6..d84ff19fa5d9 100644
--- a/lang/micropython/Makefile
+++ b/lang/micropython/Makefile
@@ -13,7 +13,7 @@ LICENSE= MIT
LIB_DEPENDS= libffi.so:devel/libffi
-USES= gmake pkgconfig python:3,build readline shebangfix
+USES= gmake pkgconfig python:3.4+,build readline shebangfix
USE_GITHUB= yes
diff --git a/lang/py-clojure/Makefile b/lang/py-clojure/Makefile
index 5b59c120f36c..6bd1e9cd9ee1 100644
--- a/lang/py-clojure/Makefile
+++ b/lang/py-clojure/Makefile
@@ -13,7 +13,7 @@ COMMENT= Implementation of Clojure in Python
LICENSE= EPL
-USES= python
+USES= python:2.7
USE_PYTHON= distutils autoplist
NO_ARCH= yes
diff --git a/lang/py-hy/Makefile b/lang/py-hy/Makefile
index cf49e2b1fccc..ab874586992b 100644
--- a/lang/py-hy/Makefile
+++ b/lang/py-hy/Makefile
@@ -13,15 +13,15 @@ COMMENT= Hy is a dialect of Lisp that is embedded in Python
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}args>0:devel/py-args \
- ${PYTHON_PKGNAMEPREFIX}astor>0:devel/py-astor \
- ${PYTHON_PKGNAMEPREFIX}clint>0:devel/py-clint \
- ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose \
- ${PYTHON_PKGNAMEPREFIX}rply>0:devel/py-rply \
- ${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox \
- ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments \
- ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx \
- ${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}args>0:devel/py-args@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}astor>0:devel/py-astor@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}clint>0:devel/py-clint@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}rply>0:devel/py-rply@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${FLAVOR}
USES= python
USE_PYTHON= distutils autoplist
diff --git a/lang/py-qt5-qml/Makefile b/lang/py-qt5-qml/Makefile
index e5a0c34b4771..380ffed63fb5 100644
--- a/lang/py-qt5-qml/Makefile
+++ b/lang/py-qt5-qml/Makefile
@@ -13,6 +13,7 @@ PYQT_DIST= yes
USES= python pyqt:5
USE_GL= gl
USE_PYQT= sip_build core_run network_run
+USE_PYTHON= flavors
USE_QT5= core gui network qml buildtools_build qmake_build
OPTIONS_DEFINE= API DEBUG
diff --git a/lang/pypy/Makefile b/lang/pypy/Makefile
index 36193208d5e9..f9121015cf04 100644
--- a/lang/pypy/Makefile
+++ b/lang/pypy/Makefile
@@ -94,7 +94,7 @@ PYPY_MINMEM_BUILD_DEPENDS= pypy:lang/pypy
.endif
PYPY_VARS= PYTHON_CMD=${LOCALBASE}/bin/pypy
PYPY_MINMEM_VARS= PYTHON_CMD="${SETENV} PYPY_GC_MAX_DELTA=200MB ${LOCALBASE}/bin/pypy --jit loop_longevity=300"
-PYTHON_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycparser>=2.10:devel/py-pycparser
+PYTHON_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycparser>=2.10:devel/py-pycparser@${PY_FLAVOR}
PYTHON_USES= python:2,build
DESCR= ${.CURDIR}/pkg-descr
diff --git a/lang/python-tools/Makefile b/lang/python-tools/Makefile
index 027af2887b12..86f4494a91bf 100644
--- a/lang/python-tools/Makefile
+++ b/lang/python-tools/Makefile
@@ -39,10 +39,6 @@ UNIQUE_SUFFIX_FILES= ${SCRIPT_FILES:C/^.*/bin\/&/g} \
SCRIPT_FILES+= logmerge
.endif
-.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION}
-UNIQUE_DEFAULT_LINKS= yes
-.endif
-
do-install:
.for fname in ${SCRIPT_FILES}
${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/${fname}.py \
diff --git a/lang/python34/files/pkg-message.in b/lang/python34/files/pkg-message.in
index c2325386f571..5fb6e462a0b7 100644
--- a/lang/python34/files/pkg-message.in
+++ b/lang/python34/files/pkg-message.in
@@ -3,8 +3,8 @@
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
-py%%PYTHON_SUFFIX%%-gdbm databases/py%%PYTHON_SUFFIX%%-gdbm
-py%%PYTHON_SUFFIX%%-sqlite3 databases/py%%PYTHON_SUFFIX%%-sqlite3
-py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py%%PYTHON_SUFFIX%%-tkinter
+py%%PYTHON_SUFFIX%%-gdbm databases/py-gdbm@py%%PYTHON_SUFFIX%%
+py%%PYTHON_SUFFIX%%-sqlite3 databases/py-sqlite3@py%%PYTHON_SUFFIX%%
+py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py-tkinter@py%%PYTHON_SUFFIX%%
===========================================================================
diff --git a/lang/python35/files/pkg-message.in b/lang/python35/files/pkg-message.in
index c2325386f571..5fb6e462a0b7 100644
--- a/lang/python35/files/pkg-message.in
+++ b/lang/python35/files/pkg-message.in
@@ -3,8 +3,8 @@
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
-py%%PYTHON_SUFFIX%%-gdbm databases/py%%PYTHON_SUFFIX%%-gdbm
-py%%PYTHON_SUFFIX%%-sqlite3 databases/py%%PYTHON_SUFFIX%%-sqlite3
-py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py%%PYTHON_SUFFIX%%-tkinter
+py%%PYTHON_SUFFIX%%-gdbm databases/py-gdbm@py%%PYTHON_SUFFIX%%
+py%%PYTHON_SUFFIX%%-sqlite3 databases/py-sqlite3@py%%PYTHON_SUFFIX%%
+py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py-tkinter@py%%PYTHON_SUFFIX%%
===========================================================================
diff --git a/lang/python36/files/pkg-message.in b/lang/python36/files/pkg-message.in
index c2325386f571..5fb6e462a0b7 100644
--- a/lang/python36/files/pkg-message.in
+++ b/lang/python36/files/pkg-message.in
@@ -3,8 +3,8 @@
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
-py%%PYTHON_SUFFIX%%-gdbm databases/py%%PYTHON_SUFFIX%%-gdbm
-py%%PYTHON_SUFFIX%%-sqlite3 databases/py%%PYTHON_SUFFIX%%-sqlite3
-py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py%%PYTHON_SUFFIX%%-tkinter
+py%%PYTHON_SUFFIX%%-gdbm databases/py-gdbm@py%%PYTHON_SUFFIX%%
+py%%PYTHON_SUFFIX%%-sqlite3 databases/py-sqlite3@py%%PYTHON_SUFFIX%%
+py%%PYTHON_SUFFIX%%-tkinter x11-toolkits/py-tkinter@py%%PYTHON_SUFFIX%%
===========================================================================
diff --git a/lang/tinypy/Makefile b/lang/tinypy/Makefile
index 3561ae9e684b..bf4c67005d72 100644
--- a/lang/tinypy/Makefile
+++ b/lang/tinypy/Makefile
@@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
GH_ACCOUNT= philhassey
-USES= python:build
+USES= python:2.7,build
USE_PYTHON= distutils noegginfo
USE_GITHUB= yes