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

155 commits

Author SHA1 Message Date
Xavier Fernandez 2ff59d1cc0 Add canonical utils function 2015-09-06 19:20:14 +02:00
Xavier Fernandez f8040ab13e Use stdlib os.path.relpath
instead of custom (and now useless) make_path_relative
2015-09-03 15:38:44 +02:00
Donald Stufft 0f5d4286a5 Deprecate and Noop the PEP 438 functionality due to PEP 470 2015-09-02 23:47:05 -04:00
Min RK aa0099a641 check that wheel cache dir is writable
before building wheels. Warning is copied from http cache check.

HTTP cache has a similar check and warning,
but wheels would still try and fail to build.
2015-07-02 13:10:47 -07:00
Julien Demoor b53397528b Fixed support for Jython 2.7 in wheel.py. 2015-06-10 07:13:08 +04: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
Donald Stufft 9089430ab7 Support a falsey cache-dir 2015-06-01 20:52:02 -04:00
Donald Stufft 0ebc37d17a Expand ~ in the wheel cache directory 2015-06-01 17:24:11 -04:00
Donald Stufft 7c969b6e62 Guard against req.link being None 2015-05-22 19:43:29 -04:00
Donald Stufft 6413f628ac Merge pull request #2808 from dstufft/only-wheel-artifact
Don't cache wheels for links which do not point to release artifacts
(cherry picked from commit 66d970dbcf)
2015-05-22 19:29:55 -04:00
Donald Stufft 5631a8a75e Use a hashed representation of the URL for the wheel cache 2015-05-21 21:54:46 -04:00
Donald Stufft 31ab024a7d Use shutil.move instead of os.rename
os.rename causes errors to happen whenever the temporary location
is on a different device than the wheel cache directory. Using
shutil.move instead will cause it to use os.rename when it can and
fallback to copying otherwise.
2015-05-04 07:47:21 -04:00
Robert Collins 6aec23cafe Issue #2675: Granular control over wheels/sdists
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes #2084
2015-04-24 08:52:48 +12:00
Robert Collins ec46a3bac4 Replace wheel cache cache_dir with an object.
Wheel cache lookups become more complex when we wish to allow binary
blacklisting. Rather than passing more parameters around, replace
cache_root with wheel_cache, and create a wheel cache in all the
relevant command entry points.
2015-04-23 10:03:50 +12:00
Robert Collins 08acb6670d Issue #2140: Build wheels automatically
Building wheels before installing elminates a cause of broken environments -
where install fails after we've already installed one or more packages.

If a package fails to wheel, we run setup.py install as normally.
2015-04-13 18:33:07 +12:00
Robert Collins 4926409340 Issue #2563: Read cached wheels from ~/.cache/pip
This won't put wheels into that directory, but will read them if they
are there. --no-cache-dir will disable reading such wheels.
2015-04-13 18:33:07 +12:00
Robert Collins fd33cd3ddf Rationalise wheel_dir usage.
We we normalising it right before making it, after passing it
RequirementSet, which means RequirementSet also had to normalise it.

And then we passed it to WheelBuilder which as a result had to
normalise it too.

