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

1827 commits

Author SHA1 Message Date
Ville Skyttä
0da18e93b3 Spelling fixes 2015-12-27 00:58:23 +02:00
Stéphane Bidoul
98ee8761bc better parameter style for call_subprocess() 2015-12-04 18:36:33 +01:00
Stéphane Bidoul
a1622ad0a5 detect editable distribution by the presence of .egg-link 2015-12-04 14:40:24 +01:00
Stéphane Bidoul
c1176b01dc support &subdirectory option with freeze and git 2015-12-04 14:40:20 +01:00
Stéphane Bidoul
23d86c90b6 add git support for controls_location() 2015-12-04 14:40:00 +01:00
Stéphane Bidoul
7757a6ca1b refactor vcs backend detection mechanism
Give VCS implementations control over saying whether
a project is under their control
2015-12-03 21:16:48 +01:00
Xavier Fernandez
c20ed50a82 Merge pull request #3213 from xavfernandez/mix_list_options
Allow to mix list options --outdated/uptodate with --editable
2015-12-03 13:30:18 +01:00
Xavier Fernandez
9ed3c1463e prefer os.path.join to os.sep.join([]) 2015-11-30 23:44:31 +01:00
Xavier Fernandez
d48bc5ce2d Drop the level argument
it is useless since 52ca02608e
2015-11-30 22:11:02 +01:00
Xavier Fernandez
b018c9ab4d Fix exception catch order
SSLError inherits from ConnectionError
2015-11-30 22:03:16 +01:00
Xavier Fernandez
3f21828f75 Unify output of pip list & fix test 2015-11-29 17:37:45 +01:00
Xavier Fernandez
795798f3f0 Allow combination of pip list options
--editable with --outdated/--updtodate
closes #933
2015-11-29 17:37:45 +01:00
Xavier Fernandez
69d90440e7 Drop PasteScript specific hack
With or without, pip works the same with PasteScript latest version and
crashes the same with versions 0.3/0.3.1
It was added in c2000d7 (7 years from now)
2015-11-29 16:57:53 +01:00
Xavier Fernandez
30f4af0678 Move SETUPTOOLS_SHIM to its own file 2015-11-26 22:36:59 +01:00
Xavier Fernandez
3c00710438 Use a single setuptools shim
for all setup.py invocations
bdist_wheel will now use tokenize in Python 3 just like for install
fixes #2042
2015-11-26 22:36:59 +01:00
Marcus Smith
ca47dc9949 Merge pull request #3252 from domenkozar/install/prefix
Support pip install --prefix
2015-11-26 09:30:20 -08:00
Domen Kožar
b4bb2eee14 Support also pip install -e --prefix 2015-11-24 10:01:46 +01:00
Domen Kožar
7270d272f4 Make sure --user and --prefix install flags conflict 2015-11-22 19:23:22 +01:00
Domen Kožar
e14a66f1b9 Support --prefix argument to install command.
There was no way to override prefix for an installation for wheels
previously. The default it whatever sys.prefix points to.
2015-11-22 19:13:51 +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
Xavier Fernandez
e42e822f2c Provide more helpful message on invalid requirement
closes #540, #1000, #1426
2015-11-13 11:05:02 +01:00
Donald Stufft
e8bbf800a6 Merge pull request #3232 from rmcgibbo/pep425tags
Fix OS X platform detection for pep425tags
2015-11-07 12:32:07 -05:00
Robert McGibbon
995deff939 Fix OS X platform detection for pep425tags
For the purpose of detecting the user's platform to determine which
wheels are compatible, this switches pep425tags.get_platform() to
avoid distutils.util.get_platform() on OS X, because that method
returns the release on which the current interpreter was built (often
10.5 or 10.6) as opposed to the platform on which the interpreter is
running.
2015-11-06 16:39:15 -08:00
Donald Stufft
f39bc756e5 Merge branch 'develop' into hashes2 2015-11-06 18:46:09 -05:00
Donald Stufft
4bdd58c29a Merge pull request #3224 from njsmith/install-spinner-PoC
Display spinner during long setup.py calls
2015-11-06 12:21:44 -05:00
Nathaniel J. Smith
5bb9899938 Display spinner during long setup.py calls
One of the downsides of pip's new hiding of build chatter is that for
packages that take a very long time to build (e.g. scipy) the user gets
no indication that anything is happening for a very long time (e.g. tens
of minutes), and is likely to get frustrated and hit Control-C. This can
also create issues for automated systems that kill jobs that don't
produce occasional output (e.g. Travis-CI).

This commit implements an idea discussed here:

  https://github.com/pypa/pip/issues/2732#issuecomment-153215371

where we put up a spinner that rotates whenever the underlying build
produces output. I tried it on scipy, and it the experience was quite
pleasant! It spun around, sometimes fast and sometimes slow, and then
there was one uncomfortable pause for ~1 minute while a very gnarly C++
file got compiled, but that's okay because it was actually providing
accurate feedback.

