1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
Commit Graph

213 Commits

Author SHA1 Message Date
Antoine Brodin
6155f1abb2 Fix reression after r361263, more than 200 python modules using
USE_PYDISTUTILS=yes but not using autoplist were orphaning their egginfo

With hat:	portmgr
2014-07-20 19:47:45 +00:00
Kubilay Kocak
26ae40b6bc lang/python27: Update to 2.7.8
The FreeBSD Python team welcomes Python 2.7.8 to the Ports tree!

Announcement: https://www.python.org/download/releases/2.7.8/
Changelog:    http://hg.python.org/cpython/raw-file/v2.7.8/Misc/NEWS

- Update to 2.7.8, update pkg-plist
- OPTIONS: Reorder and sort alphabetically
- OPTIONS: Make POSIX SEM(aphores) a DEFAULT (Hi binary package users!)
- OPTIONS: Add better descriptions for UCS2 and UCS4
- OPTIONS: Use options helpers
- Remove patch-CVE-2014-1912: upstream, was backported
- Remove patch-issue20374: upstream, was backported
- Rename patch-Doc__library__fcntl.rst: underscore convention
- Rename patch-Modules__fcntlmodule.c: underscore convention
- Patch: setup.py: Remove ncurses overrides and return to upstream code
- Patch: setup.py: Add partial backport for ossaudio OS checks
- pkg-message: Remove warning for POSIX Semaphores. They are now in
  GENERIC for FreeBSD 8.x 9.x, 10.x and tested well upstream
- pkg-message: No longer needs substitutions, remove .in suffix and
  SUB_FILES
- Rework and simplify the platformX mechanism, update pkg-plist
  accordingly
- Add regression-test target
- Deprecate NOPORTDATA, remove pkg-plist entries with %%PORTDATA%%
- Replace bsd.{pre,post}.mk with bsd.port.options.mk

Based on original patch submitted by wen@ and worked on by lwhsu@,
thank you!

PR:             191405
PR:             178301
PR:             171246
Phabric:        D364
Reviewed by:    antoine, bapt, mat, mva, wg
2014-07-14 07:20:40 +00:00
Marcus von Appen
9ec0761d6a Support for installations based on the easy_install setup.py target has
been removed from the Ports framework for Python software. The
PYEASYINSTALL_* knobs and support for USE_PYDISTUTILS=easy_install have
been removed.

Phabric:	D299
With hat:	python@
2014-07-08 16:14:33 +00:00
Marcus von Appen
057683f226 - Fix PYDISTUTILS_SETUP to use a proper argument list and avoid polluting the
PYDISTUTILS_*_ARGS with wrong flags.

PR:		191317
Phabric:	D270
Exp-run:	antoine
With hat:	python@
2014-06-28 06:59:48 +00:00
Antoine Brodin
7c7b6b6ef1 Make @dirrmtry handling in pkg_install closer to what pkg does
Original patch:	bapt
Phabric:	D215
Exp-run:	self, less orphans/leftovers with pkg_install with patch than without
		and no new failures with pkg
With hat:	portmgr
2014-06-20 21:03:02 +00:00
Raphael Kubo da Costa
37930125af PYTHON_PY3K_PLIST_HACK: Take @dirrmtry entries into account as well.
When using the plist hack to add __pycache__ entries for Python >= 3.2.0,
take @dirrmtry entries into account as well, otherwise if those directories
happen to contain __pycache__ subdirectories the latter will not be removed.

CR:		D191
PR:		190847
2014-06-18 19:37:49 +00:00
Marcus von Appen
434a1673f1 - Support relative paths below man/ for manpages, when using
PYDISTUTILS_AUTOPLIST. This is necessary for localized manpages, which do
  not install into the standard path man/manX, but into a locale-specific
  directory matching form man/<locale_subdirs>/manX.
  Some ports feature localized manpages - this change makes additional patches
  and plist hacks unnecessary.

With hat:	python@
2014-06-16 18:43:11 +00:00
Marcus von Appen
a9c3f17b93 Introduce a new PYTHON_CONCURRENT_INSTALL knob to support the parallel
installation of ports for different python versions.

If set to yes, the knob indicates that the port can be installed for different
python versions at the same time. The port will use a unique prefix for
certain directories using USES=uniquefiles:dirs (see the uniquefiles.mk Uses
for details about the directories). Binaries receive an additional suffix,
based on ${PYTHON_VER}.

With hat:	python@
2014-06-07 16:13:11 +00:00
Dmitry Sivachenko
0e33c724df Update python34 port 3.4.0 --> 3.4.1.
Reviewed by:	koobs
2014-06-02 12:36:51 +00:00
Rene Ladan
ef6c646bb3 Remove support for Python 3.1 from bsd.python.mk, it expired on 2014-06-01
Approved by:	python (mva)
2014-06-01 15:29:43 +00:00
Marcus von Appen
a406ee6e80 Handle non-ASCII encoded setup.py files properly, if the locale of the
execution environment does not match the encoding of the setup.py file. Simply
read everything in as binary data without trying to convert it to the matching
locale.
2014-05-31 08:14:24 +00:00
Antoine Brodin
c3dc6f69e9 When a port needs a python version in a specific range that current python
doesn't satisfy, prefer PYTHON2_DEFAULT or PYTHON3_DEFAULT over other
versions.
Previously, python34 was choosen despite python33 being the default python3.

Silence from:	python
With hat:	portmgr
2014-05-06 17:43:11 +00:00
Baptiste Daroussin
4a4ec28d37 Convert all :U to :tu and :L to :tl
Since FreeBSD 8.4 and FreeBSD 9.1 make(1) do support :tu and :tl as a
replacement for :U and :L (which has been marked as deprecated)

bmake which is the default on FreeBSD 10+ only support by default
:tu/:tl a hack has been added at the time to support :U and :L to ease
migration. This hack is now not necessary anymore

Note that this makes the ports tree incompatible with make(1) from
FreeBSD 8.3 or earlier

With hat:	portmgr
2014-05-05 09:45:36 +00:00
Kubilay Kocak
25fa2634a3 Mk/bsd.python.mk: Space to tabs in user message
Fix (replace) spaces with a tab in user message for valid Python versions.

Submitted by:	John Hein <john dot hein at microsemi dot com>
2014-04-12 03:07:31 +00:00
Sunpoet Po-Chuan Hsieh
9d89ae5c91 - Pet portlint: use PYTHON_DISTNAME instead of PYTHON_DISTFILE 2014-04-11 08:25:00 +00:00
Kubilay Kocak
51bf49a441 Welcome Python 3.4 to the FreeBSD Ports Tree!
The FreeBSD Python Team warmly welcomes Python 3.4 to the Ports tree:

- Add lang/python34
- Add devel/py-setuptools34
- Add Python 3.4.0 docs to lang/python-doc

Release Announcement and Major Features:

  https://www.python.org/download/releases/3.4.0/

This also marks the next stage of a cleaner, much-closer-to-upstream
approach to Python on FreeBSD, that builds upon the hard work of the
entire FreeBSD Python team over the last year.

This port is built "entirely" from scratch, retiring as much of the
legacy, workarounds, patches and hacks from the existing Python
ports as possible.

Of particular note: static + shared dual-build is gone, as it was flaky
at best, grossly untested upstream and caused more issues than it
solved. It is replaced by a shared build by default. The static python
library remains installed and usable.

Major changes in this structure are:

- Replace dual static and shared in-tree build with shared-only.
- Use options helpers
- Replace plat-freebsd* hacks with a lighter weight alternative
- Strip all libraries and shared extensions
- Only retain patches that are absolutely necessary
- Replace static disabled_module_list with one from upstream
- Retain NIS and sparc64 workarounds from python33
- Deprecate SEM option, no longer optional.
- Deprecate PTH option, no longer maintained or supported upstream
- Deprecate FPECTL option, no longer maintained or supported upstream
- Add upstream issue references & breadcrumb annotations where possible