Instead, pass it as-is to RequirementSet, have that normalise it, and
then pull it back out in WheelBuilder.
2015-04-08 09:40:05 +12:00
Robert Collins 12e719db78 Create ensure_dir helper.
We had a very widely used pattern which can be factored out for a mild
saving in LOC, and a gain in clarity.
2015-04-07 08:55:52 -04:00
Xavier Fernandez d40ec18656 wheel install: hide all warnings while compiling 2015-02-28 11:10:42 +01:00
Xavier Fernandez c3a850ecc5 wheel installs: log compile issues as debug 2015-02-28 00:17:21 +01:00
Xavier Fernandez b1d81fbd95 wheel installs: do not log empty lines
fixes #2461
2015-02-27 23:46:39 +01:00
Donald Stufft 0bc8aa5622 Style fixes for the latest flake8 2015-02-24 07:46:10 -05:00
Donald Stufft 9c99becbd9 Ensure that we preserve executable file permission bits 2014-12-22 16:53:16 -05:00
Donald Stufft 5b817f960b --isolated should isolate from ~/.pydistutils.cfg as well 2014-12-11 11:51:06 -05:00
Marc Abramowitz 962d14d8f3 WheelBuilder.__init__ default args: () => None 2014-12-10 08:56:51 -08:00
Marc Abramowitz 3054cbc0f7 Eliminate some uses of mutable default args
See: GH-2163
2014-12-10 08:17:54 -08:00
Donald Stufft 0fa67d9ffc Only copy the file and the atime and mtime when installing from Wheel 2014-11-20 11:17:42 -05:00
Xavier Fernandez b713e96df2 cleanup: use "with open()" to open files 2014-10-18 20:41:18 +02:00
Matt Robenolt 334af19e7c Better ignore syntaxerror stack traces in wheels
This already got stripped just fine for non-wheel installs, but for
wheels, it only stripped the lined where `SyntaxError` was present
leaving the rest of the stacktrace.
2014-10-01 00:12:07 -07:00
Donald Stufft 9b174aee79 Switch to using six.StringIO instead of pip.compat.StringIO 2014-09-11 15:25:23 -04:00
Donald Stufft 767d11e49c Switch to using the stdlib logger instead of pip.log 2014-09-10 09:36:09 -04:00
Berker Peksag 2310c4c621 another try 2014-08-22 15:30:27 +03:00
Berker Peksag eee2334c92 Silence byte compile errors when installation succeed.
Fixes #1873.
2014-08-21 16:40:02 +03:00
Donald Stufft 53faeece34 Clean up some no longer needed compatability code 2014-07-03 12:20:03 -04:00
Donald Stufft 9b11ed231c Merge pull request #1854 from Ivoz/compat-cleaning
Remove unnecessary imports, move some to six
2014-06-16 12:06:21 -04:00
INADA Naoki 4950c7685c Fix flake8 error.
Github's online editor is bad...
2014-06-07 12:20:42 +09:00
INADA Naoki c2b3e08270 Overwrite old scripts when installing from wheel.
Fixes #1800
2014-06-07 12:07:43 +09:00
Matthew Iversen b7770c502a Remove unnecessary imports, move some to six 2014-06-07 04:21:51 +10:00
Matthew Iversen dcb0ee0702 Move backwardcompat package to compat module 2014-05-14 13:10:06 +10:00
Marcus Smith 12034176a1 build wheels for dependencies of editables 2014-05-03 10:12:57 -07:00
Alex Gaynor b48b9ce53f Resolve several typos in the codebase 2014-04-29 22:33:04 -07:00
Paul Moore 0047974b0f Make pip wheel return failure if any wheels fail to build 2014-04-28 14:28:31 +01:00
Marcus Smith ebe2465635 merge 1.5.X to empty_dirs_develop 2014-04-25 14:08:40 -07:00
Marcus Smith 79408cbc6f use copy2, not move, to ensure dirs are not copied 2014-04-23 13:08:07 -07:00
Marcus Smith b542c9906b move directory creation below the file filtering 2014-04-22 16:09:04 -07:00
Marcus Smith b274b85f96 don't install empty dirs during wheel installs 2014-04-21 23:07:25 -07:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00
Alex Gaynor b8e9500567 Put a space around a comma for readability. 2014-03-03 22:44:28 -08:00
Donald Stufft 95035fc5c4 Turn on everything in flake8
flake8 ignores some errors by default, these ignored by defaults
change sometimes. This will make things stabler by selecting
everything.
2014-02-24 16:52:23 -05:00
Matthew Iversen b26d91c880 Ensure wheel-Version is compatible with pip 2014-02-19 20:01:22 -05:00
Matthew Iversen 0bbfaf6f06 Expand docstring for check_compatibility 2014-02-19 18:44:44 +11:00
Matthew Iversen 5a6855dcf1 Fix test logic, tiny error / import cleanup 2014-02-19 10:31:12 +11:00
Matthew Iversen e0818e1240 Remove commented line 2014-02-18 18:01:44 +11:00
Matthew Iversen 9f4f6738a5 Use find_on_path, extract compatibility check 2014-02-18 15:19:35 +11:00
Matthew Iversen 5f40562e0f Small cleanup, use email.parser.Parser 2014-02-17 10:01:32 +11:00
Matthew Iversen 13f6c68f0c Ensure wheel-Version is compatible with pip 2014-02-15 17:21:22 +11:00
Marcus Smith 51a93e0672 'pip wheel' should download wheels, when it finds them
Conflicts:
	pip/commands/wheel.py
	pip/download.py
	pip/req/req_set.py
	pip/wheel.py
