summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-02-02 10:16:09 (GMT)
committerAntoine Pitrou <pitrou@free.fr>2019-02-02 10:16:09 (GMT)
commit40a101df8c64a1e55cca2780248d7a92bdcccd57 (patch)
tree7dca44b8bcfc3fb97de74debbbc70fe9f6a762c0
parent06b15424b0dcacb1c551b2a36e739fffa8d0c595 (diff)
downloadcpython-40a101df8c64a1e55cca2780248d7a92bdcccd57.zip
cpython-40a101df8c64a1e55cca2780248d7a92bdcccd57.tar.gz
cpython-40a101df8c64a1e55cca2780248d7a92bdcccd57.tar.bz2
bpo-25592: Improve documentation of distutils data_files (GH-9767) (GH-11734)
(cherry picked from commit 598e15d4feaee3849a91d92c9ca51f17baafe19c) Co-authored-by: jdemeyer <J.Demeyer@UGent.be>
-rw-r--r--Doc/distutils/setupscript.rst25
1 files changed, 14 insertions, 11 deletions
diff --git a/Doc/distutils/setupscript.rst b/Doc/distutils/setupscript.rst
index 92ab573..8407206 100644
--- a/Doc/distutils/setupscript.rst
+++ b/Doc/distutils/setupscript.rst
@@ -520,20 +520,23 @@ following way::
setup(...,
data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']),
('config', ['cfg/data.cfg']),
- ('/etc/init.d', ['init-script'])]
)
-Note that you can specify the directory names where the data files will be
-installed, but you cannot rename the data files themselves.
-
Each (*directory*, *files*) pair in the sequence specifies the installation
-directory and the files to install there. If *directory* is a relative path, it
-is interpreted relative to the installation prefix (Python's ``sys.prefix`` for
-pure-Python packages, ``sys.exec_prefix`` for packages that contain extension
-modules). Each file name in *files* is interpreted relative to the
-:file:`setup.py` script at the top of the package source distribution. No
-directory information from *files* is used to determine the final location of
-the installed file; only the name of the file is used.
+directory and the files to install there.
+
+Each file name in *files* is interpreted relative to the :file:`setup.py`
+script at the top of the package source distribution. Note that you can
+specify the directory where the data files will be installed, but you cannot
+rename the data files themselves.
+
+The *directory* should be a relative path. It is interpreted relative to the
+installation prefix (Python's ``sys.prefix`` for system installations;
+``site.USER_BASE`` for user installations). Distutils allows *directory* to be
+an absolute installation path, but this is discouraged since it is
+incompatible with the wheel packaging format. No directory information from
+*files* is used to determine the final location of the installed file; only
+the name of the file is used.
You can specify the ``data_files`` options as a simple sequence of files
without specifying a target directory, but this is not recommended, and the