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

Re: Packaging a Python program




Anthony,

Anthony Roach 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.

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?

No, at least not with the current approach to package Python programs in Debian. .py files go in versioned directories /usr/lib/pythonX.Y/ and get byte-compiled in the postinst script.

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

Yes.

        (Yuck!)

Yes.

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


In general, look at the linkchecker package for an example.

Bastian





Reply to: