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

Re: Packaging a module depending on python-cffi

 ❦ 20 octobre 2013 14:09 CEST, Vincent Bernat <bernat@debian.org> :

> Has someone already packages something depending on CFFI?
> The verification phase of CFFI expects to be able to write a C file to
> /usr/lib/python2.7/dist-packages/<module>/__pycache__/. This could be
> triggered on postinst but maybe there is something better to do, like
> some way to explain to CFFI that there is nothing to verify since the
> .so is up-to-date because shipped in a Debian package.

Well, it seems that CFFI is buggy for this:

TL;DR: python setup.py install won't install the .so file in the
location expected by cffi module. And the filename is not the right
one. Moreover, the .c file will not be copied and is still needed.

I "fixed" this with this horrible CDBS rule:

	for buildver in $(cdbs_curpythonbuildversions); do \
		lib=$(call cdbs_expand_python_distutils_installdir,python$$buildver) ; \
		rm debian/snimpy/$$lib/*.so ; \
		mkdir debian/snimpy/$$lib/snimpy/__pycache__ ; \
		cp snimpy/__pycache__/_cffi* debian/snimpy/$$lib/snimpy/__pycache__ ; \

And I need a lintian override because I am shipping stuff in __pycache__
but I cannot require a compiler on installation...
printk("VFS: Busy inodes after unmount. "
        "Self-destruct in 5 seconds.  Have a nice day...\n");
        2.3.99-pre8 /usr/src/linux/fs/super.c

Attachment: signature.asc
Description: PGP signature

Reply to: