Search code examples
pythonsetuptoolssetup.pypypi

How can I tell 'setup.py' to include files from my root directory for the built distribution?


I have a typical project structure that looks like this:

/project/ 
  README.md
  CONTRIBUTING.md
  LICENSE
  setup.py
  requirements.txt
  project/
    some_project_file
  docs/
    some_docs_file
  tests/
    some_tests_file

When running python setup.py sdist bdisst_wheel, the resulting distribution in the created 'dist' folder contains everything but the 'CONTRIBUTING', 'LICENSE', and 'requirements.txt' files. Is it possible to have these files from my root directory included in the built distribution?


Solution

  • Create a MANIFEST.in file with the content like:

    include LICENSE
    include CONTRIBUTING.md
    include requirements.txt