The code used to call os.path.join to build a regex but without escaping
the backslash, which lead to test failures on Windows. Antoine Pitrou
fixed it in 557a973709de by enhancing the code to accept both / and \,
with proper escaping, but in my opinion this goes against the distutils
feature freeze, hence this change.
has left two versions of customize_compiler, the original in
distutils.sysconfig and another copy in distutils.ccompiler, with some
parts of distutils calling one and others using the other.
Complete the revert back to only having one in distutils.sysconfig as
is the case in 3.x.
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
64-bit/32-bit Pythons. If the user does not explicitly override
the default C compiler by setting the CC environment variable,
Distutils will now attempt to compile extension modules with clang
if gcc-4.2 is required but not found. Also as a convenience, if
the user does explicitly set CC, substitute its value as the default
compiler in the Distutils LDSHARED configuration variable for OS X.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4. This change does not
attempt to override settings to support their use with Xcode 4.)
The check command was fixed by Kirill Kuzminykh.
The register command was using StringIO.getvalue, which uses “''.join”
and thus coerces to str using the default encoding (ASCII), so I changed
the code to use one extra intermediary list and correctly encode to
UTF-8.
I have tests to add in this file and it’s always nice to start from a
clean base. I’ve also changed a test that used to write an invalid
config file ('[global]command_packages = etc.' on one line), but the
test passes before and after this change, so either it magically works
or the test is poorly written. Sigh.
I need to copy the xxmodule.c file in other tests, 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 also took out the fixup_build_ext function, which is needed for tests
to pass on Unix shared builds and Windows debug builds.
Finally, I cleaned up a few things:
- don’t remove directories in tearDown when the parent class’ tearDown
has already registered the directories for removal
- simplify restoration of sys.path
- remove a few unused names found by pyflakes.
This is a regression introduced in 9211a5d7d0b4, when uses of ST_MTIME
constants were changed to uses of st_mtime attributes. As diagnosed in
the bug report, this change is not merely stylistic: st_mtime is a
float but ST_MTIME’s resolution is rounded to the seconds, so there was
a mismatch between the values seen by file_util and dep_util which
caused an sdist to be unnecessarily created a second time on an ext4
filesystem.
This patch has been tested by John S. Gruber, who reported the bug.
As this is a simple code revert, I think it’s okay to commit without a
unit test.
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.
set the MACOSX_DEPLOYMENT_TARGET env variable for the interpreter process
on OS X. This could cause failures in non-distutils subprocesses and was
unreliable since tests or user programs could modify the interpreter
environment after distutils set it. Instead, have distutils set the
the deployment target only in the environment of each build subprocess.
Continue to use the previous algorithm for deriving the deployment target
value:
if MACOSX_DEPLOYMENT_TARGET is not set in the interpreter's env:
use the interpreter build configure MACOSX_DEPLOYMENT_TARGET
elif the MACOSX_DEPLOYMENT_TARGET env value >= configure value:
use the env MACOSX_DEPLOYMENT_TARGET
else: # env value less than interpreter build configure value
raise exception
This allows building extensions that can only run on newer versions of
the OS than the version python was built for, for example with a python
built for 10.3 or later and an extension that needs to be built for 10.5.
Without this patch python will fail to start properly when the environment
variable MACOSX_DEPLOYMENT_TARGET is set on MacOSX and has a value that is
not compatible with the value during Python's build. This is caused by code
in sysconfig that was only meant to be used in disutils.
svn+ssh://pythondev@svn.python.org/python/branches/py3k
To comply with the 2.x doc style, the methods in trace.rst use brackets around
optional arguments. The rest is a mostly straight merge, modulo support changed
to test_support and use of the old super call style in test_tuple.
........
r86236 | eric.araujo | 2010-11-06 03:44:43 +0100 (sam., 06 nov. 2010) | 2 lines
Make sure each test can be run standalone (./python Lib/distutils/tests/x.py)
........
r86240 | eric.araujo | 2010-11-06 05:11:59 +0100 (sam., 06 nov. 2010) | 2 lines
Prevent ResourceWarnings in test_gettext
........
r86332 | eric.araujo | 2010-11-08 19:15:17 +0100 (lun., 08 nov. 2010) | 4 lines
Add missing NEWS entry for a fix committed by Senthil.
All recent modifications to distutils should now be covered in NEWS.
........
r86340 | eric.araujo | 2010-11-08 22:48:23 +0100 (lun., 08 nov. 2010) | 2 lines
This was actually fixed for the previous alpha.
........
r87271 | eric.araujo | 2010-12-15 20:09:58 +0100 (mer., 15 déc. 2010) | 2 lines
Improve trace documentation (#9264). Patch by Eli Bendersky.
........
r87273 | eric.araujo | 2010-12-15 20:30:15 +0100 (mer., 15 déc. 2010) | 2 lines
Use nested method directives, rewrap long lines, fix whitespace.
........
r87447 | eric.araujo | 2010-12-23 20:13:05 +0100 (jeu., 23 déc. 2010) | 2 lines
Fix typo in superclass method name
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87277 | eric.araujo | 2010-12-15 21:26:30 +0100 (mer., 15 déc. 2010) | 2 lines
Fix wrong name in docstring and doc (#10693). Original patch by Eli Benderski.
........