| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
The packaging.install.remove function (a.k.a. the uninstall feature)
takes a path argument to allow client code to use custom directories
instead of sys.path. The test used to give self.root_dir as path, which
corresponds to a prefix option, but prefix is not on sys.path, it’s only
the base directory used to compute the stdlib and site-packages
directory paths. The test now gives a valid site-packages path to the
function.
|
|
|
|
|
|
|
| |
install_lib may be the name of a module, a command or an option, so I
find it clearer to use site_packages to refer to a string object
containing the path of the site-packages directory created in a
temporary directory during tests.
|
|
|
|
|
|
| |
The goal of the regex is to catch a (alpha), b (beta), c or rc
(release candidate), so the existing pattern puzzled me. Tests were
OK before and after the change.
|
|
|
|
|
| |
This used to be buggy; Filip Gruszczyński contributed tests and a code
patch but the latter is not needed.
|
|
|
|
| |
Sweet taste of victory! Alexis, you can fix the threads leaks :)
|
|
|
|
|
|
|
|
|
| |
- minor cleanup in Metadata
- trigger creation of the sysconfig._CONFIG_VARS dict
- home_page is used over home-page: it’s not a compound word, it’s an
escaped space
Distutils2 is now synchronized with Packaging.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
PEP 370 features and sys.dont_write_bytecode are always available
in 3.3; the distutils2 backport still has the conditionals.
I also renamed an internal misnamed method and fixed a few things
(“packaging2” name, stray print, unused import, fd leak).
|
| | |
|
| | |
|
|/
|
|
|
| |
to unwarranted assumption about absolute paths: on OS X /var is a
symlink to /private/var. (Also true for /etc and /tmp).
|
|
|
|
|
|
|
|
|
|
|
| |
This method was supposed to return only the file under the dist-info
directory, but it actually returned all installed files.
The tests didn’t catch this because they were flawed; I updated them.
Thanks to Nadeem Vawda and Jeremy Kloth for testing.
As a bonus, the removal of os.path.relpath use should also fix the
Windows buildbots.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The command without arguments already prints all installed distributions
found.
In addition, change “releases” for “projects” in the description of the
list action. Strictly speaking, one installed distribution satisfies
the requirement for a release (i.e. version) of a project, but as
currently only one release per project can be installed at a time, the
two are somewhat equivalent, and “project” is more understandable in
help texts (which call their argument “dist”, by the way..)
|
|
|
|
| |
Original patch by Filip Gruszczyński.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New tests were added in test_metadata and old tests inherited from
distutils were still in test_dist, so I moved them into test_metadata
(except for one which was more at home in test_run) and merged
duplicates.
I also added some skips to lure contributors <wink>, optimized the
Metadata.update method a trifle, and added notes about a number of
issues.
A note: The tests in test_dist used to dump the Metadata objects to a
file in the METADATA format and look for strings in its contents; I
updated them to use the mapping API of Metadata instead. For some
fields with special writing rules, I have added tests to ensure my
conversion did not lose anything.
|
|
|
|
| |
instead of the locale encoding
|
| |
|
| |
|
|
|
|
|
|
| |
The right-hand part in [extension: foo] is now used as the name of the
extension module. (I changed the separator from = to : and allowed
whitespace to make the sections look nicer.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This huge module is the heir of six distutils modules, and contains
a number of miscellaneous functions. I have attempted to help readers
of the source code with an annoted __all__. Removed or deprecated
functions have been removed from the documentation; I’m working on
another patch to document the remaining public functions.
For the curious:
The unzip_file and untar_file were used by (or intended to be used by)
“pysetup install path/to/archive.tar.gz”, but the code presently used
shutil.unpack_archive and an helper function, so I just deleted them.
They’re still in the repository if we need them in the future.
The find_packages function is not used anymore but I want to discuss
module and package auto-discovery (in “pysetup create”) again before
removing it.
subst_vars now lives in sysconfig; rfc822_escape is inlined in
packaging.metadata. Other functions are for internal use only, or
deprecated; I have left them out of __all__ and sprinkled TODO notes
for future cleanups.
|
|
|
|
|
|
| |
There was already a test for this, but it was complicated and had a
subtle bug (custom command objects need to be put in dist.command_obj so
that other command objects may see them) that rendered it moot.
|
|
|
|
|
|
| |
Packaging uses the shutil.make_archive function copied from distutils,
which does not support compress. There is no test to check that
“bdist --format whatever” works, so this slipped by.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These options were used to implement “setup.py --name”,
“setup.py --version”, etc. which are now handled by the pysetup metadata
action or direct parsing of the setup.cfg file.
As a side effect, the Distribution class no longer accepts a 'url' key
in its *attrs* argument: it has to be 'home-page' to be recognized as a
valid metadata field and passed down to the dist.metadata object.
I cleaned up some comments, docstrings and code along the way.
|
| |
|
| |
|
|
|
|
| |
See the distutils commit message for more detail.
|
| |
|
| |
|
|
|
|
| |
I need this to fix the failing test_command_install_dist.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.e. to check the files found are what we expect)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Patch by Francisco Martin Brugue.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
- Use shortcut dist.version instead of going through metadata;
- Use %r throughout to display project names and paths.
|
| |
|
| |
|
|
|
|
|
| |
This fixes a bug with the remove (uninstall) feature on Windows. Patch
by Thomas Holmes.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
test_command_build_ext.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Original patch by Vinay Sajip on #11637.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
- Move a tearDown method right after setUp
- Use assertRaises instead of reinventing it
- Skip a test instead of commenting it out, as a reminder
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|