2014-02-08 09:05:40 -08:00
Marcus Smith e41bf0230e 'pip wheel' should download wheels, when it finds them 2014-02-01 11:41:55 -08:00
Donald Stufft b72f44b20c Run flake8 as part of the test suite 2014-01-27 14:40:32 -05:00
Donald Stufft 2743768b7b Fix the style of the code base to better match pep8 2014-01-27 14:11:29 -05:00
Donald Stufft e9a896a9a0 Merge branch 'master' into develop
Conflicts:
	docs/installing.rst
	pip/__init__.py
2014-01-20 22:48:44 -05:00
Ralf Schmitt 9815271737 raise InvalidWheelFilename if version is missing in wheel filename
Wheel('Cython-cp27-none-linux_x86_64.whl') did raise an AttributeError
instead of InvalidWheelFilename.

This has also been discussed an is similar to
https://github.com/pypa/pip/pull/1445
2014-01-16 00:18:03 +01:00
Marcus Smith ea97076ce0 Merge pull request #1445 from schmir/fix-wheel-single-digit-version
make sure that wheel files with a single digit version do work
2014-01-15 14:22:39 -08:00
Marcus Smith a7c522da97 fix references to req methods/classes after refactor 2014-01-12 10:05:11 -08:00
Ralf Schmitt 2ca9ba6521 make sure that wheel files with a single digit version do work
this is a rather serious bug, since it makes 'pip wheel ...' fail with
the following error if the wheelhouse contains such a wheel:

