Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 632bda3

Browse files
committed
Add more explanation of how data_files is used (esp. where the files end up
in the installation and how that location is determined).
1 parent 90d1006 commit 632bda3

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Doc/dist/dist.tex

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ \subsection{Listing additional files}
632632
files needed by the module distribution: configuration files,
633633
data files, anything which does not fit in the previous categories.
634634

635-
\option{data\_files} specify a sequence of \code{(directory, files)}
636-
pairs in the following way:
635+
\option{data\_files} specifies a sequence of (\var{directory},
636+
\var{files}) pairs in the following way:
637637

638638
\begin{verbatim}
639639
setup(...
@@ -644,6 +644,17 @@ \subsection{Listing additional files}
644644
Note that you can specify the directory names where the data files
645645
will be installed, but you cannot rename the data files themselves.
646646

647+
Each (\var{directory}, \var{files}) pair in the sequence specifies the
648+
installation directory and the files to install there. If
649+
\var{directory} is a relative path, it is interpreted relative to the
650+
installation prefix (Python's \code{sys.prefix} for pure-Python
651+
packages, \code{sys.exec_prefix} for packages that contain extension
652+
modules). Each file name in \var{files} is interpreted relative to
653+
the \file{setup.py} script at the top of the package source
654+
distribution. No directory information from \var{files} is used to
655+
determine the final location of the installed file; only the name of
656+
the file is used.
657+
647658
You can specify the \option{data\_files} options as a simple sequence
648659
of files without specifying a target directory, but this is not recommended,
649660
and the \command{install} command will print a warning in this case.

0 commit comments

Comments
 (0)