Beech Rintoul dijo [Mon, Sep 01, 2008 at 07:41:41PM -0800]:
> > As I said, there were several pitfalls for 0.5->0.7 upgrades, and
> > some other Debian policy aspects I had not taken care of
> > (i.e. byte-compiling the Python modules for the administrative
> > interface upon installation). The Release Team asked me to do an
> > upload with those aspects fixed, and only when that version is
> > accepted into Lenny (which I expect to happen during this week), I
> > will upload 0.8 into Unstable.
> 
> I would like to see Cherokee incorporate this into their install. 
> Compiling by starting the admin binary isn't an option for a FreeBSD 
> install so I did the following:
> 
> @cd ${DATADIR}/admin && ${FIND} . -name "*.py" |\
>       ${XARGS} ${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py
> 
> I would imagine that this is also an issue with other dists.

In Debian/Ubuntu, there is a specific debhelper for handling this -
After finding out the right way to go (I have never before packaged
anyghing that sounded Pythonesque), all I had to do was adding
"dh_pysupport /usr/share/cherokee/admin" to the binary-common target
of the main Makefile we use for packaging (debian/rules). 

(explanation might only be interesting for other people involved in
repackaging Cherokee, or other Python stuff)

This might seem kludgy, but it's the right way to go - As far as I
could read into this, what this helper does is _not_ byte-compiling at
build time, but at install time on each of the users' systems. This is
because Debian ships different versions of Python (currently, 2.4 and
2.5), and each user might choose to install either (or both), so
dh_pysupport byte-compiles to whatever the user... uses.

The compiled modules are also registered, so if an ABI bump is
introduced, all of the Python modules are recompiled. And, of course,
they are all purged together with the source files upon upgrade/purge.

-- 
Gunnar Wolf - [EMAIL PROTECTED] - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to