pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Python (Multi) installation?



On Sat, 15 Sep 2018, Chavdar Ivanov wrote:

> I don't quite follow this. I have a system, where initially I did not
> have PYTHON_VERSION_DEFAULT defined; various packages brought
> python2.7 and a bunch of py27-xxxx packages. Subsequently I needed
> python3 for something, I installed python36 and set the above
> environment variable to 36. I then also had to install many additional
> python packages, which came as py36-xxx, of course. There were a few
> other packages explicitly requiring python2, which were built despite
> 3.6 being the default one. Later, when python3.7 came out, installed
> it as well - the three versions seem to coexist for me. the default is
> still 36, but if I need a specific python package for 37, I set the
> above variable in the environment to 37 and carry on with the build. I
> have at the same time, e.g., idle2.7, idle3.6 and idle3.7.

I do not define PYTHON_VERSION_DEFAULT and let packages install what
they need.  So for things that are fine with python27, that gets installed.
Until recently, the only thing I installed that required python3x was
libreoffice (and more recently glib-networking).  Through pkgsrc-2018Q2,
libreoffice marked python27 incompatible and would install the highest
python3x available--python36 at the time.  (I have never explicitly
installed any python packages--it's always done as a dependency of
another package.)

As of recent pkgsrc-HEAD, libreoffice marks python37 as incompatible as
well.  But before that, a raft of other packages now want python3x and
apparently were not satisfied with the existing python36, so began the
process of installing python37.  This initial attempt to install python37
failed, complaining that another version (python36) was already installed.

Since the only thing I had (at the time) that used python36 was libreoffice
(and glib-networking which now wanted python37) and it was due for update
as well, there was no harm in deleting it while the packages that wanted
python37 sorted themselves out.  At the time I had not noticed that
libreoffice considers python37 incompatible so was then surprised when
it started building python36.  My previous experience had me worried
that now python36 would fail to install due to the presence of python37.
This did not occur.

So I'm wondering if there's a way to prevent the initial conflict with
an existing python36 (circa pkgsrc-2018Q2) when python37 is going to be
installed.

Reading some of the commit messages for packages, I'm not convinced
setting my own PYTHON_VERSION_DEFAULT will do anything useful if I'm
going to have to install all three of python27, python36, and python37
and related pyXX-* packages anyway.

Perhaps I'll scan my complement of packages for PYTHON_VERSIONS_INCOMPATIBLE
and/or PYTHON_VERSION_REQD and see if python27 can go away as it's clear
python36 and python37 are mandatory for my usual set of packages.

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index