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

4307 commits

Author SHA1 Message Date
Marcus Smith 41355a20e3 changelog entry for new --prefix option 2015-11-26 09:35:19 -08:00
Marcus Smith ca47dc9949 Merge pull request #3252 from domenkozar/install/prefix
Support pip install --prefix
2015-11-26 09:30:20 -08:00
Xavier Fernandez 46c5cd3927 Merge pull request #3266 from nakato/monkeypatch_less
monkeypatch os.path.exists over less code in test_tilde
2015-11-25 10:50:58 +01:00
Sachi King f9c40564c4 monkeypatch os.path.exists over less code
PipSession attempts to create a user_agent which results in calls to
platform.linux_distribution being called, there is a chance this hits
platform._dist_try_harder, which calls os.path.exists("/a/bad/path")
then attempts to open and read from said path resulting in brekage.

This creates PipSession before mock patches os.path.exists then only
patches the call that requires os.path.exists to be patched.
2015-11-25 16:08:58 +11:00
Domen Kožar b4bb2eee14 Support also pip install -e --prefix 2015-11-24 10:01:46 +01:00
Donald Stufft ef73f43500 Merge pull request #3198 from s-t-e-v-e-n-k/issue3189
Duplicate distributions with distinct extras
2015-11-22 19:28:03 -05: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 e609509772 Merge pull request #3249 from xavfernandez/pin_pytest_timeout
Pin pytest-timeout==0.5
2015-11-16 10:54:46 +01:00
Xavier Fernandez 1275a0f3f9 Pin pytest-timeout==0.5
Version 1.0 requires pytest>=2.8 which contains a regression on parallel
tests (cf e78df3e069)
2015-11-16 10:40:32 +01:00
Donald Stufft 78e7d620a0 Merge pull request #3203 from xavfernandez/improve_error_msg_for_invalid_req
Provide more helpful message on invalid requirement
2015-11-13 08:17:51 -05: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 2f14ae55e2 Update Changelog 2015-11-07 12:33:25 -05: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 1da0ea13f3 Merge pull request #3231 from dstufft/hashes2
Continuation of #3137
2015-11-06 19:34:48 -05:00
Donald Stufft b160661bc6 Add a changelog 2015-11-06 19:14:45 -05:00
Donald Stufft f39bc756e5 Merge branch 'develop' into hashes2 2015-11-06 18:46:09 -05:00
Donald Stufft 78c77b37f7 Add the new spinner to the changelog 2015-11-06 12:26:28 -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 034ac608a2 Merge pull request #3223 from xavfernandez/improve_subdirectory_docs
Improve subdirectory docs
2015-11-05 23:52:50 +01:00
Marcus Smith e0bd6efa1a Merge pull request #3229 from qwcode/fix_pypaio_links
fix broken link to old pypa.io section
2015-11-05 14:40:07 -08:00
Marcus Smith 9d921b51e0 fix broken link to old pypa.io section 2015-11-05 14:31:12 -08:00
Xavier Fernandez 0c625b744a Merge pull request #3211 from xavfernandez/drop_installed_version
Drop INSTALLED_VERSION and light refactor of Finder.find_requirement
2015-11-05 09:36:59 +01: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 28f658f908 Merge pull request #3225 from pypa/force-implementation-tag
Force the --python-tag when autobuilding wheels
2015-11-04 13:05:08 -05: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 e2c9a0f743 add basic example for subdirectory
closes #2457
2015-11-03 22:56:39 +01:00
Xavier Fernandez 8e22a94f41 docs: add quotes to subdirectory example
To fix potential bash issue
closes #3221
2015-11-03 21:07:54 +01:00
Xavier Fernandez 4bc2480e85 Merge pull request #3205 from xavfernandez/traceback_format_exc
Fix traceback.format_exc call
2015-10-24 00:58:04 +02: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 3148b967a2 Merge pull request #3196 from xavfernandez/improve_missing_setuptools_error
Report import setuptools error to the user
2015-10-22 23:38:04 +02: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 4488047ef6 Update the wheel-cache-disabling docs with our latest understanding of C compiler nondeterminism. 2015-10-21 16:35:30 -04: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 ee9d6fb2c3 Modernize recommendations to not call setuptools-level things directly. 2015-10-19 23:40:00 -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
Marcus Smith 829b6c2f06 Merge pull request #3190 from cjwatson/setuptools-find-links-docs
Fix example of using setuptools find_links
2015-10-15 22:18:55 -07:00
Colin Watson 4a67f40a41 Fix example of using setuptools find_links
setuptools.package_index.local_open is used for file: URLs, and only
handles directories if the URL ends with a slash.  Add the trailing
slash to pip's documentation to reduce confusion.
2015-10-16 05:20:03 +01:00
Donald Stufft 461b7aaad3 Merge pull request #3075 from natefoo/py2-soabi
SOABI support for Python 2.X and PyPy
2015-10-14 17:59:01 -04:00