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

Packaging a Python program



I'm trying to create a Debian package for the program SCons
(http://www.scons.org). SCons is written entirely in Python and works with
Python versions 1.5.2 through 2.1.1. The SCons program consists of a script
named scons and a set of extension modules named SCons.*. I've decided to
package the scons script and the SCons.* modules separately since the SCons.*
modules are useful without the scons script. The scons package will be named
scons.

Here are my questions:

1) Should I byte compile the scons script?

2) Since the SCons.* modules work fine in all versions of Python supported by
   all current versions of Debian, can I put them in some version independent
   directory?

if answer(2) == "yes":
    
    3a) What would this directory be? /usr/lib/site-python/?
        /usr/lib/python/site-packages/?

    3b) How should I byte-compile them? 

else:

    3a) Do I have to create two packages: one for python and one for python2
        (Yuck!)

4) What should I name the SCons.* modules package? libSCons? libSCons-python?
python-SCons? python2-SCons?

Here are my best guesses at the answers:

1) no (this will mean a performance hit, but it won't pollute /usr/bin with
   .py* files)

2) yes

3a) /usr/lib/site-python (/usr/share/doc/python/README.Debian says this is the
    place for version-independent modules)

3b) use the first occurrence of /usr/lib/python*/compileall.py (this will
    produce compiled modules that work with at least one version of python on
    the system)

4) libSCons (why put the -python on? There isn't ever going to be a non-python
   version if libSCons).

Any feedback is greatly appreciated.

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

Attachment: pgpH6thGfwuNC.pgp
Description: PGP signature


Reply to: