* Use str.startswith(tuple): I didn't know this Python feature, Python rocks!
* Replace sometimes sys.platform.startswith('linux') with
sys.platform == 'linux'
* sys.platform doesn't contain the major version on Cygwin on Mac OS X
(it's just 'cygwin' and 'darwin')
On Linux, sys.platform doesn't contain the major version anymore. It is now
always 'linux', instead of 'linux2' or 'linux3' depending on the Linux version
used to build Python.
The existing test_record is not easily extendable to add script files or
extension modules: it collects all files from fake_dists and generates a
RECORD file at runtime. I felt more comfortable adding a new test
written from scratch more self-contained (just one project with
well-defined files) and more stupid (the checksums and sizes are
computed once and hard-coded).
- Rename an attribute and create it in initialize_options instead of
finalize_options to match the other install_* classes
- Remove unnecessary method call in tests
I need to copy this file in another test too, so I moved the support
code to distutils.tests.support and improved it to use proper skip
machinery instead of custom print/return/test suite fiddling.
Contrary to my similar change in distutils tests, I did not add support
for finding xxmodule.c when running a test from the tests directory,
because in that case my compiler didn’t find Python.h, so I figured it’s
better to skip than to fail.
I made a note a month ago that install --record wrote incorrect entries
for extension modules (I think the problem was that the first character
of the file was stripped), so I’m now adding a test to try to reproduce
that in the current versions.
I need to copy this file in another test too, so I moved the support
code to distutils.tests.support and improved it:
- don’t skip when run from the Lib/distutils/tests directory
- use proper skip machinery instead of custom print/return/test suite
fiddling.
I added a link from the term “virtual subclass” to the glossary entry
for ABCs but this was not enough, now the glossary briefly defines
“virtual” and links to the abc module doc which contains more mentions
of virtual subclasses.