Date: Sat, 7 Jun 2014 18:22:55 +0200 From: Marcus von Appen <mva@FreeBSD.org> To: freebsd-ports@freebsd.org, freebsd-pkg@freebsd.org, ports-announce@freebsd.org Cc: freebsd-python@freebsd.org Subject: [HEADS UP]: Conflict-free python packages for different python versions Message-ID: <20140607162255.GA862@medusa.sysfault.org>
next in thread | raw e-mail | index | archive | help
--oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On behalf of the FreeBSD python team, I'd like to announce the availability of concurrent, conflict-free python package support in the ports tree. Why? FreeBSD supports different python versions and flavours to be installed at the same time, such as e.g. Python 2.7 and Python 3.3. Ports installing python modules however always assume that that they are installed for only one python version. To overcome the flaw in the ports tree that a single port, which is about to be installed for different python versions at the same time, will install conflicting files into the same directories, a change in how those ports are built and installed was necessary. What does that mean for port and pkg users? If you are using the ports tree to build your own ports from scratch, it won't have any impact as of now, since the underlying package installers, be it pkg or the pkg_* tools, can't install multiple packages from the same source port yet. If you are using pkg or the pkg_* tools to install binary packages, it won't have any impact as well, since they can't install multiple packages from the same source port yet. You should be aware of some directory and file name changes, though, that eventually will occur on updates. A python module may use the python version prefix for the doc and example directories and create scripts and binaries with a python version suffix. Right now, a port devel/py-foo might install * documentation into/usr/local/share/doc/foo, * examples into /usr/local/share/examples/foo, * a script /usr/local/bin/foo The announced change (along with an update to the port) will cause it to use a python version prefix for the directories and a version suffix for the scripts (and binaries). This means, that the port will install * documentation into /usr/local/share/doc/py27-foo (for lang/python27) * documentation into /usr/local/share/doc/py32-foo (for lang/python32) * documentation into /usr/local/share/doc/py33-foo (for lang/python33) ... * examples into /usr/local/share/examples/py27-foo (for lang/python27) * examples into /usr/local/share/examples/py32-foo (for lang/python32) * examples into /usr/local/share/examples/py33-foo (for lang/python33) ... * a script /usr/local/bin/foo-2.7 (for lang/python27) * a script /usr/local/bin/foo-3.2 (for lang/python32) * a script /usr/local/bin/foo-3.3 (for lang/python33) * a symlink /usr/local/bin/foo pointing to the script for the current default python version (e.g. foo-2.7 or foo-3.3) Please note that the current installation behaviour will not be changed automatically. Ports that shall support conflict-free packages, must receive an update first. If you are not a port maintainer, committer or developer, you can stop reading now. What about maintainers and port developers? Please read the CHANGES. The change makes use of USES=uniquefiles:dirs. Thus, if you are maintaining a port, which shall become conflict-free, set the new PYTHON_CONCURRENT_INSTALL knob to yes. The port must be stage-safe to use the knob. Please ensure that you do not set DATADIR, DOCSDIR, WWWDIR, EXAMPLESDIR or ETCDIR explicitly in the port Makefile, since the uniquefiles USES will try to prefix those. The change will also add a suffix to binaries and scripts that will be installed into ${PREFIX}/bin, ${PREFIX}/sbin, ${PREFIX}/libexec and create a symlink for the default python version on demand. If you are using a manually maintained pkg-plist, you may need to adjust it using the PYTHON_PKGNAMEPREFIX and PYTHON_VER variables to properly substitute plist entries. If you are using PYDISTUTILS_AUTOPLIST, you usually do not have take care of any plist modifications. The rule of thumb is that most end-user applications, service daemons and similar tools do not need to be installed concurrently for different python versions. Python modules however will gain an immediate benefit, since they can be provided for different python versions at the same time without forcing the user to install them manually from another location. We chose the knob to be an opt-in, rather than an opt-out solution, due to various constraints, such as a full package rebuild, the requirement to check all python-related ports prior to the commit and to keep the immediate impact for users as small as possible. If you have any specific questions about how to update your port, do not hesitate to ask the FreeBSD python team. Cheers Marcus --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlOTPF8ACgkQi68/ErJnpkdRsgCfRtNWS2X2oC9iu480f4NQ6DB7 +ssAn048LP3Ah5PcU5zXWTE9t9k5gc3b =ioXM -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140607162255.GA862>