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

Re: Packaging a Python program



On Fri, Oct 05, 2001 at 03:12:35PM +0200, Bastian Kleineidam wrote:
> > 1) Should I byte compile the scons script?
> 
> No. I assume its a shell script called /usr/bin/scons. There is no need
> to byte-compile it.

It's actually a Python script. Currently it has a lot of code in it (to parse
arguments and options for example). I'd like to factor all the code out of the
scons script, and move it into a SCons module, so the scons script only has
two lines of code in it. This would byte compiling superfluous.

> >     3a) Do I have to create two packages: one for python and one for python2
> 
> Yes.

Oh well. Now that I've played around with debhelper, I see that it's
not really that hard to make N binary packages from a single source.
> 
> > 4) What should I name the SCons.* modules package? libSCons? libSCons-python?
> > python-SCons? python2-SCons?
> 
> You can do it like this:
> scons - includes the scons binary script (and man page etc)
> python-scons - includes the SCons.* Python module
> python2-scons - as above for Python2
> 
> scons depends on python-scons | python2-scons
> python-scons depends on python << 2.0, python >= 1.5.2
> python2-scons depends on python <<2.1, python >= 2.0

So when there is a Debian package for Python 2.1, will I have to have a
python21-scons that depends on python << 2.2, python >= 2.1? I'm assuming I do,
because Python 2.1 will use /usr/lib/python2.1 rather than
/usr/lib/python2.0. 

Now I'm wondering how it's going to work when someone has both python and
python2 installed, and they do 'apt-get install scons'. Will it install
python-scons, python2-scons, or both. I want it to install both, so the user
can use scons with either python. Perhaps I should put this in my control file
for scons:

    Depends: python-scons|python2-scons
    Recommended: python-scons, python2-scons

Or maybe Suggests? I'm not sure either of these will really do what I want.

-- 
Homepage: http://www.electriceyeball.com
Email: Anthony Roach <aroach@electriceyeball.com>
PGP Key: http://www.electriceyeball.com/aroach.asc

Attachment: pgpbj6c1lXVVT.pgp
Description: PGP signature


Reply to: