Commit Graph

98 Commits

Author SHA1 Message Date
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 6f29b5d552 Move wheel_cache out of RequirementSet (#4600)
It now goes into both Resolver and WheelBuilder, where it belongs.
2017-07-05 19:57:35 -04:00
Pradyun S. Gedam 581c12b5bc Move some RequirementSet attributes to RequirementPreparer (#4583)
* Move some attributes to RequirementPreparer

* 🎨

Remove unused import
2017-07-05 14:41:45 -04:00
Pradyun S. Gedam 2dad78a99f Refactor/move preparation logic out (#4577) 2017-06-28 18:29:32 -04:00
Pradyun S. Gedam 69ef4d9224 From RequirementSet to Resolver - Part 1 (#4546) 2017-06-27 12:37:38 -04:00
Pradyun S. Gedam fe5b7c9c9a Begin moving WheelCache to pip.cache 2017-06-15 18:34:05 +05:30
Pradyun S. Gedam 38e7490a5f Run resolver in wheel command 2017-06-13 10:49:53 +05:30
Pradyun S. Gedam 0bdbee5c30 TemporaryDirectory abstraction (#4332)
* Rename BuildDirectory to TempDirectory

Because that's what it is.

* Use TempDirectory in more places (take 2)

* Fix indentation...

* 🎨

* Dumb mistake.

* Defer creation of temporary directory

* Misc

* Oops!

* Use better name

* Fix mistakes made in rebasing

* Remove unnecessary wrapping

* 📰

* Misc change to trigger a new CI build

* Make TempDirectory more robust

Update test accordingly

* 🎨 Remove unused import

* 🔧 Fix mistake made during merge

* Move kind to prefix

* Move delete initalization to __init__

* Remove unrelated message

* Improve existing test

* Oops.

* Add a test to verify that readonly files are also deleted

* 🎨

* Increase places where TempDirectory is used

* Remove unused import

* Improve tests, fix bug

* 🎨

* Update test for new behaviour

* Missed no_clean argument

* Make temp_dir private

* Delete the temporary directory based on no_clean

* Give TemporaryDirectory use a unique name

* 🎨

* 📝 Add basic documentation
2017-06-01 14:54:29 +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 cfbc4d9fea Use no_clean option for wheel build environment 2017-04-01 19:29:47 +01:00
Donald Stufft 95b9541ed4 Remove the deprecated --(no-)use-wheel flags 2017-03-20 10:49:56 -04:00
Donald Stufft bb41490225 Removed the deprecated --allow-* commands from PEP 438 2017-03-19 20:51:54 -04:00
Avner Cohen 0552ffeeda Add `--no-progress <progress_bar>` to ``pip download`` and ``pip install`` to suppress progress bar in the console 2017-01-30 10:14:07 +01:00
Pradyun S. Gedam 6def0aa243 [minor] An aesthetic change to wheel command source (#3974)
* A minor aesthetic change to wheel command source

* Add --upgrade to the suggestions

* Remove redundant `--upgrade`
2017-01-17 23:29:04 +01:00
Nikhil Benesch 20326d8b24 Failing exit status when no requirements specified (#4210)
* add failing tests for #2720

* fix #2720: exit status when no requirements specified

* Don't fail when blank requirements files specified
2017-01-06 23:21:46 +01:00
Xavier Fernandez 2df0ea9a26 Add --ignore-requires-python escape hatch 2016-10-27 18:43:59 +02:00
Adam Chainz 93e3c8d250 Convert readthedocs link for their .org -> .io migration for hosted projects
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
2016-05-29 19:21:28 +01:00
Stéphane Bidoul (ACSONE) 4d1b798465 Allow creating wheels for editable packages (#3695) 2016-05-26 06:41:01 -04:00
Xavier Fernandez 1e8b6c2fe7 Improve tests
Demote "Ignoring indexes" log to DEBUG to enable stdout JSON parsing
2016-05-19 15:31:46 +02:00
Xavier Fernandez 18b5fc2c44 pip.wheel: change --wheel-dir default value
From <current working directory>/wheelhouse to <current working
directory> only to be consistent with pip download behavior.
2016-01-19 22:42:22 +01:00
Erik Rose c62cd71f0f Add --require-hashes option to pip download and pip wheel.
Those commands already checked hashes, since they use RequirementSet, where the hash-checking is done.

Reorder some options so pre, no-clean, and require-hashes are always in the same order.
2015-10-07 17:33:57 -04:00
Mathew Jennings 417f79d8b8 Add `pip download` command and deprecate `pip install --download`.
`pip download` has the same functionality as `pip install --download`,
and the behavior of `pip install --download` is preserved with a deprecation
warning.  `pip install --download` will be removed in pip version 10.
2015-09-13 17:41:00 -04:00
Donald Stufft 6afc718307 Remove items slated for removal in pip 8.0 2015-09-03 10:55:11 -04:00
Donald Stufft 0f5d4286a5 Deprecate and Noop the PEP 438 functionality due to PEP 470 2015-09-02 23:47:05 -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
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
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 0e57ebc008 Make adding options be just function calls.
The .make is just sugar for 'call a function' that gets in the way of
just having functions.
2015-04-17 15:04:25 +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
Donald Stufft f41fee6a21 Reduce duplicate code in wheel and install commands.
(cherry picked from commit 9ed1dd75fc1d2c7a747066a90cd897db441319e0)
2015-04-07 08:36:14 -04:00
Donald Stufft b7309c6bcc Remove the items deprecated for removal in 7.0 2015-04-07 04:20:51 -04:00
Marc Abramowitz 1a2c3f117a Refactor wheel command check of required packages
- Move code into separate method - check_required_packages
- Use new import_or_raise function - mostly so we don't have to have
  hacks for flake8 and comments to explain said hacks
2015-02-24 06:49:04 -08:00
Paul Moore 65b3cf3cde Normalize the wheel-dir option (to expand ~ and similar) 2015-02-24 12:06:38 +00:00
Ionel Cristian Mărieș 0d54d5225e Fix borken log message.
String interpolation was broken.
2015-01-16 18:25:11 +02:00
Donald Stufft 5b817f960b --isolated should isolate from ~/.pydistutils.cfg as well 2014-12-11 11:51:06 -05:00
Donald Stufft ddb2f1b459 Deprecate accessing non secure origins by default
* Deprecates accessing non secure origins by default, the list of
  which is taken from Chrome.
* Adds a --trusted-host flag to enable users to mark a specific
  host as a secure origin regardless of what we think.
* Refactors the original warning to better indicate the intent
  and the new flag.
2014-12-10 16:35:54 -05:00
Donald Stufft 01610be0d5 Use a secure randomized build directory when possible 2014-11-11 20:19:10 -05:00
Donald Stufft 0e96b1af4b Switch versioning from X.Y.Z to X.Y dropping the leading 1 2014-09-17 22:05:31 -04:00
Donald Stufft 767d11e49c Switch to using the stdlib logger instead of pip.log 2014-09-10 09:36:09 -04:00
Donald Stufft 90688e82b1 Revert "Merge pull request #1519 from dstufft/remove-dependency-links"
This reverts commit da02f073da, reversing
changes made to 2ad8888901.

Conflicts:
	CHANGES.txt
	pip/commands/freeze.py
	pip/commands/list.py
	pip/commands/wheel.py
	pip/index.py
	pip/req/req_set.py
	pip/vcs/subversion.py
2014-08-01 16:50:08 -04:00
Donald Stufft 2298e4ce53 Fix #1657 - Explicitly close the requests session 2014-07-03 12:50:59 -04:00
Donald Stufft 52ca02608e Use CacheControl instead of custom cache code
* Deprecates the --download-cache option & removes the download
  cache code.
* Removes the in memory page cache on the index
* Uses CacheControl to cache all cacheable HTTP requests to the
  filesystem.
  * Properly handles CacheControl headers for unconditional
    caching.
  * Will use ETag and Last-Modified headers to attempt to do a
    conditional HTTP request to speed up cache misses and turn
    them into cache hits.
  * Removes some concurrency unsafe code in the download cache
    accesses.
  * Uses a Cache-Control request header to limit the maximum
    length of time a cache is valid for.
* Adds pip.appdirs to handle platform specific application
  directories such as cache, config, data, etc.
2014-05-09 18:28:20 -04:00
Marcus Smith 52299a7fe7 `pip wheel` needs --src option if it's going support --editable for vcs reqs 2014-05-08 21:29:01 -07:00
Marcus Smith 12034176a1 build wheels for dependencies of editables 2014-05-03 10:12:57 -07:00
Paul Moore 0047974b0f Make pip wheel return failure if any wheels fail to build 2014-04-28 14:28:31 +01:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00