How can I include package_data
for sdist
without a MANIFEST.in file?
My setup.py looks like this:
import setuptools
setuptools.setup(
name='foo',
version='2015.3',
license='commercial',
packages=setuptools.find_packages(),
package_data={'': ['foo/bar.txt']},
)
Versions:
user@host> python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
>>> import setuptools
>>> setuptools.version.__version__
'3.6'
I just can't get foo/bar.txt
included.
Or is this blog post still true? http://blog.codekills.net/2011/07/15/lies,-more-lies-and-python-packaging-documentation-on--package_data-/
Over the last hour, though, I've learned that these statements are somewhere between “dangerously misleading” and “damn lies”.
This is because the primary type of Python package is a source package, and the canonical method for creating a source package is by using setup.py sdist
. However, the data specified in package_data are not included in source distributions — they are only included in binary (setup.py bdist
) distributions and installs (setup.py install
).
How can I include package_data
for sdist
without a MANIFEST.in file?