pkgsrc-Users archive

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

Re: depend on python



"Jeremy C. Reed" <reed%reedmedia.net@localhost> writes:

I am trying to figure this out for GNU Radio right now.


> Is there a way to make a package depend on python without any versioning?

So this would depend on /usr/pkg/bin/python, and run scripts, but not
invoke any modules that need shlibs?  It seemst that's the only case
where this works.

> As far as I can tell our python packages do not install bin/python.

That's how it is for me.

> I do know we have ALTERNATIVES -- can we depend on that?
>
> I am hoping to do this for the lyx packages. The binary and many scripts 
> have hard-coded "python" usage. I have been told by lyx developers that 
> several versions of python should work fine.
>
> As it is now, lyx from lyx-qt packages has several errors due to missing 
> "python" but it still works but is incomplete.

I think it might make sense to have a "python-select" package that
just has a symlink and points to /usr/pkg/bin/python{$PYVERSION}.

The problem with this is that scripts that find this at configure time
will use it, and if they also need pyXY-foo which has a shlib in
/usr/pkg/lib/pythonX.Y/site-packges, then they'll break if someone
updates 'python-select' without rebuilding the depending package to
pick up the new pyXZ-foo packages.

As I see it, there are only two safe ways to go:

1) only allow one python version and call it /usr/pkg/bin/python, or
   have a symlink.  When updated, everything has to be rebuilt.

2) disallow /usr/pkg/bin/python.  Allow multiple versions.    Bind to
   the actual version at pkg build time (patch scripts, binaries,
   etc.)

So perhaps if there is a python-select package, and things depend on
that, then if one updates that, it should trigger a rebuild.   The
point is that the dependency on the selection of which python has to
be a first-class dependency so that if it is updated a rebuild is in
order.  Unlike doing a 'make replace' on most packages, which is
usually ok if the ABI hasn't changed "too much", changing
python-select will be unsafe for any package which does anything more
than run pure python scripts.

-- 
    Greg Troxel <gdt%ir.bbn.com@localhost>

Attachment: pgpnXVn_Vc0oh.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index