1

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

0

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

'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?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.