,----
| ...
|   File "/home/ralf/.ve/dev/local/lib/python2.7/site-packages/pip/wheel.py", line 420, in __init__
|     self.version = wheel_info.group('ver').replace('_', '-')
| AttributeError: 'NoneType' object has no attribute 'replace'
`----
2014-01-09 16:15:38 +01:00
Donald Stufft cb7af82f20 Remove the setuptools version check
With the vendoring of pkg_resources we no longer need to worry
about the version of the installed setuptools.
2014-01-07 08:11:28 -05:00
Donald Stufft 073ae0d0b1 Switch to importing the vendored pkg_resources 2014-01-07 04:47:04 -05:00
Donald Stufft 7ec49dc2fb Enable --[no-]compile which will compile or not compile pyc files
* Enables compilation for Wheel files
* Adds an easy command line for distutils/setuptools compilation
  options
2013-11-21 23:19:15 -05:00
Donald Stufft ff1bb66063 Add a comment 2013-11-19 08:23:15 -05:00
Donald Stufft 7b0ab3c6a5 Ignore leading and trailing whitespace 2013-11-19 08:22:04 -05:00
Marcus Smith 3dc40cad46 - if installing directly from a wheel, fail if it has an invalid name or is unsupported
- when walking links, skip invalid wheel filenames, don't crash
2013-11-14 16:35:24 -08:00
Donald Stufft 06da6aac9f Document what the ENSUREPIP_OPTIONS environment variable does 2013-11-07 12:28:10 -05:00
Donald Stufft 9d989ce0b0 Provide an escape hatch for ensurepip to control the generated scripts 2013-11-04 19:12:59 -05:00
Donald Stufft f4ef26423e Simplify the script that we install
* Solves an issue where distlib decided it was a sane thing to do
  to swallow stack traces by default
* Simplifies the script drastically
* Adds a note about why we need to set the variants
2013-11-02 21:00:02 -04:00
Donald Stufft a857290f91 Ignore .pya files as entry points wrappers as well 2013-11-02 13:04:24 -04:00
Donald Stufft 6dca500f69 Set the executable bit on files generated by distlib's ScriptMaker 2013-11-02 12:46:18 -04:00
Paul Moore a7949308df Added comments and reqordings based on code review 2013-11-01 17:28:35 +00:00
Paul Moore 22b63127cb Autogeneration of scripts when installing from a wheel 2013-11-01 09:57:24 +00:00
Donald Stufft 97507f8931 Make Wheel respect --root 2013-10-30 08:19:39 -04:00
Paul Moore 55272b264e Clarify setuptools requirement message by including the minimum version 2013-10-10 16:32:05 +01:00
Paul Moore 2902ce7985 Make the check for wheel support in setuptools test for DistInfoDistribution rather than check the version 2013-10-06 20:15:47 +01:00
Marcus Smith 9b4b651cc6 we'll assume '_' means '-' for versions from wheel filenames 2013-08-21 23:30:15 -07:00
Marcus Smith b9aa34e883 2 fixes for setuptools upgrades: 1) works using setuptools wheels, 2) works when a distribute-0.7.X wrapper is installed 2013-07-26 21:51:35 -07:00
Marcus Smith a3c7fc0d80 setuptools requirement is now >=0.8 2013-07-05 22:20:09 -07:00
Daniel Holth e47bf2de47 support mocking pip.pep425tags.supported_tags 2013-06-30 23:22:55 -04:00
Daniel Holth 3b9e90e42b wheel: add tags parameter to support_index_min also 2013-06-30 14:56:43 -04:00
Daniel Holth 07da91c842 cleaner "don't install pypi-hosted binary wheels on linux" feature 2013-06-30 14:15:03 -04:00
Daniel Holth b4b76238c7 wheel: account for purelib != platlib 2013-06-30 13:58:54 -04:00
Marcus Smith 4010c7e627 reduce false positive when platlib/purelib are symlinks of one other 2013-06-27 23:12:24 -07:00
Marcus Smith fb397cd1ec have "pip wheel" only be satisfied by setuptools 2013-06-27 00:20:28 -07:00
Marcus Smith d4c0454062 fix spelling of 'NotImplementedError' 2013-06-23 22:32:41 -07:00
Marcus Smith c26b6de897 py3 sort fix 2013-06-19 15:53:53 -07:00
Marcus Smith 72f0ec9419 wheel is also supported now with setuptools>=0.7.2 2013-06-13 22:04:05 -07:00
Marcus Smith 60f8da5c41 4 more wheel tests 2013-06-06 19:11:43 -07:00
Daniel Holth 460ced0374 wheel: make sure destination path exists 2013-05-23 22:42:03 -04:00
Marcus Smith c721a735b5 wheel finder priority based on supported_tags order 2013-05-02 15:28:32 -07:00
Marcus Smith f1fb4b4fda wheel requirement checks with tests 2013-04-05 14:21:11 -07:00
Daniel Holth 0ea48dcf5a check for proper distribute when using wheels 2013-04-05 11:16:03 -07:00
Marcus Smith 9c271baafe distutils scheme util for wheel installs; --user/--target support for wheels 2012-11-14 16:53:22 -08:00
Marcus Smith 1873e80f63 import check at 'pip wheel' command level is enough 2012-10-28 10:50:17 -07:00