NetBSD-Users archive

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

Re: Retstricting versions/builds with pkgtools



On Sat, 18 Sept 2021 at 03:14, Todd Gruhn <tgruhn2%gmail.com@localhost> wrote:
>
> PYTHON_VERSIONS_ACCEPTED=27
>
> That would be a min-version, right?
> What of Python v3.9 is already installed?
> I just dont like the thought of having 3 versions of Python installed
> if I only need
> one of those versions. OF COURSE, if Python v 2.7 got installed first, there
> is not much that can be done...

Not really; if the package has PYTHON_VERSIONS_ACCEPTED=27, it
requires python 2.7 - a lot of Python modules have never been ported
to Python 3.x so 2.7 will be required for a long time, apparently.
The packages not depending on python 2.7 usually work with any
supported 3.x version, with some exceptions - e.g., where the package
uses some language facility which has been brought up with some
specific version. Normally having the latest python version should be
enough to leave you with only python2.7 and python3.9 (at this point
of time the latest supported, although python 3.10 is soon to be
released).

I even found one package which has PYTHON_VERSIONS_INCOMPATIBLE= 39 -
x11/qt5-qtwebkit - but somehow it still manages to build and use
python3.9 - I haven't tried to find out why yet.

Other languages have similar issues, e.g. Lua and Ruby, but perhaps
the sheer amount of available python modules and packages depending on
python makes the above problems more visible.

>
> On Fri, Sep 17, 2021 at 5:59 PM Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> >
> > On Fri, 17 Sept 2021 at 22:16, Todd Gruhn <tgruhn2%gmail.com@localhost> wrote:
> > >
> > > I noticed that I often get Python checked and/or installed when I
> > > build software.
> > >
> > > I currently have 3 versions of Python on my system.
> > >
> > > If the package requires Python-2.7, how well will it work if
> > > Python-3.8 is already
> > > installed? Can I tell pkgtools to skip installing Python if a certain ver of
> > > Python is already installed? Is this advisable?
> >
> > If a package requires specifically python version 2.7, it will be
> > installed, as well as all the relevant modules; you may have already,
> > say, PYTHON_VERSION_DEFAULT=39 in /etc/mk.conf, but if a package
> > specifies another version, it will get it. Usually there are no
> > problems with this, except when a package installs executables without
> > the version of python appended to the name.
> >
> > I recently switched my primary development machine from python3.7 to
> > 3.9, replacing all modules and rebuilding all packages requiring
> > python v.3, it took me some time, but eventually I was able to remove
> > python38 and python37, I am left at the moment only with python27 and
> > 39. There are still quite a few packages with PYTHON_VERSIONS_ACCEPTED
> > = 27.
> >
> >
> > --
> > ----



-- 
----


Home | Main Index | Thread Index | Old Index