summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFELD Boris <lothiraldan@gmail.com>2011-01-29 10:27:11 +0100
committerFELD Boris <lothiraldan@gmail.com>2011-01-29 10:27:11 +0100
commit762738e3d4cf293b3119471bb676a4316bf536be (patch)
treed07a0027b403f3b81b87a347e943963dbec852c5
parent4ba3ca4e82fda0e9a7f6d6eb0e66849392d4bbb4 (diff)
downloaddisutils2-762738e3d4cf293b3119471bb676a4316bf536be.tar.gz
Improve data_files documentation
-rw-r--r--docs/source/setupcfg.rst67
1 files changed, 67 insertions, 0 deletions
diff --git a/docs/source/setupcfg.rst b/docs/source/setupcfg.rst
index 0cbf4f2..ef99a94 100644
--- a/docs/source/setupcfg.rst
+++ b/docs/source/setupcfg.rst
@@ -146,6 +146,73 @@ Example::
extra_files =
setup.py
+data-files
+==========
+
+This section describes the files used by the project which must not be installed in the same place that python modules or libraries.
+
+The format for specifing data files is :
+
+ **glob_syntax** = **destination**
+
+Example::
+
+ scripts/ *.bin = {scripts}
+
+It means that every file which match the glob_syntax will be placed in the destination. A part of the path of the file will be stripped when it will be expanded and another part will be append to the destination. For more informations about which part of the path will be stripped or not, take a look at next sub-section globsyntax_.
+
+The destination path will be expanded at the installation time using categories's default-path in the sysconfig.cfg file in the system. For more information about categories's default-paths, take a look at next next sub-section destination_.
+
+So, if you have this source tree::
+
+ mailman-1.0/
+ README
+ scripts/
+ start.sh
+ start.py
+ start.bat
+ LAUNCH
+ docs/
+ index.rst
+ mailman/
+ databases/
+ main.db
+ mailman.py
+
+
+
+
+.. _globsyntax:
+
+glob_syntax
+-----------
+
+The glob syntax is traditionnal glob syntax (with unix separator **/**) with one more information : what part of the path will be stripped when path will be expanded ?
+
+The special character which indicate the end of the part that will be stripped and the beginning of the part that will be added is whitespace, which can follow or replace a path separator.
+
+Example::
+
+ scripts/ *.bin
+
+is equivalent to::
+
+ scripts *.bin
+
+Theses examples means that all files with extensions bin in the directory scripts will be placed directly on **destination** directory.
+
+This glob example::
+
+ scripts/*.bin
+
+means that all files with extensions bin in the directory scripts will be placed directly on **destination/scripts** directory.
+
+.. _destination:
+
+destination
+-----------
+
+The destination is a traditionnal path (with unix separator **/**) where some parts will be expanded at installation time.
command sections
================