It looks like:
```
  Running setup.py install for scipy ... /
  Running setup.py install for scipy ... -
  Running setup.py install for scipy ... \
  Running setup.py install for scipy ... done
```
or if the command has non-zero return code, or an exception is raised,
you get:
```
  Running setup.py install for scipy ... /
  Running setup.py install for scipy ... -
  Running setup.py install for scipy ... \
  Running setup.py install for scipy ... error
```
2015-11-05 23:28:03 -08:00
Xavier Fernandez
4782ffeab8 use packaging.version.parse
not setuptools version
2015-11-04 22:52:44 +01:00
Xavier Fernandez
113631c0aa rename to candidates 2015-11-04 22:52:44 +01:00
Xavier Fernandez
f1bf7515c2 pip.index: remove INSTALLED_VERSION
closes #703
2015-11-04 22:52:44 +01:00
Donald Stufft
0e240d7dde Force the --python-tag when autobuilding wheels
A lot of existing tarballs will successfully build a wheel, but the
wheel will be implicitly broken because they will have dynamically
adjusted the install_requires inside of their setup.py. Typically
this is done for things like Python version, implementation, or what
OS this is being installed on. We don't consider cache directories
to be OS agnostic but we do consider them to be Python version and
implementation agnostic. To solve this, we'll force the cached
wheel to use a more specific Python tag that includes the major
version and the implementation.
2015-11-04 08:52:28 -05:00
Xavier Fernandez
0cc9d733bf Fix traceback.format_exc call
format_exc takes only one argument, limit which should be an integer.
python 2 seems more lenient than python 3 on that point.

mistake introduced in commit 3148b967a
2015-10-24 00:46:44 +02:00
Xavier Fernandez
f23cbb707f Merge pull request #3179 from cloudnull/fix/req_constraint
Resolves result obj in req_constraints
2015-10-23 18:04:54 +02:00
Kevin Carter
6c50ea5781
Fix to ensure "result" object is defined
The changes resolves a condition that can lead to a stacktrace due to the
use of constraint files. There are several conditions where the result
object may be left undefined which causes the problems.

``` traceback
  Exception:
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 211, in main
      status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/wheel.py", line 180, in run
      wheel_cache
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 266, in populate_requirement_set
      requirement_set.add_requirement(req)
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 267, in add_requirement
      return result
  UnboundLocalError: local variable 'result' referenced before assignment
```

This change simply ensures that the 'result' object is a defined
when the method returns.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-10-23 10:20:06 -05:00
Xavier Fernandez
fa91e3dcf4 Use get_installed_version and traceback 2015-10-22 23:15:06 +02:00
Xavier Fernandez
89a27cd740 Special-case based on exception message 2015-10-22 23:15:02 +02:00
Erik Rose
f38fc903f2 Obey --require-hashes option in requirements files.
Removed the mention of "package index options" in the docs, because they don't all fit that category anymore. Not even --no-binary and --only-binary do; they're "install options".
2015-10-21 16:02:47 -04:00
Erik Rose
3af5ffa5ce Improve flow of --require-hashes help message. 2015-10-19 23:40:01 -04:00
Erik Rose
622b430491 Typos and docstrings 2015-10-19 23:40:00 -04: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
Xavier Fernandez
8cbb8af466 Report import setuptools error to the user
closes #2931
2015-10-19 16:43:01 +02:00
Nate Coraor
63d239ffac 1. Provide a fallback mechanism for determining ABI flags if config vars
are unavailable, but issue a warning if this is used.
2. Explicitly handle the case where the unicode detection finds wide
   unicode but this is a 3.3+ build (necessary due to #1)
3. Fix tests broken due to #2.
2015-10-13 15:58:03 -04:00
Nate Coraor
a55fa5a17e Setting the u ABI flag based on sys.maxunicode is incorrect on recent
Pythons with PEP 393 Flexible String Representation (so >= 3.3).
Granted, on these Pythons, the SOABI config var should always be set,
but the manual SOABI code path should still try to do the right thing.
2015-10-13 10:38:07 -04:00
Nate Coraor
62e265e8b4 Use the WITH_PYMALLOC and Py_DEBUG config vars for setting the m and d ABI
flags.
2015-10-13 10:38:07 -04:00
Nate Coraor
a70e1dd544 Fix unit tests I broke:
- Catch IOError wherever sysconfig is used (#1074)
- Reapply #2915

Also, be sure to normalize the SOABI
2015-10-13 10:38:07 -04:00
Nate Coraor
0b9afeaca4 SOABI support for Python 2.X and PyPy
Additionally, fix the version portion of the Python tag on wheels built
with PyPy that use the Python API. It will now be the Python major
version concatenated with the PyPy major and minor versions.

Fixes #2671, #2882.
2015-10-13 10:38:07 -04:00
Erik Rose
e23f59673e Consolidate hash constants in pip.utils.hashing. 2015-10-12 16:29:08 -04:00
Erik Rose
7c5e5039ad Remove unneeded triple quotes. 2015-10-12 16:15:31 -04:00
Erik Rose
dcf39bfdf0 Add imports to make the pep8 checker happy about the dead _copy_dist_from_dir(). 2015-10-12 14:49:11 -04:00
Erik Rose
4c405a0ad3 Restore deleted _copy_dist_from_dir().
This reverts commit 62ac258e1e.

https://github.com/pypa/pip/pull/3176 is about to add the missing piece that makes this code useful (and not dead), so let's not delete it.
2015-10-12 14:37:03 -04:00
Erik Rose
9e5e34e9f7 Add --algorithm flag to pip hash. 2015-10-12 14:05:10 -04:00