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 Answer 1

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.

1
  • 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, 2013 at 18:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .