Commit graph

44 commits

Author SHA1 Message Date
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
Bryan Drewery
54e86d8d01 For PYTHON_NO_DEPENDS don't pass PYTHON_VERSION to dependencies.
The PYTHON_NO_DEPENDS only really makes sense in meta ports, where passing
the PYTHON_VERSION doesn't make sense.  The ports listed will pick up
USES+=python and the default version as needed.

This fixes depending on both lang/python2 and lang/python3 in a meta package.
2016-02-19 20:44:52 +00:00
Ruslan Makhmatkhanov
a5fd273ab4 Update examples to exclude version 3.2
With hat:		python
2016-02-02 20:21:47 +00:00
Ruslan Makhmatkhanov
ed63d28c08 Remove expired lang/python32
Python 3.2 has reached it's EOL. Please update to Python 3.5

With hat:	python
2016-02-02 20:16:34 +00:00
Sunpoet Po-Chuan Hsieh
929b0596d0 - Remove _PYTHON_CMD
PR:		206380
Submitted by:	John Hein <z7dr6ut7gs@snkmail.com>
2016-01-22 11:33:58 +00:00
Sunpoet Po-Chuan Hsieh
fc996dfe53 - Sort PYTHON_* knobs 2016-01-02 17:30:28 +00:00
Kubilay Kocak
30e7a4173b Mk/Uses/python.mk: Add support for optional 'test' argument
Some ports may need to use Python for their testing suite but otherwise
do not need it at all (ie, not for build or run). This patch adds
support for the test argument to be used in the USES clause, such as
python:3.2+,test. This enables the relevant Python environment and
modifies TEST_DEPENDS as necessary.

For non-Python ports that use Python as their testing suite, add
python:<ver>,test as required to the USES clause.

PR:			205616
Submitted by:		Brendan Molloy <brendan+freebsd bbqsrc net>
Reviewed by:		mat, miwi, koobs, antoine
Approved by:		koobs (python)
Differential Revision:	https://reviews.freebsd.org/D4711
2016-01-02 15:24:37 +00:00
John Marino
6256117d69 lang/python27(3*), Mk/Uses/python.mk: remove make spawn
There are some inefficiencies in python.mk that significantly slow down
full tree scanning.  The use of bmake to obtain the current version of
a specific python is responsible for the majority of the slow done.

This commit splits out the PYTHON_PORTVERSION definition (which is the
same as the lang/python* PORTVERSION) into separate files.  With this
change, python.mk can simple include the makefile fragment instead of
spawning a new instance of make.

Different Revision:	https://reviews.freebsd.org/D4660
Approved by:		antoine (python), mva (python)
2015-12-29 12:03:09 +00:00
Antoine Brodin
d05e4290c0 Remove PYTHON_PORTVERSION guards since it's no longer exported
With hat:	portmgr
2015-12-27 16:44:32 +00:00
Antoine Brodin
c6ef4747ef Do not cache PYTHON_PORTVERSION, it is not invariant between ports 2015-12-25 21:55:34 +00:00
Bryan Drewery
ab43229f76 Fix partial tree checkouts with 'all-depends-list', 'make clean', etc, after
inclusion of the ports_env feature into that handling around r399791.

With hat:	portmgr
Reported by:	ian, lev
2015-11-09 18:52:19 +00:00
Bryan Drewery
95e25b27ad Avoid redundantly looking up python command executions for dependency calculation.
This gets all-depends-list in x11/kde4 down to 30 seconds after the 52->41
second improvement in r399703.

With hat:	portmgr
2015-10-19 21:10:56 +00:00
Baptiste Daroussin
8cea2b0147 Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched
This gives more time for tools to get updated, available in packages etc before
bothering users
2015-10-15 07:36:38 +00:00
Baptiste Daroussin
869e1f27d0 Drop the necessity to add ${PORTSDIR} to dependency line
Modify make describe to automatically prepend ${PORTSDIR} if the path for the
port is not absolute

Checked with poudriere, portmaster, portupgrade

PR:		203685
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D3866
2015-10-14 16:49:35 +00:00
Ruslan Makhmatkhanov
b654068d0e textproc/py-xml: remove port
This package has been included into python standard library since python 2.2 or
2.0, but some of our ports used apis not available in stock python xml package.
Now all the issue are fixed and we can finally remove this port.

It is dead upstream and because of it's invasive nature it may break innocent
ports while installed (there were known issues for Eric and Docutils), so it was
removed in most distributions years ago. There is comprehensive summary on
reasons why PyXML was removed at Fedora Project [1]. The same reasons are also
applicable to our tree.

[1] https://fedoraproject.org/wiki/Features/RemovePyXML
2015-09-16 14:40:24 +00:00
Antoine Brodin
0622d6683a Since PEP 0488 and python 3.5, pyo files are eliminated and bytecode files
for level 1 optimization have opt-1.pyc extension
Adjust USE_PYTHON=py3kplist to handle this

Tested by:	koobs
2015-09-14 12:26:28 +00:00
Kubilay Kocak
dafc3395c8 Uses/python.mk: Fix PYTHON_REL for pre-release Python versions
Modify the PYTHON_REL variable assignment in python.mk so that it
can support PORTVERSION's that have non-integer suffixes such as
the current lang/python35 version (PORTVERSION currently 3.5.0.r3).

Currently, ports that use PYTHON_REL while DEFAULT_VERSIONS is set to
3.5, fail to build with the following make error:

make: "/usr/ports/Mk/Uses/python.mk" line 503:
warning: String comparison operator should be either == or !=
make: "/usr/ports/Mk/Uses/python.mk" line 503:
Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST))

This is caused by a non-integer value ("r3") in PYTHON_REL.

While I'm here, add a comment block to be clear on what we
(currently) want to achieve.

PR:			203093
Reported by:		Andrew Berg (aberg010 my.hennepintech.edu)
Reviewed by:		antoine
MFH:			2015Q3
Differential Revision:	https://reviews.freebsd.org/D3662
2015-09-14 08:28:57 +00:00
Kubilay Kocak
7142ad4179 [NEW] lang/python35: Welcome Python 3.5.x! (Note: RC3)
FreeBSD welcomes Python 3.5 (early, pre-release) to the Ports tree,
with 3.5.0 release candidate 3!

Please test this port and Python 3.5 profusely. If you notice issues,
please report them upstream at: https://bugs.python.org to ensure a
robust upcoming 3.5.0 release.

Whats New in Python 3.5:

 * https://docs.python.org/3.5/whatsnew/3.5.html

Python 3.5 Release Schedule (PEP 478)

 * http://www.python.org/dev/peps/pep-0478

Note: This port retires an old fcntlmodule.c patch, possibly
temporarily. User impact *should* be zero. For more information
see: https://bugs.python.org/issue25026

Requested by:	Webair Inc :)
2015-09-08 16:08:13 +00:00
Max Brazhnikov
22e7d267d7 Pass the default Python version (or the version required by port)
for CMake based ports.  By default CMake picks up the highest
available version of Python package, therefore ports which use CMake
may fail to build or link to different Python library than one could
expect (e.g. bugs 199685, 200518).
In essence this commit reverts r366996.

PR:		168159
Exp-run by:	antoine
Approved by:	mva
2015-06-10 09:23:54 +00:00
Antoine Brodin
1b85bc9332 Switch PYTHON_REL from a 3 digits number to a 4 digits number to handle
python 2.7.10

Differential Revision:	https://reviews.freebsd.org/D2639
Reviewed by:	sunpoet, mva
2015-05-26 16:47:02 +00:00
Bryan Drewery
d06d8405bd Add back support for PYTHON_NO_DEPENDS that was lost in the USES=python
conversion in r364450.  This feature is still very useful for meta packages
to be able to easily depend on py-* packages using the correct PY_* vars.
For the sake of POLA retain the same name so previously working ports just work.
2015-05-15 03:54:47 +00:00
Marcus von Appen
beb88abfed - Remove support for deprecated python bits from the ports
framework. The following knobs are not supported anymore:

    USE_PYTHON=<yes|version+-|-version|version-version>
    USE_PYTHON_BUILD
    USE_PYTHON_RUN
    USE_PYDISTUTILS
    PYDISTUTILS_AUTOPLIST
    PYTHON_PY3K_PLIST_HACK
    PYDISTUTILS_NOEGGINFO
    PYTHON_CONCURRENT_INSTALL
    USE_PYTHON_PREFIX

