Commits

Julien Jehannet committed 8b6552d

new patches

  • Participants
  • Parent commits 7a1e7e9

Comments (0)

Files changed (4)

File make_directory.diff

+# HG changeset patch
+# Date 1296334475 -3600
+# User Julien Jehannet <julien@smaf.org>
+# Parent 7dc4323bb9652aab1667431eb62e25c4236b57a6
+Add new format `files` in souce distribution. Used in debugging.
+
+diff --git a/distutils2/_backport/shutil.py b/distutils2/_backport/shutil.py
+--- a/distutils2/_backport/shutil.py
++++ b/distutils2/_backport/shutil.py
+@@ -328,6 +328,18 @@ def _get_uid(name):
+         return result[2]
+     return None
+ 
++def _make_directory(archive_dir, base_dir, verbose=0, dry_run=0, owner=None,
++                    group=None, logger=None):
++    """Create a directory full of files coming from 'base_dir'.
++
++    The output directory name will be named 'base_dir'
++
++    Returns the output directory.
++    """
++    if not dry_run:
++        copytree(base_dir, archive_dir)
++    return archive_dir
++
+ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
+                   owner=None, group=None, logger=None):
+     """Create a (possibly compressed) tar file from all the files under
+@@ -473,6 +485,7 @@ def _make_zipfile(base_name, base_dir, v
+     return zip_filename
+ 
+ _ARCHIVE_FORMATS = {
++    'files': (_make_directory, [], "a directory full of files"),
+     'gztar': (_make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
+     'bztar': (_make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
+     'ztar':  (_make_tarball, [('compress', 'compress')],
-setpcfg.diff
+make_directory.diff
+setupcfg.diff

File setpcfg.diff

-# HG changeset patch
-# User Julien Jehannet <julien@smaf.org>
-# Date 1296314379 -3600
-# Node ID 5cad807c4470e40ad484bd94922b8e2f196406c0
-# Parent 34210b95cffd268c60f515745a0365f2126bc314
-update setupcfg documentation page with some notes and new examples
-
-- replace underscore by dash in fields
-- use PEP rst directive
-- new section information
-
-Notes:
-- field names are case-insensitive
-- some metadata fields are automatically generated
-
-New examples:
-- setup_hook
-- use-2to3
-
-diff --git a/docs/source/setupcfg.rst b/docs/source/setupcfg.rst
---- a/docs/source/setupcfg.rst
-+++ b/docs/source/setupcfg.rst
-@@ -10,21 +10,32 @@ Each section contains a description of i
- - Options that are marked *\*multi* can have multiple values, one value
-   per line.
- - Options that are marked *\*optional* can be omited.
--- Options that are marked *\*environ* can use environement markes, as described
--  in PEP 345.
-+- Options that are marked *\*environ* can use environment markers, as described
-+  in :PEP:`345`.
-+
- 
- The sections are:
- 
--- global
--- metadata
--- files
--- command sections
-+global
-+    Global options for Distutils2.
-+
-+metadata
-+    The metadata section contains the metadata for the project as described in
-+    :PEP:`345`.
-+
-+files
-+    Declaration of package files included in the project.
-+
-+`command` sections
-+    Redefinition of user options for Distutils2 commands.
- 
- 
- global
- ======
- 
--Contains global options for Distutils2. This section is shared with Distutils1.
-+Contains global options for Distutils2. This section is shared with Distutils1
-+(legacy version distributed in python 2.X standard library).
-+
- 
- - **commands**: Defined Distutils2 command. A command is defined by its fully
-   qualified name.
-@@ -44,7 +55,7 @@ Contains global options for Distutils2. 
- 
-     [global]
-     compiler =
--        package.compilers.CustomCCompiler
-+        package.compiler.CustomCCompiler
- 
-   *\*optional* *\*multi*
- 
-@@ -52,21 +63,28 @@ Contains global options for Distutils2. 
-   :file:`setup.cfg` file is read. The callable receives the configuration
-   in form of a mapping and can make some changes to it. *\*optional*
- 
-+  Example::
-+
-+    [global]
-+    setup_hook = distutils2.tests.test_config.hook
-+
- 
- metadata
- ========
- 
- The metadata section contains the metadata for the project as described in
--PEP 345.
-+:PEP:`345`.
- 
-+.. Note::
-+    Field names are case-insensitive.
- 
- Fields:
- 
- - **name**: Name of the project.
--- **version**: Version of the project. Must comply with PEP 386.
-+- **version**: Version of the project. Must comply with :PEP:`386`.
- - **platform**: Platform specification describing an operating system supported
-   by the distribution which is not listed in the "Operating System" Trove
--  classifiers. *\*multi* *\*optional*
-+  classifiers (:PEP:`301`). *\*multi* *\*optional*
- - **supported-platform**: Binary distributions containing a PKG-INFO file will
-   use the Supported-Platform field in their metadata to specify the OS and
-   CPU for which the binary distribution was compiled.  The semantics of
-@@ -113,14 +131,18 @@ Example::
-     name = pypi2rpm
-     version = 0.1
-     author = Tarek Ziade
--    author_email = tarek@ziade.org
-+    author-email = tarek@ziade.org
-     summary = Script that transforms a sdist archive into a rpm archive
-     description-file = README
--    home_page = http://bitbucket.org/tarek/pypi2rpm
-+    home-page = http://bitbucket.org/tarek/pypi2rpm
-+    project-url: RSS feed, https://bitbucket.org/tarek/pypi2rpm/rss
- 
-     classifier = Development Status :: 3 - Alpha
-         License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)
- 
-+.. Note::
-+    Some metadata fields seen in :PEP:`345` are automatically generated
-+    as the Metadata-Version value for instance.
- 
- 
- files
-@@ -150,15 +172,20 @@ Example::
-             setup.py
- 
- 
--command sections
--================
-+`command` sections
-+==================
- 
--Each command can have its options described in :file:`setup.cfg`
--
-+Each Distutils2 command can have its own user options defined in :file:`setup.cfg`
- 
- Example::
- 
-     [sdist]
--    manifest_makers = package.module.Maker
-+    manifest-builders = package.module.Maker
- 
- 
-+To override the building class in order to compile your python2 files to python3::
-+
-+    [build_py]
-+    use-2to3 = True
-+
-+

File setupcfg.diff

+# HG changeset patch
+# Date 1296379767 -3600
+# User Julien Jehannet <julien@smaf.org>
+# Parent 95d726a89a02ea4c51b820b697875c2781f64468
+update setupcfg documentation page
+
+diff --git a/docs/source/distutils/sourcedist.rst b/docs/source/distutils/sourcedist.rst
+--- a/docs/source/distutils/sourcedist.rst
++++ b/docs/source/distutils/sourcedist.rst
+@@ -86,8 +86,8 @@ source distribution:
+   distributions, but in the future there will be a standard for testing Python
+   module distributions)
+ 
+-* :file:`README.txt` (or :file:`README`), :file:`setup.py` (or whatever  you
+-  called your setup script), and :file:`setup.cfg`
++* :file:`setup.py` (or whatever you called your setup script), and
++  :file:`setup.cfg`
+ 
+ * all files that matches the ``package_data`` metadata.
+   See :ref:`distutils-installing-package-data`.
+@@ -95,6 +95,10 @@ source distribution:
+ * all files that matches the ``data_files`` metadata.
+   See :ref:`distutils-additional-files`.
+ 
++.. Warning::
++    In Distutils2, README or README.txt files are not more included in source
++    distribution by default
++
+ Sometimes this is enough, but usually you will want to specify additional files
+ to distribute.  The typical way to do this is to write a *manifest template*,
+ called :file:`MANIFEST.in` by default.  The manifest template is just a list of
+diff --git a/docs/source/setupcfg.rst b/docs/source/setupcfg.rst
+--- a/docs/source/setupcfg.rst
++++ b/docs/source/setupcfg.rst
+@@ -7,8 +7,8 @@ Distutils2 to replace the :file:`setup.p
+ 
+ Each section contains a description of its options.
+ 
+-- Options that are marked *\*multi* can have multiple values, one value
+-  per line.
++- Options that are marked *\*multi* can have multiple values, one value per
++  line.
+ - Options that are marked *\*optional* can be omited.
+ - Options that are marked *\*environ* can use environment markers, as described
+   in :PEP:`345`.
+@@ -49,7 +49,7 @@ Contains global options for Distutils2. 
+   *\*optional* *\*multi*
+ 
+ - **compilers**: Defined Distutils2 compiler. A compiler is defined by its fully
+-  qualified name. 
++  qualified name.
+ 
+   Example::
+ 
+@@ -66,7 +66,8 @@ Contains global options for Distutils2. 
+   Example::
+ 
+     [global]
+-    setup_hook = distutils2.tests.test_config.hook
++    setup_hook =
++        distutils2.tests.test_config.hook
+ 
+ 
+ metadata
+@@ -142,7 +143,7 @@ Example::
+ 
+ .. Note::
+     Some metadata fields seen in :PEP:`345` are automatically generated
+-    as the Metadata-Version value for instance.
++    (for instance Metadata-Version value).
+ 
+ 
+ files
+@@ -170,6 +171,14 @@ Example::
+ 
+     extra_files =
+             setup.py
++            README
++
++.. Note::
++    In Distutils2, setup.cfg will be implicitly included.
++
++.. Warning::
++    In Distutils2, README or README.txt files are not more included in source
++    distribution by default
+ 
+ 
+ `command` sections
+@@ -183,7 +192,7 @@ Example::
+     manifest-builders = package.module.Maker
+ 
+ 
+-To override the building class in order to compile your python2 files to python3::
++To override the build class in order to generate Python3 code from your Python2 base::
+ 
+     [build_py]
+     use-2to3 = True