summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid Pugh <david.pugh@mclaren.com>2018-03-08 13:36:11 +0000
committerDavid Pugh <david.pugh@mclaren.com>2018-03-08 13:59:23 +0000
commitf4464151c2fbd3f684ce00fadfc0e0c27097e2df (patch)
tree00d132ed7061575fc25ef6a02d0a3cc372fd9be1 /docs
parente065e9012612f3e0b8713fd61d298126f7fcfa21 (diff)
downloadpython-setuptools-git-f4464151c2fbd3f684ce00fadfc0e0c27097e2df.tar.gz
Updated package_data documentation
Diffstat (limited to 'docs')
-rw-r--r--docs/setuptools.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/setuptools.txt b/docs/setuptools.txt
index 2425e100..ce20c548 100644
--- a/docs/setuptools.txt
+++ b/docs/setuptools.txt
@@ -885,6 +885,14 @@ Also notice that if you use paths, you *must* use a forward slash (``/``) as
the path separator, even if you are on Windows. Setuptools automatically
converts slashes to appropriate platform-specific separators at build time.
+If datafiles are contained in a subdirectory of a package that isn't a package
+itself (no ``__init__.py``) then the subdirectory names (or ``*``) are required
+in the ``package_data`` argument (as shown above with ``'data/*.dat'``).
+
+When building an ``sdist`` the datafiles are also drawn from the
+``package_name.egg-info/SOURCES.txt`` file so make sure that this is removed if
+the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``.
+
(Note: although the ``package_data`` argument was previously only available in
``setuptools``, it was also added to the Python ``distutils`` package as of
Python 2.4; there is `some documentation for the feature`__ available on the
@@ -926,7 +934,7 @@ In summary, the three options allow you to:
Accept all data files and directories matched by ``MANIFEST.in``.
``package_data``
- Specify additional patterns to match files and directories that may or may
+ Specify additional patterns to match files that may or may
not be matched by ``MANIFEST.in`` or found in source control.
``exclude_package_data``