I'm migrating an old python project to the new pyproject.toml
based system and am having trouble with getting files that are required by tests to install. Inside the pyproject.toml
I have:
[tool.setuptools]
package-data = {"my_pkg_name" = ["tests/*.sdf", "tests/*.urdf", "tests/*.xml", "tests/meshes/*.obj"]}
[build-system]
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"
The tests that are run with pytest
require the files described under package-data
. After I build and install the build, the test files are not there. How do I get those files to be installed? How to include package data with setuptools/distutils? may be related, but things have changed, and I would rather not have to create a manifest file.
The project structure looks something like:
.
├── LICENSE.txt
├── pyproject.toml
├── README.md
├── src
│ ├── my_pkg_name
│ │ ├── __init__.py
└── tests
├── ant.xml
├── humanoid.xml
├── __init__.py
├── kuka_iiwa.urdf
├── meshes
│ ├── link_0.obj
│ ├── link_1.obj
│ ├── link_2.obj
│ ├── link_3.obj
│ ├── link_4.obj
│ ├── link_5.obj
│ ├── link_6.obj
│ └── link_7.obj
└── test_transform.py
The pyproject.toml
has no specific package discovery related settings.