PR: 196477
Differential Revision: https://reviews.freebsd.org/D1416
Exp-run: antoine
Reviewed by: antoine
Approved by: portmgr (antoine)
With hat: python
2015-01-07 17:22:07 +00:00
Marcus von Appen
885f50de5a - Second attempt to fix the python version usage on single port builds
If a port requests a different python version from the one being the
  default or provided at the command line, certain directories as well
  as plist entries will use the wrong python version value (the one
  being the default or provided at the command line), instead of the
  value, the port requests.

PR:		194605
exp-run by:	antoine@
With hat:	python@
2014-10-27 18:58:21 +00:00
Antoine Brodin
504fcb758d Revert r371447, this breaks important ports like devel/py-gobject
With hat:	portmgr
2014-10-24 22:31:07 +00:00
Marcus von Appen
9c1a554aba - Use the proper python version value within a single port build
If a port requests a different python version from the one being the
  default or provided at the command line, certain directories as well
  as plist entries will use the wrong python version value (the one
  being the default or provided at the command line), instead of
  the value, the port requests

Differential Revision:	https://reviews.freebsd.org/D963
With hat:	python@
2014-10-24 16:10:40 +00:00
Marcus von Appen
062e11b164 - Do not blindly assume PREFIX to be the same as PYTHONBASE, when creating the
egg-info entries for the plist

