How do I make setup.py
include a file that isn't part of the code? (Specifically, it's a license file, but it could be any other thing.)
Asked
Active
Viewed 3,068 times
1

Ram Rachum
- 84,019
- 84
- 236
- 374
1 Answers
4
http://docs.python.org/distutils/setupscript.html#installing-additional-files is all you should need.
Since you mentioned a license file, you can include additional meta-data (such as a license) this way.

Matt Ball
- 354,903
- 100
- 647
- 710
-
4'data_files' is kinda broken I think, because it installs the files in a system-wide location, not associated with my project files, and this location *changes* depending on whether the user installs my package using "setup.py install" or "pip install". So my code can't then find the files. I guess I could try to search both locations at runtime. Do people really do this? – Jonathan Hartley Feb 12 '12 at 11:14