Either put include_package_data=True
in your setup.py
and have a MANIFEST.in
with something like
include package/models/*
include package/textures/*.png
Or in setup.py
do
package_data={
'models': ['*'],
'textures': ['*.png']
}
Do not do both. include_package_data
will override package_data
.
See Also: https://stackoverflow.com/questions/11848030/how-include-static-files-to-setuptools-python-package
To get the actual path of a file, use pkg_resources.resource_filename(__name__, filename)
.
See also: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#resource-extraction