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 performing python setup.py build
, the innermost test
directory is not getting copied:
$ tree -d | grep -v "__pycache__"
.
├── build
│ ├── lib
│ │ └── poliastro
│ │ ├── iod
│ │ ├── tests
│ │ └── twobody
On the contrary, python setup.py sdist
works correctly.
So far I've used the MANIFEST.in
rules to include or exclude certain files, patterns and directories from the sdist. Is there a way to control what goes to the build
directory? Why some tests are getting there and some others aren't?
Reference to original issue and source code: https://github.com/poliastro/poliastro/issues/129
Your setup()
is missing include_package_data=True
. See this PR I have made https://github.com/poliastro/poliastro/pull/139
Discussion: Without this, non-python package files (such as the test py files you list that are not "in a package") are not included by default, even though they are technically part of an otherwise included Python package directory tree.
/HTH
Try putting __init__.py
files inside the included folders specified in MANIFEST.in
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With