Commit graph

87 commits

Author SHA1 Message Date
Sunpoet Po-Chuan Hsieh
c9a5d6d3d6 Update PY_TYPING
devel/py-typing-extensions requires py-typing 3.7.4+.
2019-08-04 16:11:10 +00:00
Kubilay Kocak
ac16e5c894 Uses/python.mk: Clarify language, messaging and usage for <version-spec>
Make it clear that <version-spec> is a declarative not imperative
specification to declare what version of Python a port or software
*supports*, not the versions it should *use*.

The version that gets selected is a function of Python.mk, DEFAULT_VERSIONS
which change over time, and can be overridden or otherwise set by the user.

While I'm here, add a special note about bare USES=python (without a
<version-spec>), which is likely to be deprecated at some point down the
line. In the meantime, describe what the semantics of not specifying a
<version-spec> entails, and encourage minimisation of its use where
appropriate.

Approved by:	koobs (python, maintainer)
2019-07-03 07:31:01 +00:00
Wen Heping
43633b0725 - Update python version in comment, remove deprecated version. 2019-07-03 06:35:48 +00:00
Sunpoet Po-Chuan Hsieh
f7fa6c5595 Update PY_FUTURES
security/theonionbox requires py-futures>=3.2.
2019-06-23 19:21:24 +00:00
Sunpoet Po-Chuan Hsieh
d8cff3e56b Introduce PY_TYPING and simplify Makefile
Since devel/py-promise requires 3.6.4+, the minimal version is set to 3.6.4.

With hat:	python
2019-05-31 10:00:20 +00:00
Sunpoet Po-Chuan Hsieh
4ae562dd77 Update comment for PYTHON_PKGNAMESUFFIX
The deprecated comment was added in r364450 (bsd.python.mk to Uses/python.mk transition) but it is not.
2019-04-27 18:27:43 +00:00
Antoine Brodin
8779d06e2c Remove PYTHON_PYOEXTENSION from plist substitutions
With hat:	portmgr
2019-04-25 15:21:51 +00:00
Tobias Kortkamp
b543464063 Mk/Uses/python.mk: Flag unknown USES=python args and unknown USE_PYTHON features
PR:		235901
Approved by:	mat
Differential Revision:	https://reviews.freebsd.org/D19569
2019-04-18 13:16:44 +00:00
Mathieu Arnold
f5aa2e9f2f PYTHON_VERSION cannot be changed, use DEFAULT_VERSIONS.
PR:		224024
2019-01-16 15:13:51 +00:00
Rene Ladan
acddeb4e12 Unregister Python 3.4, it expired today. 2018-12-18 09:19:03 +00:00
Sunpoet Po-Chuan Hsieh
ff7216bdbc Update PYMAGICTAG
imp.get_tag() is deprecated since version 3.4.
Use sys.implementation.cache_tag directly starting in Python 3.3.

Reference:	https://docs.python.org/3/library/imp.html#imp.get_tag
2018-11-25 17:11:52 +00:00
Sunpoet Po-Chuan Hsieh
af96ace6c0 Update PEP link 2018-11-03 22:26:41 +00:00
Martin Wilke
fb3d7e4971 - Finish up lang/python37 import
- Added python37 docs
- Added python37 support to Mk/

Reviewed by:	bapt
Approved by:	bapt (portmgr)
Differential Revision:	https://reviews.freebsd.org/D16159
2018-07-06 16:11:14 +00:00
Jan Beich
297facc037 devel/cmake: allow consumers to qualify boost_python version
PR:		227428
Exp-run by:	antoine
2018-04-18 13:58:15 +00:00
Jan Beich
cc95712fbe devel/boost-*: update to 1.67.0
Changes:	http://www.boost.org/users/history/version_1_67_0.html
PR:		227427
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D15030
2018-04-18 13:57:42 +00:00
Sunpoet Po-Chuan Hsieh
de4090a01c Remove PYNUMERIC
It's only used by 1 port (devel/py-fortran).
2018-02-28 15:12:57 +00:00
Antoine Brodin
bee759de61 Remove support for deprecated USES=python:2 and USES=python:3
PR:		225752
With hat:	portmgr
2018-02-26 19:33:21 +00:00
Mathieu Arnold
f6e7f26602 devel/boost-python-libs got forgotten in the python flavorization, fix
this oversight.

Reviewed by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D14368
2018-02-15 12:34:49 +00:00
Bryan Drewery
3036a660bb Remove leading newline to FLAVORS.
Approved by:	portmgr (implicit)
2018-02-06 20:49:09 +00:00
Mathieu Arnold
8a81735222 Add a USES=python:patch for when Python is needed during the patch
phase.

Sponsored by:	Absolight
2018-01-25 12:36:54 +00:00
Mathieu Arnold
7db6ff5279 Describe when allflavors should be used.
Sponsored by:	Absolight
2018-01-22 19:59:31 +00:00
Mathieu Arnold
8cd72097ee Remove PYTHON*_DEFAULT_VERSION. 2018-01-21 10:51:29 +00:00
Mathieu Arnold
bf406b4d24 Enhance USES=uniquefiles to be more generic.
This allows to have more complex renaming schemes.  Until now, it could
only add a prefix or a suffix, but this was not working at all for man
pages, because it would give man/man1/pyfoo.1.gz-2.7 or
man/man1/pyfoo-1-2.7.gz.  With this change, a man page will be correctly
renamed to man/man1/pyfoo-2.7.1.gz.

Unfix ports that were already handling man pages.

PR:		220214
Submitted by:	Fukang Chen (previous patch)
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D13444
2017-12-19 16:23:48 +00:00
Mathieu Arnold
8113a6f477 Rework PY_FLAVOR to always work.
Before this, it could have been set to the current flavor of the port
that may not have been related to Python at all.

This of course never came up during development because at that time,
the only flavors were the Python flavors.

Reported by:	dbn
Sponsored by:	Absolight
2017-12-14 13:48:58 +00:00
Mathieu Arnold
986d88d505 Add a DEV_WARNING about some hypotetical case.
Sponsored by:	Absolight
2017-12-12 12:31:10 +00:00
Mathieu Arnold
477fb04a27 Limit matching Python flavors to two digits.
Sponsored by:	Absolight
2017-12-12 11:40:45 +00:00
Mathieu Arnold
4c26d3c024 Make USE_PYTHON=concurrent flavors friendly.
Before, it would only create the default symlink if the Python version
was the default Python version.  Change that to if the Python flavor is
the default flavor.

PR:		224242
Sponsored by:	Absolight
2017-12-11 12:41:56 +00:00
Mathieu Arnold
2cd9e57d75 Remove extra .endif.
Reported by:	antoine
Sponsored by:	Absolight
2017-12-04 15:43:36 +00:00
Mathieu Arnold
6063af74e8 Add a USES=python:env, that will not add a dependency on Python.
It has the same effect than setting PYTHON_NO_DEPENDS, but in a more
compact way.

Sponsored by:	Absolight
2017-12-04 15:27:29 +00:00
Mathieu Arnold
e7c64ad660 Add a note about USE_PYTHON=optsuffix being a kludge.
Sponsored by:	Absolight
2017-12-04 11:26:47 +00:00
Mathieu Arnold
c3feeef2c1 Depend on pkgnames and not files, always better.
Sponsored by:	Absolight
2017-12-04 11:17:23 +00:00
Mathieu Arnold
9b3f71316a Deprecate USES=python:2 and USES=python:3
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D13291
2017-12-04 11:07:10 +00:00
Mathieu Arnold
c891fd5d24 Correctly fix the Python 3 being the default but in fact not problem.
Sponsored by:	Absolight
2017-12-04 11:07:07 +00:00
Mathieu Arnold
ae164d1dfd Add a WARNING for people trying to do clever but bad things with Python
versions.

Sponsored by:	Absolight
2017-12-04 11:07:04 +00:00
Dmitry Marakasov
9a7c47672e Fix default python flavor wrt python version
There's a flaw in FLAVOR selection logic which makes python FLAVOR
default to py27 even with DEFAULT_VERSIONS=python=3.6. Fix this and
generate FLAVOR based on PYTHON_DEFAULT, PYTHON2_DEFAULT, PYTHON3_DEFAULT
(in that order) similar to how it's done in other parts of python.mk.
This does not affect FLAVOR in default setup (py27 remains), but
if python default version is modified, it will now properly affect FLAVOR.

Approved by:	portmgr (antoine)
Differential Revision:	D13326
2017-12-03 20:03:09 +00:00
Mathieu Arnold
551be3c723 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
2017-11-30 15:50:30 +00:00
Rene Ladan
3d0c93eb6a Remove Python 3.3 from the Ports Framework. 2017-09-03 10:36:15 +00:00
Bryan Drewery
ec65ac0994 Specifying an invalid PYTHON_VERSION against its USES should be IGNORED.
The port's own USES may note that is only supports certain versions.  If it
is attempted to build an unsupported version there's no reason to even
try.  Rather than giving a WARNING, actually mark it IGNORE.

Currently this should only impact devel/py3-enum34 which does not support
the default python3 version of 3.6.

With hat:	portmgr
2017-06-17 23:26:58 +00:00
Bryan Drewery
4745d5c87d Don't pass the default version in DEPENDS_ARGS.
This greatly simplifies handling for Poudriere.

With hat:	portmgr
2017-06-06 00:28:56 +00:00
Antoine Brodin
d3b29b8f76 Use POSIX conformant expressions with grep(1)
PR:		218690
Submitted by:	Kyle Evans
With hat:	portmgr
2017-04-21 19:35:24 +00:00
Antoine Brodin
20b3a34a02 Rename python setuptools ports to better match other python ports
Reviewed by:	mat, sunpoet
With hat:	portmgr
Differential Revision:	https://reviews.freebsd.org/D9983
2017-03-16 19:23:48 +00:00
Sunpoet Po-Chuan Hsieh
e730d999d3 Add more PLIST_SUB to Mk/Uses/python.mk
- Add PYTHON_PYOEXTENSION and PYTHON_SUFFIX
- Add PYTHON2 and PYTHON3
- Respect PYTHON_VERSION
- Rename PYOEXTENSION to PYTHON_PYOEXTENSION

This change would help:
- Build databases/postgresql*-plpython with Python 3
  (It has PLIST issue since bsd.python.mk to Uses/python.mk transition)
- Simplify Makefile

PR:		205807
Differential Revision:	https://reviews.FreeBSD.org/D4758
Exp-run by:	antoine
2017-01-07 21:42:28 +00:00
Wen Heping
234f3ad658 - Repocopy lang/python35 --> lang/python36 and update to 3.6.0 2016-12-25 15:08:35 +00:00
Antoine Brodin
7fca73cfef Change the default version of python3 from 3.4 to 3.5
Thanks to Ruslan Makhmatkhanov for doing all the fixes

PR:		204519
With hat:	portmgr
2016-10-14 19:50:00 +00:00
Mathieu Arnold
0761532ec5 Always include bsd.default-versions.mk in bsd.port.mk.
The variable defined in it are now always available after including
bsd.port.pre.mk.

PR:		210666
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6933
2016-08-03 12:09:37 +00:00
Antoine Brodin
1f14e228b1 Reduce a little bit foot shooting for people installing python 3 ports using
PYTHON_ABIVER/PYTHON_INCLUDEDIR, when they use default options for
lang/python3x, by providing a reasonable default value to PYTHON_ABIVER

With hat:	portmgr
2016-06-25 19:51:32 +00:00
Antoine Brodin
28b17725ab Remove ${PORTSDIR} from python _DEPENDS 2016-04-28 12:17:09 +00:00
Mathieu Arnold
d5e588bc6e Make all the targets in USES use the _USES_* helpers.
It is left as an exercise to the reader to reorder some of those targets
to fix some small problems, and to add a comment about why each target
is ran when it is ran.

Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D5717
2016-04-22 09:24:34 +00:00
Mathieu Arnold
9097255acf Try to be more helpful to our users, and keep all the possible versions
close to their default value in Mk/bsd.default-versions.mk.

Sponsored by:	Absolight
2016-04-14 13:34:25 +00:00
Baptiste Daroussin
421767bd88 Remove the now unneeded ${PORTSDIR} from dependency definition in
The infrastructure Makefiles

PR:		206569
Exp run by:	antoine
Differential Revision:	D5047
2016-03-27 01:23:25 +00:00