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
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@
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
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
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@
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@
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.
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
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
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
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
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@
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)
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
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
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
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.
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.
- 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)
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
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@
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@