简体   繁体   中英

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?

Create a MANIFEST.in file with the content like:

include LICENSE
include CONTRIBUTING.md
include requirements.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM