summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
Commit message (Collapse)AuthorAgeFilesLines
* Minor code simplificationÉric Araujo2011-08-251-3/+2
|
* Another (hopefully last) fix for test_packaging on Windws (#12678)Éric Araujo2011-08-251-3/+13
|
* Fix test_packaging on Windows (#12678).Éric Araujo2011-08-242-4/+16
| | | | See the distutils commit message for more detail.
* Try to fix packaging tests using build_ext on Windows (#12678)Éric Araujo2011-08-232-19/+18
|
* Fix test_command_install_dist in shared Python buildsÉric Araujo2011-08-211-0/+1
|
* Factor out the build_ext fixup for shared Python builds.Éric Araujo2011-08-212-22/+29
| | | | I need this to fix the failing test_command_install_dist.
* Remove obsolete codeÉric Araujo2011-08-211-2/+0
|
* Issue #12326: refactor usage of sys.platformVictor Stinner2011-08-201-2/+1
| | | | | | | | * 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')
* Add a simple test for the packaging RECORD file.Éric Araujo2011-08-201-1/+53
| | | | | | | | | 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).
* Minor cleanupÉric Araujo2011-08-202-12/+7
| | | | | | - 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
* Add a test for extension modules in the old-style record fileÉric Araujo2011-08-201-1/+24
|
* Rework test_old_record a bit to make the test more exactÉric Araujo2011-08-201-13/+13
| | | | (i.e. to check the files found are what we expect)
* Refactor the copying of xxmodule.c in packaging tests (#12141).Éric Araujo2011-08-202-27/+37
| | | | | | | | | | | 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.
* Restore $HOME after test has run (should fix #12765)Éric Araujo2011-08-191-0/+3
|
* Improve “pysetup create” help messages.Éric Araujo2011-08-181-18/+19
| | | | | | | The example version numbers were invalid and “package” was misused. I also made lines shorter, replaced “e-mail” with “email” (more common in the stdlib and I believe in English generally) and tweaked a few other things.
* Fix typoÉric Araujo2011-08-181-1/+1
|
* Remove class that was only useful with Sphinx autodocÉric Araujo2011-08-181-8/+0
|
* Use our existing drop-in, no-op decorator instead of redefining it.Éric Araujo2011-08-111-6/+2
| | | | Patch by Francisco Martin Brugue.
* Fix wrong use of root logger in packaging (also a NameError)Éric Araujo2011-08-041-1/+1
|
* Stop trying to write into the stdlib during packaging tests (#12331).Éric Araujo2011-07-311-23/+31
| | | | | | | | | | This prevents tests from failing when run from a Python installed in a read-only directory. The code is a bit uglier; shutil.copytree calls copystat on directories behind our back, so I had to add an os.walk with os.chmod (*and* os.path.join!) calls. shutil, I am disappoint. This changeset is dedicated to the hundreds of neurons that were lost while I was debugging this on an otherwise fine afternoon.
* Minor packaging cleanup.Éric Araujo2011-07-295-21/+21
| | | | | - Use shortcut dist.version instead of going through metadata; - Use %r throughout to display project names and paths.
* Make TypeError message from Command.__init__ more usefulÉric Araujo2011-07-291-1/+2
|
* Let all pysetup actions return a meaningful 0 or 1 exit code (#12222).Éric Araujo2011-07-291-32/+34
| | | | | | | | | | 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.
* Let pysetup list exit with a non-zero code when no result is found (#11409).Éric Araujo2011-07-291-1/+7
| | | | | | | “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.
* test_packaging should clean up after itself (but it doesn't really)Antoine Pitrou2011-07-151-6/+9
|
* Silence 2to3 warnings in packaging testsÉric Araujo2011-07-151-4/+8
|
* Clear packaging.database caches in placeÉric Araujo2011-07-151-6/+5
|
* Close file handles in a timely manner in packaging.database (#12504).Éric Araujo2011-07-082-7/+7
| | | | | This fixes a bug with the remove (uninstall) feature on Windows. Patch by Thomas Holmes.
* Factor out code used by packaging commands for HTTP requests (#12169).Éric Araujo2011-07-087-139/+93
| | | | | | We now have one function to prepare multipart POST requests, and we use CRLF, as recommended by the HTTP spec (#10150). Initial patch by John Edmonds.
* Closes #12391: temporary files are now cleaned up.Vinay Sajip2011-07-071-7/+5
|
* Issue #9516: Port the revised deployment target processing for OSX fromNed Deily2011-06-291-0/+23
| | | | distutils to packaging.
* Issue #9516: Port OS X deployment target tests from distutils to packagingNed Deily2011-06-291-1/+92
| | | | test_command_build_ext.
* Issue #12141: Install copies of template C module file so thatNed Deily2011-06-281-0/+5
| | | | | | test_build_ext of test_distutils and test_command_build_ext of test_packaging are no longer silently skipped when run outside of a build directory.
* packaging: Add the project directory to sys.path to support local setup hooks.Éric Araujo2011-06-192-10/+35
| | | | Original patch by Vinay Sajip on #11637.
* Fix typoÉric Araujo2011-06-192-2/+2
|
* Make decorators used in packaging preserve docstringsÉric Araujo2011-06-171-5/+7
|
* Brange mergeÉric Araujo2011-06-1716-147/+123
|\
| * Minor tweaks to packaging tests.Éric Araujo2011-06-173-34/+28
| | | | | | | | | | | | - Move a tearDown method right after setUp - Use assertRaises instead of reinventing it - Skip a test instead of commenting it out, as a reminder
| * Packaging tests: don’t let an internal cache grow indefinitely.Éric Araujo2011-06-172-0/+4
| | | | | | | | | | | | | | | | | | Victor Stinner diagnosed on #12167 that some reference leaks came from util._path_created, a set used for caching; there are two tests that cause additions to this set, so now they clear it in tearDown, avoiding 17 refleaks. (My tests show that it’s necessary to clear the set in only one test, clearing it in both does not stop more refleaks, but there’s no harm in doing it.)
| * Minor tweaks in packaging’s test_dist.Éric Araujo2011-06-171-21/+15
| | | | | | | | | | | | | | | | | | | | - Use different Metadata objects to write and read a PKG-INFO (METADATA) file, to make sure the tested values come from the file - No need to restore methods on an instance after monkey-patching them: the methods are still the same on the class - Harmonize dedent calls
| * Remove unused code in packaging.pypi.distÉric Araujo2011-06-161-4/+1
| |
| * Stop binding sys.path as default parameter value in packaging.Éric Araujo2011-06-164-27/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | The two public functions in database default to sys.path if the given *paths* argument is None; the private functions don’t have default values for their arguments anymore, which is fine as the public functions that call them pass their arguments down. Likewise in install, the functions will pass down their *paths* arguments down to database functions. A one-line unneeded function in install was removed instead of being changed, and the few remaining tests that used brute-force restoration of sys.path have been cleaned up to use sys.path.remove.
| * Packaging: remove last mentions and uses of setup.py in the code.Éric Araujo2011-06-167-32/+15
| | | | | | | | | | Now only the compatibility layer (in create, util and install) talk about setup.py.
| * Clean up packaging.tests.test_mixin2to3Éric Araujo2011-06-161-34/+43
| |
* | Issue #12333: run tests on the new module in a subprocessVictor Stinner2011-06-171-24/+16
| | | | | | | | | | | | | | | | | | | | | | | | It is not possible to unload a module written in C, so use a subprocess to run the tests on the module compiled by test_build_ext(). Using a subprocess, we don't have to unload the module, save/restore sys.path, and the test can be run more than once. This commit fixes also an access error on rmtree() on Windows: because the module was not really unloaded, it was not possible to remove the temporary directory (it is not possible to remove a directory on Windows if it still contains an open file).
* | Issue #12333: close files before removing the directoryVictor Stinner2011-06-171-3/+2
| | | | | | | | | | packaging.tests.support.TempdirManager: rmtree() fails on Windows if there are still open files in the directory.
* | Issue #12333: restore the previous dir before removing the current directoryVictor Stinner2011-06-171-8/+5
|/ | | | | | | packaging.tests.support.TempdirManager: removing the current directory is not allowed on Windows or Solaris. Store the current directory and restore it before removing the temporary directory (which is used as the working directory during the tests).
* Issue #12167: Fix a reafleak in packaging.tests.PyPIServer constructorVictor Stinner2011-06-151-1/+3
| | | | Don't modify mutable default arguments...
* Also specify encoding when reading setup.cfg (#12320)Éric Araujo2011-06-121-1/+1
|
* Specify the encoding of the setup.cfg in one packaging test (#12320)Éric Araujo2011-06-121-1/+1
|