Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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/...

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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