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

4290 commits

Author SHA1 Message Date
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
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 1b5b4ac9f7 Add unit tests for manual SOABI detection 2015-10-13 10:38:07 -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
Erik Rose be6dccb034 Factor up the idiom of reading chunks from a file until EOF. 2015-10-12 13:07:53 -04:00
Erik Rose 76983f363a Restore documentation about alternate hash algorithms in URLs. 2015-10-12 12:09:49 -04:00
Erik Rose d541304354 Allow === as a pinning operator.
https://www.python.org/dev/peps/pep-0440/#arbitrary-equality
2015-10-11 10:14:30 -04:00
Erik Rose f35ce75025 Make "installation bundles" less of an official term. 2015-10-11 09:17:40 -04:00
Erik Rose 05b7ef9467 Rename "goods" to "allowed" for clarity.
Renaming "gots" didn't go well. I think the current naming is the most concise way to put it. If we rename it to "got", then the loop iterator can't be called "got", and the simple relationship between the iterator and collection names is lost. "Actual" and "actuals" are the other names that occurred to me, but they look so much like "allowed" that the code becomes harder to read.
2015-10-11 09:17:27 -04:00
Erik Rose 304c90aa46 Break after initial """ in multi-paragraph docstrings in exceptions module. 2015-10-10 22:44:13 -04:00