On Wednesday 03 September 2008, Gunnar Wolf said:
> 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.

Byte compiling after install is the right way to go. I'm not sure this 
can be included into the application due to all the different dists 
Cherokee supports. However, what I'm doing with FreeBSD is exactly 
the same as you're describing. We just don't have the helper app so I 
had to do it from the ports makefile.

Beech

-- 
---------------------------------------------------------------------------------------
Beech Rintoul - Sys. Administrator - [EMAIL PROTECTED]
/"\   ASCII Ribbon Campaign  | Alaska Paradise
\ / - NO HTML/RTF in e-mail  | 201 East 9Th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - Please visit Alaska Paradise - http://www.alaskaparadise.com
---------------------------------------------------------------------------------------











_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to