The changed behavior of sdist in 3.1 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 (76643c286b9f by Tarek and
d54da9248ed9 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 the 2.7 version 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.
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.
with the `-m` (or `--match`) option. This works with all test cases
using the unittest module. This is useful with long test suites
such as test_io or test_subprocess.
with the `-m` (or `--match`) option. This works with all test cases
using the unittest module. This is useful with long test suites
such as test_io or test_subprocess.
importlib.import_module eschews a number of issues that __import__ has.
Reviewed by Brett Cannon. (The docstring of __import__ was already
updated in 3d490c3a019e, for #7397.)
This will help scripts calling pysetup know if a command failed.
Printing/logging was also made more consistent, and a few things were
cleaned up. In particular, the error/Ctrl-C handling was moved from the
_run function up to the main function.
The run action is not fixed yet; it returns the dist.Distribution
instance, which is needed by test_uninstall and not trivial to fix.
“pysetup list” or “pysetup list --all” will continue to return 0 if no
distribution is found (it’s not an error), but “pysetup list
some.project” will now exit with 1 if no matching installed distribution
is found. Based on a patch by Kelsey Hightower.