I want to run python setup.py install (the setup script uses setuptools), and I want only the .pyc files to be included in the resulting egg or directory. all .py files must not be present. How can I do this ?
21
votes
Write a script reading the ZIP file and removing all unrelated files...that's a three liner.
- Andreas Jung
@restrisiko: agreed, but maybe there's a standard setuptools method to do it, and if so is the case, I'd like to learn something new about the tools I am using.
- Stefano Borini
1 Answers
25
votes
not with install, but a possibility is to run the following command
python setup.py bdist_egg --exclude-source-files
and install the resulting egg in dist with easy_install
easy_install dist/eggname.egg
Note that according to the manual install is nothing but a shortcut to easy_install use.