Parallel Python packages for different versions w/ pkgng

Mark Felder feld at
Thu Nov 7 03:48:14 UTC 2013

On Wed, Nov 6, 2013, at 19:17, KT Dassoff wrote:
> 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?

The pkg and ports team is working on fixing package name conflicts in
the ports tree. Right now packages are identified by their origin in the
ports tree. Both py27-sphinx and py33-sphinx have the same origin,
textproc/py-sphinx, so they conflict. This will be resolved soon^TM when
they're able to flip the switch to working with package names. I'm
pretty sure your scenario will work just fine then.

More information about the freebsd-questions mailing list