diff options
author | Éric Araujo <merwok@netwok.org> | 2011-07-31 00:04:00 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-07-31 00:04:00 (GMT) |
commit | 560bf855d3788c31273162f0ccf777b3c1eedaa8 (patch) | |
tree | b5927cc9764eb884b716f9dcb4a35bfdc7fcb941 /Doc/distutils | |
parent | 35a7f5516dd408fbed0026e447a9c2e0ffb88b3c (diff) | |
download | cpython-560bf855d3788c31273162f0ccf777b3c1eedaa8.zip cpython-560bf855d3788c31273162f0ccf777b3c1eedaa8.tar.gz cpython-560bf855d3788c31273162f0ccf777b3c1eedaa8.tar.bz2 |
Fix regression with distutils MANIFEST handing (#11104, #8688).
The changed behavior of sdist in 2.7 broke packaging for projects that
wanted to use a manually-maintained MANIFEST file (instead of having a
MANIFEST.in template and letting distutils generate the MANIFEST).
The fixes that were committed for #8688 (d29399100973 by Tarek and
f7639dcdffc3 by me) did not fix all issues exposed in the bug report,
and also added one problem: the MANIFEST file format gained comments,
but the read_manifest method was not updated to handle (i.e. ignore)
them. This changeset should fix everything; the tests have been
expanded and I successfully tested with Mercurial, which suffered from
this regression.
I have grouped the versionchanged directives for these bugs in one place
and added micro version numbers to help users know the quirks of the
exact version they’re using. I also removed a stanza in the docs that
was forgotten in Tarek’s first changeset.
Initial report, thorough diagnosis and patch by John Dennis, further
work on the patch by Stephen Thorne, and a few edits and additions by
me.
Diffstat (limited to 'Doc/distutils')
-rw-r--r-- | Doc/distutils/sourcedist.rst | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/Doc/distutils/sourcedist.rst b/Doc/distutils/sourcedist.rst index fc860de..a9858d0 100644 --- a/Doc/distutils/sourcedist.rst +++ b/Doc/distutils/sourcedist.rst @@ -111,12 +111,22 @@ per line, regular files (or symlinks to them) only. If you do supply your own :file:`MANIFEST`, you must specify everything: the default set of files described above does not apply in this case. -.. versionadded:: 2.7 +.. versionchanged:: 2.7 + An existing generated :file:`MANIFEST` will be regenerated without + :command:`sdist` comparing its modification time to the one of + :file:`MANIFEST.in` or :file:`setup.py`. + +.. versionchanged:: 2.7.1 :file:`MANIFEST` files start with a comment indicating they are generated. Files without this comment are not overwritten or removed. +.. versionchanged:: 2.7.3 + :command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` + exists, like it did before 2.7. + See :ref:`manifest_template` section for a syntax reference. + .. _manifest-options: Manifest-related options @@ -124,16 +134,16 @@ Manifest-related options The normal course of operations for the :command:`sdist` command is as follows: -* if the manifest file, :file:`MANIFEST` doesn't exist, read :file:`MANIFEST.in` - and create the manifest +* if the manifest file (:file:`MANIFEST` by default) exists and the first line + does not have a comment indicating it is generated from :file:`MANIFEST.in`, + then it is used as is, unaltered + +* if the manifest file doesn't exist or has been previously automatically + generated, read :file:`MANIFEST.in` and create the manifest * if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest with just the default file set -* if either :file:`MANIFEST.in` or the setup script (:file:`setup.py`) are more - recent than :file:`MANIFEST`, recreate :file:`MANIFEST` by reading - :file:`MANIFEST.in` - * use the list of files now in :file:`MANIFEST` (either just generated or read in) to create the source distribution archive(s) @@ -271,8 +281,3 @@ character, and ``[range]`` matches any of the characters in *range* (e.g., ``a-z``, ``a-zA-Z``, ``a-f0-9_.``). The definition of "regular filename character" is platform-specific: on Unix it is anything except slash; on Windows anything except backslash or colon. - -.. versionchanged:: 2.7 - An existing generated :file:`MANIFEST` will be regenerated without - :command:`sdist` comparing its modification time to the one of - :file:`MANIFEST.in` or :file:`setup.py`. |