Tested by:	many (Special thanks to Andrew Berg)
Reviewed by:	xmj, nemysis, antoine
2014-04-08 13:10:25 +00:00
Dmitry Sivachenko
79cd466b4d Update python33: 3.3.4 --> 3.3.5. 2014-03-10 11:28:55 +00:00
Sunpoet Po-Chuan Hsieh
df5fb71a8e - Fix following error message when "make update" with python{32,33} as default python interpreter
make[1]: "/usr/ports/Mk/bsd.python.mk" line 343: Malformed conditional (exists(${PYTHON_CMD}-config) && ${PORTNAME} != python33)
make[1]: Fatal errors encountered -- cannot continuemake: "/usr/ports/Mk/bsd.port.subdir.mk" line 123: warning: "make -V PYTHONBASE USE_PYTHON=1 -f /usr/ports/Mk/bsd.port.mk" returned non-zero status

Approved by:	antoine (portmgr)
2014-03-09 16:26:10 +00:00
Antoine Brodin
28a38d6cf8 Fix packaging of python32 and python33 when they are already installed
The ABIVER was appended twice to some files in the plist

Reported and tested by:	demon
2014-03-06 20:48:23 +00:00
Sunpoet Po-Chuan Hsieh
65a813492b - Add slave port of devel/py-setuptools for different python versions (27, 32 and 33)
- Update Mk/bsd.python.mk to use new devel/py-setuptools{27|32|33}

PR:		ports/187091
Submitted by:	sunpoet (myself)
Discussed with:	lwhsu, mva, koobs, crees
Exp-run by:	bdrewery
With hat:	python
MFH:		2014Q1
2014-03-06 16:33:17 +00:00
Kubilay Kocak
ea56f87d19 lang/python33: Update to 3.3.4
- Update to 3.3.4
- Update pkg-plist
- Remove patch-CVE-2014-1912 (upstream)
- Remove patch-issue20374 (upstream)
- Repatch and rename patch-Modules__fcntlmodule.c
- Add patch-issue-20695-Lib__test__test_urllibnet.py (tests) [1]
- Add regression-test target for QA

Changes: 3.3.4 - 09/02/2014

    http://docs.python.org/3.3/whatsnew/changelog.html#python-3-3-4

Extra:

- Update python-doc-html distinfo for Python 3.3 docs
- Update bsd.python.mk to support the new version

[1] http://bugs.python.org/issue20695
2014-03-04 12:38:02 +00:00
Kubilay Kocak
6a7e32d7ee Any python package that uses console_scripts in setup.py needs the
pkg_resources module from setuptools at run time. This generally means
anything that installs a CLI utility.

Package-only users do not get setuptools installed when they install
the packages of these ports currently, because USE_PYDISTUTILS=yes doesnt set
a RUN_DEPENDS on it.

This breaks console script invocation, with the following error:

Traceback (most recent call last):
  File "/usr/local/bin/<script-name>", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

The FreeBSD Python team has recently standardised on a consistent
installation pattern for all python software, whether pure-distutils or
setuptools based, and this run-time requirement is currently not being
satisfied, breaking ports that use that functionality.

This commit moves RUN_DEPENDS+=setuptools from the =easy_install *only*
case, to the default case. This does mean that py27-setuptools and
py33-setuptools cannot be installed concurrently, precluding dual stack
Python installations.

The FreeBSD Python team is working hard towards a future where  multiple
python and packages versions *can* be installed concurrently, but it is
not explicitly supported in the current state. Improvements to FreeBSD's
ports and package frameworks will help achieve that goal.

[1] http://lists.freebsd.org/pipermail/freebsd-python/2014-February/006592.html
[2] http://lists.freebsd.org/pipermail/freebsd-python/2014-February/006609.html

PR:		ports/186706
Reported by:	Scott Sturdivant <scott dot sturdivant at gmail.com>
Reviewed by:	antoine, rm, mva
MFH:		2014Q1
2014-02-16 14:41:43 +00:00
Rene Ladan
927de13ab9 Unregister lang/python26, it is expired and nothing depends on it anymore.
Reviewed by:	python (mva, rm)
Approved by:	portmgr-lurkers (mat)
2014-01-13 21:04:13 +00:00
Marcus von Appen
f002f3a384 - Remove lang/python as implicit build and run dependency from
bsd.python.mk

  Ports need to use a designated python interpreter, whether this
  is the default one chosen by the user (or provided by the system)
  and pulled in via USE_PYTHON[_BUILD|_RUN]=yes or an explicit version
  or version range pulled in via USE_PYTHON[_BUILD|_RUN]=X.Y does not
  matter.

  Ports should however not rely on 'python' at build or installation
  time, whenever possible to avoid problems with building packages for
  different python versions.

  This change tries to raise the barrier for misbehaving ports and eases
  package builds for different python versions.

Tested with:	exp-run (ports/184591)
Reviewed by:	wg@, koobs@
Supported by:	wg@
With hat on:	python@
2013-12-18 17:21:49 +00:00
William Grzybowski
2fc30ab028 Mk/bsd.python.mk: fix setup call for python 3.x
Reported by:	antoine
2013-12-16 22:01:40 +00:00
William Grzybowski
1e34739b64 Use setuptools for all Python ports.
Setuptools is the preferred method to manage Python distributions after
many changes to the packaging ecosystem over the past couple of years.

Only ports using USE_PYDISTUTILS= yes are affected by this commit, ports using
USE_PYDISTUTILS= easy_install remains the same however this usage is now
deprecated and should be converted to USE_PYDISTUTILS= yes.

Some Python distributions do not work with setuptools out of the box because
they extend the install command from distutils and not setuptools, and
so they need to be patched accordingly.

pip (which leverages setuptools) works around the issue by using eggs, however
we want to get rid of those as well, as support for "flat" installation is
unavailable or has other issues associated with it.

This work allows us to unify how python packages are built, ensure that Python
distributions are installed consistently, reduces complexity for Python port
maintainers and paves the way for simplifying the Python ports framework in
the future.

With hat on:	python
Reviewed by:	koobs, antoine
Exp-run:	bdrewery
Approved by:	bdrewery (portmgr)
2013-12-15 16:22:17 +00:00
Marcus von Appen
885b528f02 New USES=twisted, to replace the old USE_TWISTED knob.
twisted can be configured with the arguments run or build to replace
the previous USE_TWISTED_RUN and USE_TWISTED_BUILD knobs. The twisted
components can be added as comma-separated arguments. If you previously
wrote
    USE_TWISTED=        yes
    USE_TWISTED=        conch names
    USE_TWISTED_RUN=    yes
you now would write
    USES=       twisted
    USES=       twisted:conch,names
    USES=       twisted:run
2013-12-08 12:04:07 +00:00
William Grzybowski
99c5ad4239 devel/py-setuptools: Python packages installer
The fork Distribute was merged back into setuptools.
http://pythonhosted.org/setuptools/merge.html

PR:		ports/183726
Exp-run by:	bdrewery
2013-11-27 18:48:48 +00:00
Kubilay Kocak
9c597eecc6 lang/python27: Update to 2.7.6
- Update to 2.7.6
- Update pkg-plist
- Temporarily override OPT:Olimit using CONFIGURE_ENV (ports/182952) [1]
- Replace patch: extra-patch-configure-pth with CONFIGURE_ENV instead
- Remove patch: patch-Modules-_ctypes-libffi_fficonfig.py.in [2]
- QA: Clean up and group related USE_*, WRKSRC and CONFIGURE entries
- QA: Whitespace alignment

Changes: 2.7.6 - November 10, 2013

http://www.python.org/download/releases/2.7.6/

[1] Python removed OPT:Olimit in 3.2+, requested backport or
    alternative upstream patch: http://bugs.python.org/issue877121
[2] Upstreamed: http://bugs.python.org/issue18178

PR:		ports/182952
PR:		ports/156759
Reviewed by:	antoine, mva
2013-11-24 13:22:40 +00:00
Dmitry Sivachenko
82247f1486 Update to version 3.3.3. 2013-11-19 14:52:23 +00:00
William Grzybowski
6e2087197c Mk/bsd.python.mk: remove deprecated easy install vars
Those vars have been deprecated for a long time, this is a no op.
2013-11-09 13:20:05 +00:00
William Grzybowski
b8481a8c7d Mk/bsd.python.mk: add staging support for easy_install
This allows stage dir support for python packages using easy_install
method from setuptools module.

easy_install target does not support a --root so we workaround it with
PYTHONUSERBASE and other user flags.

Submitted by:	nivit, wg
With hat on:	python
Exp-run:	bdrewery
2013-11-09 13:09:49 +00:00
Kubilay Kocak
ce4af1f963 Fix a typo: USE_PYDISUTILS -> USE_PYDISTUTILS 2013-11-09 08:08:35 +00:00
Kubilay Kocak
5677f2500d Further clarify PYTHON_PY3K_PLIST_HACK and PYTHON_PY3K_PLIST_HACK usage 2013-11-09 07:25:29 +00:00
Marcus von Appen
c393e4469b - Followup commit for the final lang/python26 update, that was missed
previously
2013-11-02 12:39:32 +00:00
Kubilay Kocak
d955a5a81d Mk/bsd.python.mk: Further tweaks to clarify AUTOPLIST and PY3K_HACK
Reviewed by:	mva
2013-10-27 09:30:09 +00:00
Kubilay Kocak
269f9dbb91 Mk/bsd.python.mk: Clarify PYTHON_PY3K_PLIST_HACK & PYDISTUTILS_AUTOPLIST usage
Reviewed by:	mva, Johannes Meixner (xmj) via IRC
2013-10-26 10:11:45 +00:00
Marcus von Appen
026a6cfc87 - Fix replacement expressions for manpages, if PYDISTUTILS_AUTOPLIST is set 2013-10-19 07:49:54 +00:00
Marcus von Appen
ae868cb7fb - Enable proper manpage handling for PYDISTUTILS_AUTOPLIST, if the
manpages are installed by distutils.

Requested by:	avg@
Improvements:	jhein@symmetricom.com
2013-10-18 16:28:48 +00:00
Marcus von Appen
f106670c04 The default versions of lang/python* have been changed to support the
new DEFAULT_VERSIONS variable.

PYTHON_DEFAULT_VERSION, PYTHON2_DEFAULT_VERSION and
PYTHON3_DEFAULT_VERSION are deprecated. If you have set them in your
make.conf, you should change them something like

DEFAULT_VERSIONS=python=2.7 python2=2.7 python3=3.3
2013-10-03 09:25:37 +00:00
Marcus von Appen
e313d07ec3 Enable python meta-ports to be used as direct dependencies
via USE_PYTHON=2 (for lang/python2) or USE_PYTHON=3 (for lang/python3).
This can be used for ports, which do not care, which specific minor
release version of Python 2.x or Python 3.x is used, as long as there
are proper symlinks to e.g. bin/python2 or bin/python3.
2013-09-30 17:56:28 +00:00
Marcus von Appen
7fa21a62f0 - Delete the whole directory hierarchy, not only directories containing
files, when using PYDISTUTILS_AUTOPLIST.

Spotted by:	wg@
2013-09-27 18:33:16 +00:00
Marcus von Appen
330a9beb82 - Introduce a new port Makefile knob PYDISTUTILS_AUTOPLIST.
This will cause the ports framework to create the plist automatically
  for distutils-based ports. All files installed via Python's distutils
  mechanisms (either the traditional distutils or easy_install) will be
  automtically added to the package list, regardless of the Python
  version. It is somewhat similar to the RUBYGEM_AUTOPLIST knob.

- Introduce a new port Makefile knob PYTHON_PY3K_PLIST_HACK.

  This automatically replaces .pyc and .pyo package list entries with
  the relevant __pycache__ entries for Python 3.x. It should only be
  used for ports, which do not use one of Python's default package
  installation mechanisms and which are guaranteed to work with any
  python version.
2013-09-26 18:27:02 +00:00
Ruslan Makhmatkhanov
dc659a215b - add new USES target: zope, and convert the tree to it
- old USE_ZOPE knob support was removed from bsd.python.mk
- update CHANGES and bsd.sanity.mk accordingly
- add ZOPE options knob and use it in lang/py-mx-base

The work is done by Marcus von Appen, but any problems are mine.

Submitted by:	mva (python ML)
2013-09-23 13:42:48 +00:00
Baptiste Daroussin
cf099c77fa Add support for staging area in the ports tree
The ports tree is now staged by default. With pkgng the sequence hasn't
changed, the main difference is that creating package is now independent
from installing it. With pkg_install, the package is now created first
and make install, do install the package.

New macros:
- STAGEDIR: PATH to the directory where the port will be staged.
- NO_STAGE: Keep the old behaviour of the ports tree (aka no staging area)

Unsupported macro if NO_STAGE is not set:
- MAN* with staging man page compression and handling of hardlinks and
symlinks is automatically done in the stage. the manpages becomes then a
"normal" plist files and should be tracked in pkg-plist.
- MANCOMPRESSED the compress-man target is able to only compress when it
needed.

New target:
- stage: this installs everything into the stage directory
- makeplist: this will create a pkg-plist and print it to stdout. This is
a sample plist and it should always be _reviewed_ not directly used.

NOTE: with staging only what is in the plist will be installed, nothing more,
meaning a port staged cannot have leftovers exect directories left. It is
really important to double check the pkg-plist to make sure all the files
the maintainer want to package are in! make makeplist can help in that area.

The goal is to handle as quickly as possible a full removal of the NO_STAGE
support.

More features can be added once the full ports tree is converted to using the
staging area

Conversion notes:
- Remove NO_STAGE
- in {pre,do,post}-install
  * Before any usage of ${PREFIX}, ${ETCDIR}, ${PORTSDIR}, ${PORTEXAMPLES}
    prepend ${STAGEDIR}
  * Remove any thing that is done by @exec or +INSTALL script it will be
    done automatically when syncing packages
  * Remove any code to show PKG-MESSAGE it will be done automatically when
    syncing packages
  * Directory creation should remain in post-install (in particular because
    pkgng doesn't work like pkg_install in that area and pkgng ignores the
    @exec mkdir but directly pack the directory even if empty)
- PORTDOCS/PORTEXAMPELS
  To support PORTDOCS, PORTEXAMPLES most of the time there is no more need
  for hacks. just add the right %%PORTDOCS%% or %%PORTEXAMPLES%% in your
  plist then the given files from the stagedir will or will not sync
  according to NOPORTDOCS and NOPORTEXAMPLES.

With hat:	portmgr
Reviewed by:	bdrewery
2013-09-23 05:56:35 +00:00
Marcus von Appen
1e35ab7368 - Introduce PYTHON2_DEFAULT_VERSION, the version of the default python2
binary in $PATH. It can be set in case the user wants to use a
  specific python2 version as a default. Its behaviour is similar
  to the existing PYTHON3_DEFAULT_VERSION and fixes a small issue with
  package builds for different python versions.
- Outline that PYTHON_DEFAULT_VERSION always takes precedence for a
  specific python major version.
- Update lang/python2 to use PYTHON2_DEFAULT_VERSION and bump the
  PORTREVISION to let the installed port catch up with the change.
- Allow PYTHON3_DEFAULT_VERSION to overriden by a user choice, if
  PYTHON_DEFAULT_VERSION is not set to a python3 port.

Reported by:	David Demelier <demelier.david@gmail.com>
Reviewed by:	koobs@, sbz@
With hat on:	python@
2013-09-15 12:52:28 +00:00
Sunpoet Po-Chuan Hsieh
90f9630c5f - Update comment of PYTHON_DISTFILE 2013-09-07 17:21:58 +00:00
Marcus von Appen
c46a353b83 - document the PYTHON_VER variable for port Makefiles 2013-08-25 08:12:59 +00:00
Marcus von Appen
0d2b99cdf6 - Add lang/python as temporary RUN and BUILD dependency, if USE_PYTHON*
is set. This should avoid most of the problems, the lang/python change
  introduced.
2013-08-18 14:46:41 +00:00
Chris Rees
3d119ba514 When python ports are installed that depend on the architecture/ABI of the
system currently installed (i.e. PYEASYINSTALL_ARCHDEP) the entire version
string of the system is used in the destination directory, for example;

python_ldap-2.4.12-py2.7-freebsd-10.0-CURRENT-amd64.egg

This plays havoc when STABLE, RELEASE and RELENG are used, not forgetting
patchlevels as well.  Now, only the major FreeBSD version number is included;

python_ldap-2.4.12-py2.7-freebsd-10-amd64.egg

Given that ABI should be stable at least over major releases, this now allows
packages to be created and installed correctly.

PR:		ports/133081
Submitted by:	Stef Walter <stef@memberwebs.com>
		(this patch used as a starting point)
Reviewed by:	No objections from python@
2013-06-29 11:43:01 +00:00