pkgsrc-Users archive

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

Re: python dev?



On Monday 11 December 2006 23:45, Joerg Sonnenberger wrote:
> On Mon, Dec 11, 2006 at 10:20:58PM +1030, Berndt Josef Wulf wrote:
> > I'm sure it is Python.h. The problem I think is the way we install python
> > for multiple versions where the path becomes somthing like
> > <prefix>/include/<python-<PYVERSION> and the binary becomes
> > <prefix>/bin/python<PYVERSION>
>
> Both is done e.g. by Debian as well. Nothing new. I'm not aware of any
> major system which is not doing the same.

This doesn't mean they are doing the right  thing.

> > I encounter this kind of problem with python scripts installed by third
> > party packages. Most scripts define
> >
> > #!/usr/bin/env python
>
> Kill the authors. 

In which case we won't have anyone that writes python scripts and the problem 
is solved... :-)

> This is just stupid for any bigger package as nothing 
> guaranties that Python is the search path (certainly a bad assumption
> for pkgsrc scripts). 

Name me one case where it isn't installed in the search path!

> Second it does not give any idea about whether the 
> python script found that way can actually support the script. This is a
> concern for me as I often have to run multiple Python versions, some for
> old scripts where the extensions are not portable, the newest version
> where I care for speed etc.

The system owner can set the default version of python by setting the 
PYTHON_VERSION_DEFAULT variable in mk.conf. What is wrong with pkgsrc
providing a link from <prefix>/bin/python -> <prefix>/bin/python<PYVERSION> as 
defined by the PYTHON_VERSION_DEFAULT variable?

This will work for the majority of python scripts and packages. This way we 
only have to deal with packages that require a different version as we do 
know. Isn't this a much simpler solution then having to modify and keep track 
of hundreds of python scripts for every single py-* and other packages that 
use python scripts?

There are currently 325 python scripts in 91 packages that are modified by 
pkgsrc using PYTHON_PATCH_SCRIPTS directive.

cheerio Berndt 



Home | Main Index | Thread Index | Old Index