[Python-checkins] cpython: Make example of file inclusion in setupcfg more obvious

eric.araujo python-checkins at python.org
Mon Jun 6 17:14:13 CEST 2011


http://hg.python.org/cpython/rev/4cd8469e15ef
changeset:   70680:4cd8469e15ef
user:        Éric Araujo <merwok at netwok.org>
date:        Mon Jun 06 01:58:25 2011 +0200
summary:
  Make example of file inclusion in setupcfg more obvious

files:
  Doc/packaging/setupcfg.rst |  29 ++++++++++++-------------
  1 files changed, 14 insertions(+), 15 deletions(-)


diff --git a/Doc/packaging/setupcfg.rst b/Doc/packaging/setupcfg.rst
--- a/Doc/packaging/setupcfg.rst
+++ b/Doc/packaging/setupcfg.rst
@@ -77,38 +77,37 @@
 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list