Python setup.py build ignores some files

I have the following structure for my Python package:

$ tree -d | grep -v "__pycache__" . ├── src │  ├── poliastro │  │  ├── iod │  │  ├── tests │  │  └── twobody │  │  └── tests ├── setup.py └── MANIFEST.in 47 directories 

Buf after executing python setup.py build , the test internal directory is not copied:

 $ tree -d | grep -v "__pycache__" . ├── build │ ├── lib │ │ └── poliastro │ │ ├── iod │ │ ├── tests │ │ └── twobody 

Conversely, python setup.py sdist working correctly.

So far, I have used the MANIFEST.in rules to include or exclude certain files, patterns, and directories from sdist. Is there a way to control what goes to the build directory? Why do some tests get there and some others not?

Link to the source version and source code: https://github.com/poliastro/poliastro/issues/129

+5
source share
2 answers

Missing setup() include_package_data=True . See This PR, which I did https://github.com/poliastro/poliastro/pull/139

Discussion. Without this, package files other than python (for example, test py files that you do not specify in the package) are not included by default, although they are technically part of the Python package directory included elsewhere in the tree.
/ NTN

+2
source

Try placing __init__.py files inside the specified folders specified in MANIFEST.in .

0
source

All Articles