summaryrefslogtreecommitdiffstats
path: root/Doc/packaging/setupcfg.rst
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-05 23:58:25 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-05 23:58:25 (GMT)
commit138900802239f39ad1940098f023475524ed242e (patch)
tree365d96f70716a02a3120e41da5f9755a7052034c /Doc/packaging/setupcfg.rst
parented4fd704aa41b7b233a963f91690a33e698a9d87 (diff)
downloadcpython-138900802239f39ad1940098f023475524ed242e.zip
cpython-138900802239f39ad1940098f023475524ed242e.tar.gz
cpython-138900802239f39ad1940098f023475524ed242e.tar.bz2
Make example of file inclusion in setupcfg more obvious
Diffstat (limited to 'Doc/packaging/setupcfg.rst')
-rw-r--r--Doc/packaging/setupcfg.rst29
1 files changed, 14 insertions, 15 deletions
diff --git a/Doc/packaging/setupcfg.rst b/Doc/packaging/setupcfg.rst
index 0d820d9..1999f18 100644
--- a/Doc/packaging/setupcfg.rst
+++ b/Doc/packaging/setupcfg.rst
@@ -77,38 +77,37 @@ or more files which will be merged into the current files by adding new sections
and fields. If a file loaded by ``extends`` contains sections or keys that
already exist in the original file, they will not override the previous values.
-
-file_one.ini::
+Contents of :file:`one.cfg`::
[section1]
- name2 = "other value"
+ name = value
[section2]
- foo = baz
- bas = bar
+ foo = foo from one.cfg
-file_two.ini::
+Contents of :file:`two.cfg`::
[DEFAULT]
- extends = file_one.ini
+ extends = one.cfg
[section2]
- foo = bar
+ foo = foo from two.cfg
+ baz = baz from two.cfg
-Result::
+The result of parsing :file:`two.cfg` is equivalent to this file::
[section1]
- name2 = "other value"
+ name = value
[section2]
- foo = bar
- bas = bar
+ foo = foo from one.cfg
+ baz = baz from two.cfg
-To point several files, the multi-line notation can be used::
+Example use of multi-line notation to include more than one file::
[DEFAULT]
- extends = file_one.ini
- file_two.ini
+ extends = one.cfg
+ two.cfg
When several files are provided, they are processed sequentially, following the
precedence rules explained above. This means that the list of files should go