2

I'm trying to build a .deb package (python) as part of a larger project. I'm able to successfully run 'make' and 'make install' on it, but when the package(s) are built (using dpkg-buildpackage -rfakeroot), none of the .pyc files are included in the .deb. This, in fact, is the case for all the python packages inside this project.

Here is my .install file:

usr/lib/python*/*/update/*.pyc
usr/lib/python*/*/update/command/*.pyc
usr/bin/update

What would cause the *.pyc files to not be included in the .deb? I see all the files in debian/tmp/usr/lib/python2.7/dist-packages/..., debian/update/usr/lib/python2.7/dist-packages/..., but there are no .pyc files in debian/update/DEBIAN/usr/lib/python2.7/dist-packages/...

1

It depends which packaging tool you use. The recommended one is dh_python2. If you use that one, *.pyc and *.pyo are automatically excluded. But a postinst-script is created which will compile your scripts on install time. See also the man page of dh_python2.

  • I tried to verify that dh_python2 was being used and saw that dh_pysupport was used instead. I've moved dh_pysupport out of the way and now am seeing .pyc's inside the .deb. Thank you for your help. – Piotrek Mar 19 '13 at 18:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.