I came across this answer: How do I create a deb package for a single python script?

Which is extremely helpful and well detailed. I have everything except the install file. In that post the user is installing a single .py file to /usr/bin. I need to install a module to /usr/local/lib/python2.7/site-packages

How should my install file be different?


In the debian/install file, add this line (or only use this line, if there aren't any others in there):

moduleFileName /usr/local/lib/python2.7/site-packages/

You basically use the same line format for each file (or directory):

filename /path/to/destination/
  • forgive my ignorance but how does it know to copy the init.py and *.py. Say the module is called calc and I have calc.py and init.py and utils.py? – Sam Hammamy Jan 23 '15 at 16:27
  • You can write a line for each file, if they have to go to different destinations, or you could write *.py if they can all go into the same directory. – s3lph Jan 23 '15 at 16:33

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.