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

Re: how to exclude python (test-)modules from byte-compilation with dh_pycentral



Hello,

On 02/07/2009 Piotr Ożarowski wrote:
> [Jonas Meurer, 2009-07-02]
> > At preparing zope2.11.3 packages, I found several python (test-)modules
> > that do have python2.5/python2.6 code. This code is mostly for checking
> > python2.5/python2.6 support, and thus isn't relevant for the
> > functionality of zope itself.
> > 
> > Zope2.11.3 still requires python2.4, so when the package is installed,
> > python-central exits with a byte-compiling error, see below.
> > 
> > Is there any possiblity to exclude/ignore the modules in question at
> > byte-compilation time? I found -X for dh_pycentral, but that one doesn't
> > seem to do what I expected it to do.
> 
> if these tests are the only parts that require newer Python version (if
> not, simply bump XS-Python-Version or debian/pyversions) - while
> building the package you can loop over all requested Python versions and
> remove files that you don't want to be used with specific Python version
> - see python-beaker[1] package for an example. Your helper tool will
> detect this and do the right thing at install time.
> 
> [...]
> 
> PS consider switching to python-support or we'll force you to do this in
> few months ;-)

thanks for the last suggestion. I finally noticed that python-support
already supports to exclude python files from being byte-compiled. After
all the following seems to do exactly what I want:

dh_pysupport -pzope2.11 -V 2.4 -Xlib/python/RestrictedPython/tests -Xlib/python/mechanize/_firefox3cookiejar.py /usr/lib/zope2.11

greetings,
 jonas

Attachment: signature.asc
Description: Digital signature


Reply to: