Parallel Python packages for different versions w/ pkgng

KT Dassoff kyle at ktdassoff.net
Thu Nov 7 01:17:05 UTC 2013


Hey all,
I had a question about installing multiple copies of Python packages
from ports for different versions of Python (e.g. installing Sphinx for
both Python 2.7 and Python 3.3). Now, I know to set the PYTHON_VERSION
environment variable when building the appropriate py-* port. And the
generated package will have the expected prefix (i.e. py27-* or py33-*
etc).

The problem is that ports/pkgng will treat a py27-* package and a py33-*
package as different versions to be upgraded even though, as far as I
know, they install their files to different site-packages trees
according to the interpreter they're built for, and if I recall, this
worked fine with the older package infrastructure.

Example:
* Install `textproc/py-sphinx` with no PYTHON_VERSION set (equivalent to
=2.7); that succeeds, and `pkg info` later shows py27-sphinx installed
* Install the same port with PYTHON_VERSION set to 3.3; the port will
build fine, but when running `make install` (whether directly or via
portmaster), it will try to replace py27-sphinx with py33-sphinx by
deinstalling py27-sphinx before installing the py33 version

Is there something else I need to do to install them side-by-side, or is
this some bug in pkgng, or is there some actual conflict between Python
packages via ports that I'm not aware of?


More information about the freebsd-questions mailing list