1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

66 commits

Author SHA1 Message Date
xoviat
736cd67d9d Add regression test 2018-01-28 16:44:38 -06:00
Pradyun Gedam
353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Benoit Pierre
961737ab98 Fix integration tests on Windows (#4769) 2017-10-06 20:51:42 +01:00
Benoit Pierre
d778fc330e Small tests related cleanups (#4703)
* fix test not using temporary directory
* avoid creating a `cache_dir` directory in the source tree
* drop `data` fixture from tests that don't use it

* tests: fix pytest warning
2017-10-02 18:33:52 +01:00
Xavier Fernandez
1c7876fa49 Fix test_install_no_binary_disables_building_wheels
The only files present in the cache were http cache files from the
pip install wheel command.
2017-07-21 18:08:53 +02:00
Xavier Fernandez
b709b1ef4a Add a common_wheels fixtures providing wheel & setuptools wheels 2017-07-21 18:08:53 +02:00
Pradyun S. Gedam
9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
Thomas Kluyver
20955812bf Merge branch 'master' into pep518 2017-05-19 11:04:32 +01:00
Pradyun S. Gedam
1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Thomas Kluyver
61f89c5e80 Make pep8 happy again 2017-05-13 23:10:34 +01:00
Thomas Kluyver
2e865164ba Find build requirements in the tmp copy of test data folder 2017-05-13 23:05:11 +01:00
Thomas Kluyver
aee5b6c984 Download packages to path, not to file:/// URL 2017-05-13 22:41:15 +01:00
Thomas Kluyver
2b2bdd1567 Download setuptools, wheel during tests
Rather than storing wheels in the test data directory
2017-05-13 19:51:38 +01:00
Brandon L. Reiss
1902760220 Fix egg= param in relative path tests
Also, reduce the number of test cases because these tests take too long.

The issue is that the setup and teardown of the test environment takes a
long time, and in order to reuse the same test environment, we must
perform install/uninstall cycles to test different URL and path formats.

A better approach might be to generate `FSPkg` using a function that
writes the `setup.py` and `__init__.py` files to a new directory. The
test packages would be easy to generate and save the uninstall time.

For now, we reduce the number of URL/path formats tested, since the
previous test coverage was even more limited.
2017-04-06 09:49:57 -04:00
Brandon L. Reiss
c932706bbe Split relative paths tests to avoid timeout
Tests are timing out and also not following requirements/install test
factorization. Split to conform to test organization and to prevent
test timeout.
2017-04-05 18:38:26 -04:00
Donald Stufft
95b9541ed4 Remove the deprecated --(no-)use-wheel flags 2017-03-20 10:49:56 -04:00
Xavier Fernandez
5b7060a20d Deprecate the _strip_postfix function (#4174)
It only happens for editable-non-file URLs and is an undocumented
behavior.
2017-02-13 10:02:20 +01:00
Pradyun
8f9a48e806 Fix Tests for Travis CI (#4199)
* FIx Tests to pip paramiko

* Make the test completely local

It's easier to depend on a local package than to depend on a network based test.
2016-12-23 11:09:45 +01:00
Donald Stufft
f1d0939d63 Revert "Normalize file URLs" (#4071) 2016-11-03 11:24:34 -04:00
Xavier Fernandez
8f171cd212 Fix environment markers evaluation - issue #3829 (#4051) 2016-11-02 08:28:17 -04:00
Paul Moore
84c969669c Merge pull request #3724 from yamt/norm-path
Normalize file URLs
2016-08-09 18:23:56 +01:00
Jakub Wilk
6dc28c1b31 Fix typos 2016-06-10 21:29:43 +02:00
burrows
3c11bb4de9 Give markers chance to remove incompat wheel links
`pip install -r reqs.txt` was failing when the requirements file includes
an unsupported wheel, regardless of whether it is conditionally removed
by a marker. This patch fixes that issue.

Additionally, this patch makes pip check local file wheels for
compatibility. Previously, a requirements file could include a path
to a valid wheel for any platform and pip would happily install it.
2016-04-07 13:00:03 -04:00
YAMAMOTO Takashi
742b9258d2 Normalize file URLs
It seems pip distinguishes paths with .. or extra / for constraints.
For example, the following directories are considered different.

    /path/to/dir
    /path/to//dir
    /path/to/dir/subdir/..

It can lead "Could not satisfy constraints for 'xxxx':
installation from path or url cannot be constrained to a version"
error, whose cause is not obvious to users. [1]

This commit tries to normalize the given directory name to avoid
the error.

[1] https://bugs.launchpad.net/devstack/+bug/1542545
2016-03-22 21:17:55 +09:00
Xavier Fernandez
8233a83299 Merge pull request #3455 from bukzor/enable-warning-filters
enable python -W with respect to PipDeprecationWarning
2016-02-11 10:24:30 +01:00
Buck Golemon
9dabcffc80 we should expect that --no-use-wheel is deprecated 2016-02-08 11:27:17 -08:00
Stéphane Bidoul
1d759b3afa Allow installing modules from a vcs subdirectory in non-editable mode 2016-02-08 16:42:54 +01:00
Xavier Fernandez
d9e0a057b0 Rename test and mark as network
since the wheel package now needs to be installed
2015-12-17 00:24:38 +01:00
Xavier Fernandez
8767f892fd Fix wheel path test of --user install with prefix
From b227c45a
2015-12-17 00:08:50 +01:00
Steve Kowalik
dc8e7f01dd Join constraints and requested extras
Compare extras when checking if a requirement has already been
specified, and take a union of the extras before installation.

Co-Authored-By: Sachi King <nakato@nakato.io>
Closes #3046, #3189
2015-11-20 18:05:17 +11:00
Erik Rose
925e4b4466 Fix false hash mismatches when installing a package that has a cached wheel.
This would occur when, for example, installing from a requirements file that references a certain hashed sdist, a common situation.

As of pip 7, pip always tries to build a wheel for each requirement (if one wasn't provided directly) and installs from that. The way this was implemented, InstallRequirement.link pointed to the cached wheel, which obviously had a different hash than the index-sourced archive, so spurious mismatch errors would result.

Now we no longer read from the wheel cache in hash-checking mode.

Make populate_link(), rather than the `link` setter, responsible for mapping InstallRequirement.link to a cached wheel. populate_link() isn't called until until prepare_files(). At that point, when we've examined all InstallRequirements and their potential --hash options, we know whether we should be requiring hashes and thus whether to use the wheel cache at all.

The only place that sets InstallRequirement.link other than InstallRequirement itself is pip.wheel, which does so long after hashes have been checked, when it's unpacking the wheel it just built, so it won't cause spurious hash mismatches.
2015-10-19 23:40:00 -04:00
Sachi King
5d96864775 Attempt to get name for editable file:// URLs
When installing an editable from file:///path/to/file, pip currently does
not attempt to determine the name from #egg=NAME, just passing back
None.  This causes constraints code to completely ignore this line
resulting in unexpected installation behaviour.

This patch makes '-e file:///path#egg=name' function similarly to
'file:///path#egg=name' and '-e git+URL#egg=name'.  If #egg=name is not
defined, it returns None and the package becomes an unamed requirement,
which constraints will not parse but in the case of a requirement will
later be processed and determined.

Closes #3026
2015-08-18 11:44:20 +10:00
Sachi King
4c7fd6aead Attempt to install editable packge defined in constraints should error
Currently if the local package you are trying to install is listed in
the constraint file it will silently fail to install the local package
while installing its dependancies.

This process was caused by the has_requirement returning true when a
constraint with that name was defined, resulting in the local package
not being processed.

Closes #2928
2015-08-17 14:49:03 +10:00
James Polley
b227c45a7b Ignore distutils prefix when using --user
Fixes bug #2683

There are two changes here; one to fix the using-wheels codepath and one
to fix the no-wheels codepath. Two tests are introduced, one to test
each codepath.
2015-06-26 19:08:45 +10:00
James Polley
6d719576e8 Handle missing case from bug #2888
If a single package is listed as a constraint; is a dependency of a
package being installed; *and* is already installed, we end up
processing it multiple times. This change adds a new "prepared" flag
which we set the first time the package is processed, to prevent
multiple handling.

Fixes bug #2888
2015-06-19 15:21:02 +10:00
Robert Collins
bb0b429a49 Issue #2731: Constraints files.
This adds constraints files. Like requirements files constraints files
control what version of a package is installed, but unlike
requirements files this doesn't itself choose to install the package.
This allows things that aren't explicitly desired to be constrained if
and only if they are installed.
2015-06-03 06:38:33 +12:00
Robert Collins
582af6e684 Issue #2677: Disable wheels for setup.py options.
Using --install-options, --build-options, --global-options changes
the way that setup.py behaves, and isn't honoured by the wheel code.
The new wheel autobuilding code made this very obvious - disable
the use of wheels when these options are supplied.
2015-04-24 16:14:48 +12:00
Marcus Smith
1ca1f1053d pep8 fixes 2015-04-18 13:55:48 -07:00
Marcus Smith
285f71b34a Test --install-option in requirements file overrides same option in cli 2015-04-18 12:48:25 -07:00
Marcus Smith
9c66633c29 - fixes to TestOptionVarants
- consistent use of the finder fixture
2015-04-18 11:59:17 -07:00
Marcus Smith
12eab18bde functional test for --install-option in a requirements file 2015-04-13 00:07:15 +02:00
Marcus Smith
351d809df6 remove the functional test. for this change, we can achieve as much confidence with unit tests that confirm what args are passed 2015-04-13 00:07:15 +02:00
Georgi Valkov
0da51b14d7 Remove misleading test cases and improve docs 2015-04-12 23:52:49 +02:00
Georgi Valkov
29f0c75c63 Do not shlex.split() and flatten value of global|install_options 2015-04-12 23:52:49 +02:00
Georgi Valkov
1c0021b268 Add an --install|global-option functional test 2015-04-12 23:52:49 +02:00
Donald Stufft
a88bc0de73 Send log messages >= logging.WARNING to stderr 2015-04-06 23:11:16 -04:00
Matej Stuchlik
c5024dc851 Mark tests requiring Internet access 2015-01-15 00:53:15 +01:00
Donald Stufft
8e11f76171 Merge pull request #2185 from msabramo/GH-376_change_downloading_unpacking_msg_to_collecting
Change "Downloading/unpacking" to "Collecting"
2014-12-14 14:50:43 -05:00
Marc Abramowitz
b16d283d69 Change "Downloading/unpacking" to "Collecting"
"Downloading/unpacking" was misleading and confusing, especially when
the package is never found, as nothing was ever downloaded or unpacked
in this case.

The word "collecting" seems general enough to be accurate and it goes
well with the fact that later on pip will say, "Installing collected
packages".

Fixes: GH-376
2014-12-14 00:06:08 -08:00
Donald Stufft
5f0692b40a Fix for latest setuptools 2014-12-13 12:38:55 -05:00