PR:		193811
Reported by:	6yearold@gmail.com
Exp-run by:	antoine@
With hat:	python@
2014-10-07 16:51:20 +00:00
Marcus von Appen
62480ffb2c - Mark INSTALLS_EGGINFO as unsupported
Differential Revision:	D843
Reviewed by:	gahr@, koobs@
Approved by:	bapt@ (portmgr)
2014-10-02 07:53:52 +00:00
Tijl Coosemans
fe837ee6c6 Change the way USES is handled:
- Loop over USES twice, once to define all *_ARGS variables and once to
  include Uses/*.mk.  This allows all Uses/*.mk to examine arguments given
  to other USES entries.
- Always define *_ARGS (possibly empty) and replace commas with spaces.

Similar for _USES_POST.

Adjust all Uses/*.mk:
- defined(u_ARGS) becomes !empty(u_ARGS)
- Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g}
- Some Uses/*.mk used ":" as argument separator instead of ",", but no port
  used this form
- Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which
  has no effect
- Uses/twisted.mk: simplify handling of the case where neither "build" nor
  "run" arguments have been specified

PR:		193931
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2014-09-28 16:36:31 +00:00
Marcus von Appen
6d91b534f2 - Fix awk issue in add-plist-post, if python 3.x is the default
PR:		193966
Submitted by:	corsmith@gmail.com
With hat: 	python@
2014-09-27 07:27:26 +00:00
Marcus von Appen
9e9266dead - Resolve relative paths, such as path/./file.py or path/../file.py for
USE_PYTHON=autoplist, which can occur, if relative paths are set in a
  setup.py script. Those cause pkg and QA sanity checks to misbehave.
- Remove @dirrm and @dirmmtry additions for USE_PYTHON=autoplist,
  USE_PYTHON=py3kplist and egg-info entries, if USES=python is set. pkg 1.3.8
  does not need those anymore.
- Add ${PYTHON_VER} to the PLIST_SUB defaults, if USES=python is set.

PR:		193885
Differential Revision:	D812
Reviewed by:	antoine@
Exp-run by:	antoine@
With hat:	python@
2014-09-25 21:01:57 +00:00
Antoine Brodin
40574a85c1 Fix man pages in ports using python autoplist after MANEXT removal 2014-09-03 15:49:09 +00:00
Raphael Kubo da Costa
68bc4af5c8 Update CMake to 3.0.1.
The 3.0 series is an incremental improvement over the previous 2.8 series
despite the major version number change. A list of important changes is
available at http://www.cmake.org/cmake/help/v3.0/release/3.0.0.html

On the porting side
* The minimum FreeBSD release we have to support in the ports tree is now
  recent enough that ports/168671 can finally be committed: instead of
  building and using CMake's own copies of bzip2, curl, expat, libarchive,
  liblzma and zlib, we use the versions in ports and/or the base system.

* CMake's documentation system has been changed and vastly improved at the
  cost of now depending on Sphinx. We still generate only man pages, but can
  start generating the HTML documentation in the future if desired.

* devel/cmake-gui now uses Qt5 instead of Qt4 and does not needlessly build
  the ncurses UI that is installed by devel/cmake itself.

* CMake commit 3816cd2 fixes a longstanding issue in the detection of the
  Python interpreter and its libraries, but requires us to revert a
  workaround for that in Mk/Uses/python.mk itself, effectively reverting
  the patch introduced by ports/168159.

* Similarly, a few ports had to be fixed manually due to CMake being
  stricter when parsing some files or the ports detecting Python the wrong
  way. Fortunately, they all had been fixed upstream so I just grabbed the
  appropriate commits and pointed to them in the patches.
  science/gnudatalanguage had to have its PORTREVISION bumped because
  switching to USES=cmake:outsource removed a few files from the plist that
  were not supposed to have been installed in the first place.

PR:		168671
PR:		192644
2014-09-02 12:59:54 +00:00
Baptiste Daroussin
8527bc1d3a Remove support for NO_STAGE
Mark all current non staged ports as BROKEN

Reviewed by:	antoine
Exp-run:	antoine
Differential Revision:	https://reviews.freebsd.org/D693
2014-09-01 05:43:02 +00:00
Marcus von Appen
6333852871 - Deprecate INSTALLS_EGGINFO
- Remove PYTHON_MASTER_SITES deprecation; the knob is completely gone and can
  not be tested for, since it does not get assigned by default

With hat:	python@
2014-08-17 10:36:08 +00:00
Marcus von Appen
5a65871ee8 - Fix USE_PYTHON knob handling. Features are to be separated with spaces, not
comma

With hat:	python@
2014-08-15 20:55:03 +00:00
Marcus von Appen
a382bbffeb - 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@
2014-08-14 17:04:30 +00:00
Marcus von Appen
54df1957a4 - Only print the python version mismatch warning, if a dependency or user set
PYTHON_VERSION explicitly. Otherwise, ports using a non-default version
  would always print the warning.

With hat:	python@
2014-08-10 08:48:41 +00:00
Marcus von Appen
900db324a3 Convert the Python framework bits to USES=python.
Please use USES=python instead of USE_PYTHON.

  USE_PYTHON=yes becomes USES=python
  USE_PYTHON=2.7+ becomes USES=python:2.7+
  USE_PYTHON_BUILD=3.3 becomes USES=python:3.3,build
  ...

A new PYTHON_FEATURES variable was added, which enables certain features for a
port and replaces some knobs at the same time;

  PYTHON_FEATURES=distutils replaces USE_PYDISTUTILS
  PYTHON_FEATURES=autoplist replaces PYDISTUTILS_AUTOPLIST
  PYTHON_FEATURES=py3kplist replaces PYTHON_PY3K_PLIST_HACK
  PYTHON_FEATURES=noegginfo replaces PYDISTUTILS_NOEGGINFO
  PYTHON_FEATURES=concurrent replaces PYTHON_CONCURRENT_INSTALL
  PYTHON_FEATURES=pythonprefix replaces USE_PYTHON_PREFIX

Some knobs have been deprecated and are to be removed in the near future:

  PYTHON_MASTER_SITES - use MASTER_SITE_PYTHON instead
  PYTHON_PKGNAMESUFFIX - use PYTHON_PKGNAMEPREFIX instead
  PYDISTUTILS_INSTALLNOSINGLE - deprecated without replacement

Some knobs have been removed completely:

  PYTHON_MASTER_SITE_SUBDIR
  PYTHON_DISTNAME
  PYTHON_WRKSRC

Several variables specific to the Python framework are no longer passed to the
build environment to avoid polluting dependency builds.

  PYTHON_VERSION is not passed to .MAKEFLAGS anymore
  PYTHON_DEFAULT_VERSION,
  PYTHON_DEFAULT_PORTVERSION and
  PYTHONBASE are not passed to the make environment anymore

The conversion required a couple of ports to be updated to fit the changes and
new requirements. Those included "bsd.python.mk" directly or contained checks
in places, for which the USES framework would fail to provide correct values.

Python modules directly using the upstream Python package (such as py-tkinter
or py-sqlite3) were updated to avoid using the now unnecessary and remmoved
knobs from "bsd.python.mk".

Phabric:	D399
exp-run:	167368 192357
PR:		167368 192357
Reviewed by:	antoine, wg
Exp-run award:	antoine
With hat:	python@
Approved by:	portmgr
2014-08-09 15:44:27 +00:00