Commit 32512cab authored by mat's avatar mat
Browse files

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
parent b4ddc365
......@@ -10,6 +10,36 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20171130:
AUTHOR: mat@FreeBSD.org
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 the port is
using distutils but flavors are not wanted.
A new USE_PYTHON=optsuffix that will adds 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 it will only generate flavors for the versions in PYTHON2_DEFAULT
and PYTHON3_DEFAULT. Define BUILD_ALL_PYTHON_FLAVORS in your make.conf to
generate all possible flavors. A port can set USE_PYTHON=allflavors to have
all the flavors and not simply the default ones.
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}
20171130:
AUTHOR: mat@FreeBSD.org
......
......@@ -7656,7 +7656,6 @@ graphics/kuickshow-kde4||2015-07-21|Has expired: Broken for more than 6 months
graphics/sng||2015-07-21|Has expired: Broken for more than 6 months
japanese/netype||2015-07-21|Has expired: Broken for more than 6 months
databases/p5-DBD-Pg32|databases/p5-DBD-Pg|2015-07-22|Has expired: Use databases/p5-DBD-Pg instead, compatibility probles are fixed
textproc/py-asciinema|textproc/asciinema|2015-07-23|Has expired: use textproc/asciinema instead
devel/libiomp5-devel|devel/llvm-devel|2015-07-24|Merged with devel/llvm-devel
devel/p5-Test-Tester|devel/p5-Test-Simple|2015-07-25|Has expired: Part of p5-Test-Simple (use that instead), and included in perl 5.22
devel/p5-Test-use-ok|devel/p5-Test-Simple|2015-07-25|Has expired: Part of devel/p5-Test-Simple (use that instead), and included in perl 5.22
......@@ -9099,7 +9098,6 @@ databases/py-sqlalchemy09|databases/py-sqlalchemy10|2017-03-12|Has expired: Upst
devel/avr-gcc-devel||2017-03-13|Has expired: There's no longer a point to have both, a -devel and a regular port of GCC for the AVR
net/py-pysimplesoap|net/py-soap2py|2017-03-13|Rename to match upstream naming
games/trigger-data|games/trigger-rally|2017-03-15|Merged into games/trigger-rally
devel/py-setuptools|devel/py27-setuptools|2017-03-16|Renamed to better match other python ports
devel/py-setuptools27|devel/py27-setuptools|2017-03-16|Renamed to better match other python ports
devel/py-setuptools33|devel/py33-setuptools|2017-03-16|Renamed to better match other python ports
devel/py-setuptools34|devel/py34-setuptools|2017-03-16|Renamed to better match other python ports
......@@ -9657,3 +9655,149 @@ devel/buildbot-worker|devel/py-buildbot-worker|2017-11-29|Rename to comply with
devel/buildbot-www|devel/py-buildbot-www|2017-11-29|Rename to comply with PyPI scheme.
emulators/ppsspp-devel|emulators/ppsspp|2017-11-29|Out of date: use emulators/ppsspp for now
audio/shairport|audio/shairport-sync|2017-11-29|Has expired: Officially unmaintained upstream. Use audio/shairport-sync instead
accessibility/py3-speech-dispatcher|accessibility/py-speech-dispatcher@py36|2017-11-30|Moved to a flavored, generic, version
accessibility/py3-atspi|accessibility/py-atspi@py36|2017-11-30|Moved to a flavored, generic, version
archivers/py3-libarchive-c|archivers/py-libarchive-c@py36|2017-11-30|Moved to a flavored, generic, version
audio/py3-mutagen|audio/py-mutagen@py36|2017-11-30|Moved to a flavored, generic, version
audio/py3-pylast|audio/py-pylast@py36|2017-11-30|Moved to a flavored, generic, version
databases/py3-apsw|databases/py-apsw@py36|2017-11-30|Moved to a flavored, generic, version
databases/py3-bsddb3|databases/py-bsddb3@py36|2017-11-30|Moved to a flavored, generic, version
databases/py3-mysqlclient|databases/py-mysqlclient@py36|2017-11-30|Moved to a flavored, generic, version
databases/py3-psycopg2|databases/py-psycopg2@py36|2017-11-30|Moved to a flavored, generic, version
databases/py34-gdbm|databases/py-gdbm@py34|2017-11-30|Moved to a flavored, generic, version
databases/py34-sqlite3|databases/py-sqlite3@py34|2017-11-30|Moved to a flavored, generic, version
databases/py35-gdbm|databases/py-gdbm@py35|2017-11-30|Moved to a flavored, generic, version
databases/py35-sqlite3|databases/py-sqlite3@py35|2017-11-30|Moved to a flavored, generic, version
databases/py36-gdbm|databases/py-gdbm@py36|2017-11-30|Moved to a flavored, generic, version
databases/py36-sqlite3|databases/py-sqlite3@py36|2017-11-30|Moved to a flavored, generic, version
devel/py27-setuptools|devel/py-setuptools@py27|2017-11-30|Moved to a flavored, generic, version
devel/py3-threema-msgapi|devel/py-threema-msgapi@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-Jinja2|devel/py-Jinja2@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-apipkg|devel/py-apipkg@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-asttokens|devel/py-asttokens@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-babel|devel/py-babel@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-cffi|devel/py-cffi@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-click-log|devel/py-click-log@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-click-threading|devel/py-click-threading@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-click|devel/py-click@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-colorama|devel/py-colorama@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-coloredlogs|devel/py-coloredlogs@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-dateutil|devel/py-dateutil@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-dbus|devel/py-dbus@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-defusedxml|devel/py-defusedxml@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-docopt|devel/py-docopt@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-flake8-builtins|devel/py-flake8-builtins@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-flake8-docstrings|devel/py-flake8-docstrings@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-flake8-import-order|devel/py-flake8-import-order@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-flake8-polyfill|devel/py-flake8-polyfill@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-flake8-quotes|devel/py-flake8-quotes@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-flake8|devel/py-flake8@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-freezegun|devel/py-freezegun@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-gobject3|devel/py-gobject3@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-hgtools|devel/py-hgtools@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-icalendar|devel/py-icalendar@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-jedi|devel/py-jedi@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-jsonschema|devel/py-jsonschema@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-libpeas|devel/py-libpeas@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-libzfs|devel/py-libzfs@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-llfuse|devel/py-llfuse@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-lxml|devel/py-lxml@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-mccabe|devel/py-mccabe@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-mock|devel/py-mock@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-nose|devel/py-nose@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pbr|devel/py-pbr@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pip|devel/py-pip@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pluggy|devel/py-pluggy@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-ply|devel/py-ply@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pretend|devel/py-pretend@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-prompt_toolkit|devel/py-prompt_toolkit@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-protobuf|devel/py-protobuf@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-py|devel/py-py@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pyasn1|devel/py-pyasn1@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pycodestyle|devel/py-pycodestyle@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pycparser|devel/py-pycparser@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pydocstyle|devel/py-pydocstyle@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pyflakes|devel/py-pyflakes@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pygit2|devel/py-pygit2@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pyicu|devel/py-pyicu@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pylru-cache|devel/py-pylru-cache@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pytest-capturelog|devel/py-pytest-capturelog@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pytest-runner|devel/py-pytest-runner@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pytest-timeout|devel/py-pytest-timeout@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pytest-xdist|devel/py-pytest-xdist@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pytest|devel/py-pytest@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-python-magic|devel/py-python-magic@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-pytz|devel/py-pytz@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-rubymarshal|devel/py-rubymarshal@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-scripttest|devel/py-scripttest@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-setproctitle|devel/py-setproctitle@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-setuptools_scm|devel/py-setuptools_scm@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-simplejson|devel/py-simplejson@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-six|devel/py-six@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-tabulate|devel/py-tabulate@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-toposort|devel/py-toposort@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-tox|devel/py-tox@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-tzlocal|devel/py-tzlocal@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-urwid|devel/py-urwid@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-vcversioner|devel/py-vcversioner@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-verboselogs|devel/py-verboselogs@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-virtualenv|devel/py-virtualenv@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-voluptuous|devel/py-voluptuous@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-wcwidth|devel/py-wcwidth@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-xdg|devel/py-xdg@py36|2017-11-30|Moved to a flavored, generic, version
devel/py3-yaml|devel/py-yaml@py36|2017-11-30|Moved to a flavored, generic, version
devel/py34-setuptools|devel/py-setuptools@py34|2017-11-30|Moved to a flavored, generic, version
devel/py35-setuptools|devel/py-setuptools@py35|2017-11-30|Moved to a flavored, generic, version
devel/py36-setuptools|devel/py-setuptools@py36|2017-11-30|Moved to a flavored, generic, version
dns/py3-dnspython|dns/py-dnspython@py36|2017-11-30|Moved to a flavored, generic, version
dns/py3-idna|dns/py-idna@py36|2017-11-30|Moved to a flavored, generic, version
graphics/py3-cairo|graphics/py-cairo@py36|2017-11-30|Moved to a flavored, generic, version
graphics/py3-imagesize|graphics/py-imagesize@py36|2017-11-30|Moved to a flavored, generic, version
graphics/py3-pillow|graphics/py-pillow@py36|2017-11-30|Moved to a flavored, generic, version
graphics/py3-pygraphviz|graphics/py-pygraphviz@py36|2017-11-30|Moved to a flavored, generic, version
lang/cython3|lang/cython@py36|2017-11-30|Moved to a flavored, generic, version
misc/py3-pexpect|misc/py-pexpect@py36|2017-11-30|Moved to a flavored, generic, version
misc/py3-tqdm|misc/py-tqdm@py36|2017-11-30|Moved to a flavored, generic, version
multimedia/py3-gstreamer1|multimedia/py-gstreamer1@py36|2017-11-30|Moved to a flavored, generic, version
net-mgmt/py3-dnsdiag|net-mgmt/py-dnsdiag@py36|2017-11-30|Moved to a flavored, generic, version
net/py3-netifaces|net/py-netifaces@py36|2017-11-30|Moved to a flavored, generic, version
net/py3-pysocks|net/py-pysocks@py36|2017-11-30|Moved to a flavored, generic, version
net/py3-urllib3|net/py-urllib3@py36|2017-11-30|Moved to a flavored, generic, version
print/py3-fonttools|print/py-fonttools@py36|2017-11-30|Moved to a flavored, generic, version
print/py3-pycups|print/py-pycups@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-certifi|security/py-certifi@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-cryptography|security/py-cryptography@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-ecdsa|security/py-ecdsa@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-libnacl|security/py-libnacl@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-openssl|security/py-openssl@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-pbkdf2|security/py-pbkdf2@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-pyaes|security/py-pyaes@py36|2017-11-30|Moved to a flavored, generic, version
security/py3-pycrypto|security/py-pycrypto@py36|2017-11-30|Moved to a flavored, generic, version
sysutils/py3-execnet|sysutils/py-execnet@py36|2017-11-30|Moved to a flavored, generic, version
sysutils/py3-pkginfo|sysutils/py-pkginfo@py36|2017-11-30|Moved to a flavored, generic, version
sysutils/py3-ptyprocess|sysutils/py-ptyprocess@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-asciinema|textproc/py-asciinema@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-pager|textproc/py-pager@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-MarkupSafe|textproc/py-MarkupSafe@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-alabaster|textproc/py-alabaster@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-chardet|textproc/py-chardet@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-docutils|textproc/py-docutils@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-feedparser|textproc/py-feedparser@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-humanfriendly|textproc/py-humanfriendly@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-hunspell|textproc/py-hunspell@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-libxml2|textproc/py-libxml2@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-numpydoc|textproc/py-numpydoc@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-pyPEG2|textproc/py-pyPEG2@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-pygments|textproc/py-pygments@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-pystemmer|textproc/py-pystemmer@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-qrcode|textproc/py-qrcode@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-snowballstemmer|textproc/py-snowballstemmer@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-sphinx|textproc/py-sphinx@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-sphinx_rtd_theme|textproc/py-sphinx_rtd_theme@py36|2017-11-30|Moved to a flavored, generic, version
textproc/py3-texttable|textproc/py-texttable@py36|2017-11-30|Moved to a flavored, generic, version
www/py3-cssutils|www/py-cssutils@py36|2017-11-30|Moved to a flavored, generic, version
www/py3-httplib2|www/py-httplib2@py36|2017-11-30|Moved to a flavored, generic, version
www/py3-requests|www/py-requests@py36|2017-11-30|Moved to a flavored, generic, version
x11-toolkits/py34-tkinter|x11-toolkits/py-tkinter@py34|2017-11-30|Moved to a flavored, generic, version
x11-toolkits/py35-tkinter|x11-toolkits/py-tkinter@py35|2017-11-30|Moved to a flavored, generic, version
x11-toolkits/py36-tkinter|x11-toolkits/py-tkinter@py36|2017-11-30|Moved to a flavored, generic, version
......@@ -388,14 +388,15 @@ pygobject_BUILD_DEPENDS= pygobject-codegen-2.0:devel/py-gobject
pygobject_RUN_DEPENDS= pygobject-codegen-2.0:devel/py-gobject
pygobject_USE_GNOME_IMPL= glib20
# Have to keep two components because the _DETECT file is not the same.
py3gobject3_DETECT= ${LOCALBASE}/share/py3gobject3/.keep
py3gobject3_BUILD_DEPENDS= py3?-gobject3>=0:devel/py3-gobject3
py3gobject3_RUN_DEPENDS= py3?-gobject3>=0:devel/py3-gobject3
py3gobject3_BUILD_DEPENDS= py3?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
py3gobject3_RUN_DEPENDS= py3?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
py3gobject3_USE_GNOME_IMPL= glib20
pygobject3_DETECT= ${LOCALBASE}/share/pygobject3/.keep
pygobject3_BUILD_DEPENDS= py2?-gobject3>=0:devel/py-gobject3
pygobject3_RUN_DEPENDS= py2?-gobject3>=0:devel/py-gobject3
pygobject3_BUILD_DEPENDS= py2?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
pygobject3_RUN_DEPENDS= py2?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
pygobject3_USE_GNOME_IMPL= glib20
pygtk2_DETECT= ${LOCALBASE}/libdata/pkgconfig/pygtk-2.0.pc
......
......@@ -241,8 +241,8 @@ do-configure:
_USE_PYQT_ALL+= ${_USE_PYQT${_PYQT_VERSION}_ONLY}
.for comp in ${_USE_PYQT_ALL:O:u}
_USE_PYQT_ALL_SUFFIXED+= py-${comp} py-${comp}_build py-${comp}_run
py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}
py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}
py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
py-${comp}_build_BUILD_DEPENDS?= ${py-${comp}_BUILD_DEPENDS}
py-${comp}_run_RUN_DEPENDS?= ${py-${comp}_RUN_DEPENDS}
.endfor
......
......@@ -71,8 +71,24 @@
# prefix-less original name, e.g.
# bin/foo-2.7 --> bin/foo.
#
# cython - Depend on lang/cython at build-time.
#
# cython_run - Depend on lang/cython at run-time.
#
# flavors - Force creation of flavors for Python 2 and 3 default
# versions, where applicable.
#
# noflavors - Disable automatic creation of flavors if they would
# otherwise be created and they are not wanted.
#
# allflavors - Generate flavors for all possible versions and not
# simply the default ones.
#
# optsuffix - Set PKGNAMESUFFIX to PYTHON_PKGNAMESUFFIX if not the
# default python version.
#
# distutils - Use distutils as do-configure, do-build and
# do-install targets.
# do-install targets. implies flavors.
#
# autoplist - Automatically generates the packaging list for a
# port that uses distutils when defined.
......@@ -235,9 +251,19 @@ _PYTHON_RELPORTDIR= lang/python
# Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME>
.for var in ${USE_PYTHON}
_PYTHON_FEATURE_${var:tu}= yes
_PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g}
.endfor
# distutils automatically generates flavors depending on the supported
# versions.
.if defined(_PYTHON_FEATURE_DISTUTILS)
_PYTHON_FEATURE_FLAVORS= yes
.endif
.if defined(_PYTHON_FEATURE_NOFLAVORS)
.undef _PYTHON_FEATURE_FLAVORS
.endif
# Make sure that no dependency or some other environment variable
# pollutes the build/run dependency detection
.undef _PYTHON_BUILD_DEP
......@@ -307,6 +333,7 @@ PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT}
PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT}
.endif
# Keep this before the FLAVOR selection to get the meta port dependency.
.if ${_PYTHON_ARGS} == "2"
_PYTHON_ARGS= ${PYTHON2_DEFAULT_VERSION:S/^python//}
_WANTS_META_PORT= 2
......@@ -372,6 +399,60 @@ IGNORE= needs an unsupported version of Python
.endif
.endif # defined(_PYTHON_VERSION_NONSUPPORTED)
# Automatically generates FLAVORS if empty
.if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS)
. undef _VALID_PYTHON_VERSIONS
. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS}
__VER= ${ver}
. if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \
${__VER} < ${_PYTHON_VERSION_MINIMUM})) && \
!(!empty(_PYTHON_VERSION_MAXIMUM) && ( \
${__VER} > ${_PYTHON_VERSION_MAXIMUM}))
. if empty(_VALID_PYTHON_VERSIONS:M${ver})
_VALID_PYTHON_VERSIONS+= ${ver}
. endif
. endif
. endfor
# Get all possible flavors depending on version requirements
. if defined(_VALID_PYTHON_VERSIONS)
_ALL_PYTHON_FLAVORS= ${_VALID_PYTHON_VERSIONS:S/.//:S/^/py/}
. else
_ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/}
. endif
# Decide how many flavors we want. By default, only generate the default
# versions.
. if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS)
FLAVORS= ${_ALL_PYTHON_FLAVORS}
. else
. for _v in ${PYTHON3_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON_DEFAULT}
_f= py${_v:S/.//}
. if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}}
FLAVORS:= ${_f} ${FLAVORS}
. endif
. endfor
. endif
. if !empty(FLAVORS) && empty(FLAVOR)
FLAVOR= ${FLAVORS:[1]}
. endif
.endif
.if ${FLAVOR:Mpy[23]*}
_PYTHON_VERSION= ${FLAVOR:S/py//:C/(.)/\1./}
.endif
.if !empty(FLAVOR) && ${_PYTHON_VERSION} != ${PYTHON_DEFAULT}
.if defined(_PYTHON_FEATURE_OPTSUFFIX)
PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX}
.endif
.endif
# To avoid having dependencies with @ and empty flavor:
.if empty(FLAVOR)
PY_FLAVOR= ${PYTHON_VERSION:S/^python/py/:S/.//}
.else
PY_FLAVOR= ${FLAVOR}
.endif
# Pass PYTHON_VERSION down the dependency chain. This ensures that
# port A -> B -> C all will use the same python version and do not
# try to find a different one, if the passed version fits into
......@@ -460,6 +541,14 @@ PYTHON_PYOEXTENSION= opt-1.pyc
# - it uses USE_PYTHON=distutils
#
.if defined(_PYTHON_FEATURE_CYTHON)
BUILD_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
.endif
.if defined(_PYTHON_FEATURE_CYTHON_RUN)
RUN_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
.endif
.if defined(_PYTHON_FEATURE_CONCURRENT)
_USES_POST+= uniquefiles:dirs
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION}
......@@ -483,8 +572,8 @@ UNIQUE_FIND_SUFFIX_FILES= \
_CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
.if defined(_PYTHON_FEATURE_DISTUTILS) && \
${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/${PYTHON_PKGNAMEPREFIX}setuptools
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/${PYTHON_PKGNAMEPREFIX}setuptools
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
.endif
# distutils support
......@@ -565,9 +654,32 @@ CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}"
CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER}
# Python 3rd-party modules
PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game
PYNUMERIC= ${PYTHON_SITELIBDIR}/Numeric/Numeric.py:math/py-numeric
PYNUMPY= ${PYTHON_SITELIBDIR}/numpy/core/numeric.py:math/py-numpy
PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR}
PYNUMERIC= ${PYTHON_SITELIBDIR}/Numeric/Numeric.py:math/py-numeric@${PY_FLAVOR}
PYNUMPY= ${PYTHON_SITELIBDIR}/numpy/core/numeric.py:math/py-numpy@${PY_FLAVOR}
# Common Python modules that can be needed but only for some versions of Python.
.if ${PYTHON_REL} < 3400
PY_ENUM34= ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34@${PY_FLAVOR}
PY_ENUM_COMPAT= ${PYTHON_PKGNAMEPREFIX}enum-compat>0:devel/py-enum-compat@${PY_FLAVOR}
PY_PATHLIB= ${PYTHON_PKGNAMEPREFIX}pathlib>0:devel/py-pathlib@${PY_FLAVOR}
.else
PY_ENUM34=
PY_ENUM_COMPAT=
PY_PATHLIB=
.endif
.if ${PYTHON_REL} < 3300
PY_IPADDRESS= ${PYTHON_PKGNAMEPREFIX}ipaddress>0:net/py-ipaddress@${PY_FLAVOR}
.else
PY_IPADDRESS=
.endif
.if ${PYTHON_REL} < 3200
PY_FUTURES= ${PYTHON_PKGNAMEPREFIX}futures>0:devel/py-futures@${PY_FLAVOR}
.else
PY_FUTURES=
.endif
# dependencies
.if defined(_PYTHON_BUILD_DEP)
......
......@@ -5,6 +5,20 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20171130:
AFFECTS: */py*
AUTHOR: mat@FreeBSD.org
Ports using Python via USES=python are now flavored. All the py3-* ports
have been removed and folded into their py-* master ports.
People using Poudriere and binary packages do not have to do anything.
For other people, to build the Python 3.6 version of, for example,
databases/py-gdbm, you need to run:
# make FLAVOR=py36 install
20171126:
AFFECTS: users of security/p5-openxpki
AUTHOR: dbaio@FreeBSD.org
......
......@@ -23,8 +23,7 @@
SUBDIR += orca
SUBDIR += py-atspi
SUBDIR += py-papi
SUBDIR += py3-atspi
SUBDIR += py3-speech-dispatcher
SUBDIR += py-speech-dispatcher
SUBDIR += qt4-accessible
SUBDIR += redshift
SUBDIR += rubygem-atk
......
......@@ -19,7 +19,7 @@ RUN_DEPENDS= gsettings-desktop-schemas>=3.2.0:devel/gsettings-desktop-schemas \
at-spi2-core>=2.1.5:accessibility/at-spi2-core
NO_ARCH= yes
USES= gettext gmake pkgconfig python:3 shebangfix tar:xz
USES= gettext gmake pkgconfig python:3.4+ shebangfix tar:xz
USE_GNOME= gtk30 intlhack py3gobject3
INSTALLS_ICONS= yes
GNU_CONFIGURE= yes
......
......@@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libclutter-glx-1.0.so:graphics/clutter \
libgee-0.8.so:devel/libgee \
libxklavier.so:x11/libxklavier
RUN_DEPENDS= py2?-atspi>=2.1.91:accessibility/py-atspi
RUN_DEPENDS= py2?-atspi>=2.1.91:accessibility/py-atspi@${PY_FLAVOR}
USES= gettext gmake gnome libtool pathfix pkgconfig python:2 \
shebangfix tar:xz
......
......@@ -10,16 +10,16 @@ DIST_SUBDIR= gnome3
MAINTAINER= gnome@FreeBSD.org
COMMENT= Scriptable screen reader
BUILD_DEPENDS= py3?-dbus>=0:devel/py3-dbus \
py3?-xdg>=0:devel/py3-xdg \
py3?-cairo>=0:graphics/py3-cairo \
BUILD_DEPENDS= py3?-dbus>=0:devel/py-dbus@${PY_FLAVOR} \
py3?-xdg>=0:devel/py-xdg@${PY_FLAVOR} \
py3?-cairo>=0:graphics/py-cairo@${PY_FLAVOR} \
itstool:textproc/itstool
LIB_DEPENDS= libatspi.so:accessibility/at-spi2-core
RUN_DEPENDS= py3?-dbus>=0:devel/py3-dbus \
py3?-speech-dispatcher>=0:accessibility/py3-speech-dispatcher \
py3?-atspi>=0:accessibility/py3-atspi \
py3?-xdg>=0:devel/py3-xdg \
py3?-cairo>=0:graphics/py3-cairo
RUN_DEPENDS= py3?-dbus>=0:devel/py-dbus@${PY_FLAVOR} \
py3?-speech-dispatcher>=0:accessibility/py-speech-dispatcher@${PY_FLAVOR} \
py3?-atspi>=0:accessibility/py-atspi@${PY_FLAVOR} \
py3?-xdg>=0:devel/py-xdg@${PY_FLAVOR} \
py3?-cairo>=0:graphics/py-cairo@${PY_FLAVOR}
# conflict with py*-json-py because orca uses the json from python itself
# and py*-json-py shadows this.
......@@ -27,7 +27,7 @@ CONFLICTS= py*-json-py-[0-9]*
PORTSCOUT= limitw:1,even
NO_ARCH= yes
USES= gettext gmake gnome pathfix pkgconfig python:3 tar:xz
USES= gettext gmake gnome pathfix pkgconfig python:3.4+ tar:xz
USE_GNOME= gtk30 py3gobject3 intlhack
INSTALLS_ICONS= yes
GNU_CONFIGURE= yes
......
......@@ -19,8 +19,16 @@ RUN_DEPENDS= ${LOCALBASE}/libexec/at-spi2-registryd:accessibility/at-spi2-core
CONFLICTS= at-spi-1.[0-9]*
PORTSCOUT= limitw:1,even
USES= gettext gmake gnome localbase pathfix pkgconfig python:2 tar:xz
USES= gettext gmake gnome localbase pathfix pkgconfig python tar:xz
USE_PYTHON= flavors
.if ${FLAVOR:Upy27:Mpy2*}
USE_GNOME= intlhack pygobject3
.else
USE_GNOME= intlhack py3gobject3
.endif
py34_PLIST= ${.CURDIR}/pkg-plist-py3
py35_PLIST= ${.CURDIR}/pkg-plist-py3
py36_PLIST= ${.CURDIR}/pkg-plist-py3
GNU_CONFIGURE= yes
.include <bsd.port.mk>
# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
# $FreeBSD$
PORTNAME= atspi
PORTVERSION= 2.24.0
CATEGORIES= accessibility x11-toolkits python
MASTER_SITES= GNOME/sources/pyatspi/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= pyatspi-${PORTVERSION}
DIST_SUBDIR= gnome3
MAINTAINER= gnome@FreeBSD.org
COMMENT= Python3 API for the D-BUS based SPI framework
LICENSE= LGPL20
RUN_DEPENDS= ${LOCALBASE}/libexec/at-spi2-registryd:accessibility/at-spi2-core
CONFLICTS= at-spi-1.[0-9]*
PORTSCOUT= limitw:1,even
NO_ARCH= yes
USES= gettext gmake gnome localbase pathfix pkgconfig python:3 tar:xz
USE_GNOME= intlhack py3gobject3
GNU_CONFIGURE= yes
.include <bsd.port.mk>
TIMESTAMP = 1491080637
SHA256 (gnome3/pyatspi-2.24.0.tar.xz) = e7ef47a5d387fdc64a01722ef2bcced54c4d6b225fbe34867189e1f88ff0a692
SIZE (gnome3/pyatspi-2.24.0.tar.xz) = 298228
This is the Gnome Accessibility Project's Assistive Technology
Service Provider Interface. It allows accessibility applications
and assistive technologies to announce their respective existence
to each other.
This port is the Python API to interface with the D-BUS based SPI framework.
WWW: http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
......@@ -42,10 +42,10 @@ RANDR_CONFIGURE_ENABLE= randr
VIDMODE_USE= XORG=xxf86vm
VIDMODE_CONFIGURE_ENABLE= vidmode
GUI_USES= python
GUI_USES= python:2.7
GUI_CONFIGURE_ENABLE= gui
GUI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gtk2>0:x11-toolkits/py-gtk2 \
${PYTHON_PKGNAMEPREFIX}xdg>0:devel/py-xdg
GUI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gtk2>0:x11-toolkits/py-gtk2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xdg>0:devel/py-xdg@${PY_FLAVOR}
GNOME_CONFIGURE_ENABLE= gnome-clock
GNOME_USE= GNOME=glib20,gconf2
......
......@@ -92,8 +92,9 @@ PORTSCOUT= ignore:1
NO_ARCH= yes
USES+= python:3.3+
USE_PYTHON= flavors
LIB_DEPENDS+= libspeechd.so:accessibility/speech-dispatcher
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py3-xdg
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py-xdg@${FLAVOR}
.endif
......
......@@ -189,7 +189,6 @@
SUBDIR += py-rjsmin
SUBDIR += py-warctools
SUBDIR += py-xopen
SUBDIR += py3-libarchive-c
SUBDIR += qpress
SUBDIR += quazip
SUBDIR += quazip-qt5
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment