Commit Graph

1498 Commits

Author SHA1 Message Date
Antoine Pitrou 667383c8d4 Issue #13193: Fix distutils.filelist.FileList under Windows. The
"recursive-include" directive now recognizes both legal path separators.
2011-11-12 01:33:59 +01:00
Mark Hammond 3dca9f52a4 normalize whitespace in Lib/distutils/msvc9compiler.py 2011-10-17 11:35:06 +11:00
Mark Hammond 323b5daa10 Issue #7833: Ext. modules built using distutils on Windows no longer get a manifest 2011-10-17 11:05:36 +11:00
Éric Araujo 5baef6d23b Increase test coverage for distutils.filelist (#11751).
Patch by Justin Love.
2011-10-14 18:15:31 +02:00
Éric Araujo 017e535bde Fix distutils’ check and register Unicode handling (#13114).
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.
2011-10-09 07:11:19 +02:00
Éric Araujo 5fb16cd1d2 Make C code in one distutils test comply with ISO C (#10359).
Patch by Hallvard B Furuseth.
2011-10-08 02:15:55 +02:00
Éric Araujo a13cd39533 Fix determination of Metadata version (#8933). Patch by Filip Gruszczyński. 2011-09-10 05:39:45 +02:00
Éric Araujo 0c4007641e Slight cleanup in distutils test_dist.
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.
2011-09-10 05:37:33 +02:00
Jesus Cea c6072d8675 Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch by Antoine Pitrou 2011-09-09 18:50:59 +02:00
Éric Araujo 0f2dbf3645 Warn instead of crashing because of invalid path in MANIFEST.in (#8286).
sdist used to crash with a full traceback dump instead of printing a
nice warning with the faulty line number.
2011-09-03 00:47:07 +02:00
Éric Araujo cb18d077c6 Enable catching WARN-level logging messages in distutils' test_sdist 2011-09-03 00:28:43 +02:00
Éric Araujo 429b890561 Make bdist_* commands respect --skip-build passed to bdist (#10946) 2011-08-30 01:48:59 +02:00
Éric Araujo 288ebb446e Add FIXME note as a reminder 2011-08-26 16:35:19 +02:00
Éric Araujo 1bd3b9cea0 Branch merge 2011-08-26 16:32:36 +02:00
Éric Araujo e10fbb1550 Backport tests for the distutils install command 2011-08-26 02:06:27 +02:00
Éric Araujo cea5fc0b7b Try to fix test_distutils on Windows (#12678) 2011-08-26 02:05:44 +02:00
Éric Araujo c811fb2d56 Add tests for build_ext --user (backport from 3.2) 2011-08-26 02:00:14 +02:00
Éric Araujo 04612d6092 Refactor helpers for compiling the xx module in distutils tests.
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.
2011-08-26 01:56:15 +02:00
Nadeem Vawda 367d4c8a80 Issue #12678: Fix distutils sdist test on Windows.
Patch by Jeremy Kloth.
2011-08-21 22:40:04 +02:00
Éric Araujo 33af263d36 Fix incorrect mtime comparison in distutils (#11933).
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.
2011-08-02 03:16:12 +02:00
Éric Araujo 560bf855d3 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.
2011-07-31 02:04:00 +02:00
Ned Deily 041645a8cb Issue #9516: Change distutils to no longer globally attempt to check and
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.
2011-06-28 19:40:39 -07:00
Ned Deily 053c6ad6b7 Issue #9516: Correct and expand OS X deployment target tests in distutils
test_build_ext.
2011-06-28 19:39:10 -07:00
Ned Deily 63144c6444 Issue #12141: Install a copy of template C module file so that
test_build_ext of test_distutils is no longer silently skipped when
run outside of a build directory.
2011-06-28 00:39:19 -07:00
Benjamin Peterson a573e0df36 merge 2.7.2 release branch 2011-06-11 09:51:21 -05:00
Benjamin Peterson 9843ba5e54 bump to 2.7.2 final 2011-06-11 09:42:44 -05:00
Éric Araujo 865b573c04 Remove unnecessary executable bit on one distutils file 2011-06-04 20:45:33 +02:00
Benjamin Peterson cd20705902 bump to 2.7.2rc1 2011-05-29 16:50:27 -05:00
Éric Araujo be77831375 Fix test_distutils when sys.dont_write_bytecode is true (#9831).
The tests now pass all combinations of -O/-OO and -B.  See also #7071
and #6292 for previous variations on the same theme.
2011-05-28 23:21:19 +02:00
Éric Araujo 78d9133989 Branch merge 2011-05-25 18:06:35 +02:00
Ronald Oussoren a70286b71d Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET is set in shell.
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.
2011-05-15 16:44:27 +02:00
Éric Araujo b76eb9743e Make test_distutils pass without zlib (fixes #9435) 2011-05-08 16:27:13 +02:00
Éric Araujo a27c8e3746 Branch merge 2011-05-01 02:09:37 +02:00
Éric Araujo 015014ff63 Fix file handle leak 2011-05-01 02:05:58 +02:00
Éric Araujo e4f8d839a7 Fix improper tests in RegisterTestCase 2011-04-14 03:49:19 +02:00
Ezio Melotti c2077b0d9b #11565: Fix several typos. Patch by Piotr Kasprzyk. 2011-03-16 12:34:31 +02:00
Éric Araujo 54274ad96a Merged revisions 86236,86240,86332,86340,87271,87273,87447 via svnmerge from
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
........
2011-02-03 00:12:18 +00:00
Éric Araujo e04c13cfc1 Merged revisions 87280 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87280 | eric.araujo | 2010-12-15 22:07:22 +0100 (mer., 15 déc. 2010) | 2 lines

  Fix build_ext with VS 8.0.  Patch by Hirokazu Yamamoto (#9558).
........
2010-12-15 21:15:25 +00:00
Éric Araujo 6e52cf32ad Merged revisions 87277 via svnmerge from
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.
........
2010-12-15 20:33:50 +00:00
Phillip J. Eby 5cf79f6637 Fix for issue10367, courtesy of Daniel Tavares. 2010-12-03 17:00:40 +00:00
Benjamin Peterson 3e0fa42d87 2.7.1 final version bump 2010-11-27 14:40:29 +00:00
Ezio Melotti 2623a37852 Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line

  #9424: Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 13:34:58 +00:00
Éric Araujo 4fadd53f51 Merged revisions 86601,86605 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

In 2.7, there was only one NameError.

........
  r86601 | eric.araujo | 2010-11-20 20:35:27 +0100 (sam., 20 nov. 2010) | 2 lines

  Fix two NameErrors in distutils (#10407)
........
  r86605 | eric.araujo | 2010-11-20 20:37:28 +0100 (sam., 20 nov. 2010) | 2 lines

  Add entry for r86601
........
2010-11-20 20:02:41 +00:00
Benjamin Peterson cc21417408 2.7.1rc1 bump 2010-11-13 17:33:04 +00:00
Éric Araujo 3ba70368f5 Merged revisions 86438 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86438 | eric.araujo | 2010-11-12 23:25:23 +0100 (ven., 12 nov. 2010) | 2 lines

  And now for something completely different: Finish fixing #10252 again.
........
2010-11-12 22:27:28 +00:00
Éric Araujo 4ca58a9fd2 Merged revisions 86274,86276 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86274 | eric.araujo | 2010-11-06 16:57:52 +0100 (sam., 06 nov. 2010) | 2 lines

  Correct the fix for #10252: Popen objects have no close method.
........
  r86276 | eric.araujo | 2010-11-06 19:03:52 +0100 (sam., 06 nov. 2010) | 2 lines

  Fix #10252 again (hopefully definitely).  Patch by Brian Curtin.
........
2010-11-12 20:31:17 +00:00
Éric Araujo db553be7fb Remove one trace of Mac OS 9 support (#7908 follow-up)
This was overlooked in r80804.  This change is not really a bug fix,
but the release manager agreed to it.  There is no NEWS entry, like
in the original commit.
2010-11-06 14:16:30 +00:00
Éric Araujo e9954b56f4 Merged revisions 86244 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86244 | eric.araujo | 2010-11-06 05:48:05 +0100 (sam., 06 nov. 2010) | 3 lines

  Prevent race condition with mkdir in distutils.  Patch by Arfrever on #9281.
........
2010-11-06 04:53:42 +00:00
Éric Araujo d1feff70a3 Merged revisions 86223-86224,86226,86234 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86223 | eric.araujo | 2010-11-06 00:51:56 +0100 (sam., 06 nov. 2010) | 2 lines

  Always close files in distutils code and tests (#10252).
........
  r86224 | eric.araujo | 2010-11-06 00:58:34 +0100 (sam., 06 nov. 2010) | 2 lines

  Add missing entry for r86223.
........
  r86226 | eric.araujo | 2010-11-06 00:59:32 +0100 (sam., 06 nov. 2010) | 2 lines

  Of course, I forgot one file in r86223.
........
  r86234 | eric.araujo | 2010-11-06 03:10:32 +0100 (sam., 06 nov. 2010) | 2 lines

  Also close file descriptors from os.popen and subprocess.Popen
........
2010-11-06 04:06:18 +00:00
Barry Warsaw 54052c00a7 Only hack cmd.library_dirs when running under Py_ENABLE_SHARED. Tested both
with and without --enable-shared on Ubuntu 10.10.  Hopefully this finally
solves bug 10126.  Will check 3.1 and py3k next.
2010-10-22 15:31:44 +00:00