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

303 commits

Author SHA1 Message Date
Ellen Marie Dash 2d978309a2 [commands/cache] Minor clean-up.
- Consistently use singular 'cache' (not plural 'caches').
- Remove unnecessary uses of the word 'currently'.
- Use 'file(s)' instead of 'files', to account for case of only one file.
- Use .format() when appropriate.
- Minor cleanup of `pip cache`-related files in docs/.
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 554133a90e [commands/cache] Add file size information. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 61a0adcfe7 [commands/cache] Add missing type annotation. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash 61dd0bc16c [commands/cache] Use location of wheel cache dir specifically. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash c838a67178 [commands/cache] Change pattern suffix from -*.whl to *.whl. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash 9563dfb526 [commands/cache] Refactor get_cache_info(). 2020-04-01 16:54:03 -04:00
Ellen Marie Dash 50604be6c4 [commands/cache] Raise errors if wrong number of args.
Also add tests for purge_cache, since I apparently forgot those before.
2020-04-01 16:54:03 -04:00
Ellen Marie Dash 8ae71adbea [commands/cache] Add docs for 'pip cache' command. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash c59ced6942 [commands/cache] More refactoring of cache command 2020-04-01 16:54:03 -04:00
Ellen Marie Dash b9b29b8c10 [commands/cache] fix 'pip cache info'; don't hide python/abi/platform tags. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash b0e7b66326 [commands/cache] Refactor + fix linting failures. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash 04c0b0e6eb Add 'pip cache' command. 2020-04-01 16:54:03 -04:00
Tzu-ping Chung 6db0df928c Move wheel cache out of InstallRequirment 2020-03-30 17:36:03 +08:00
Pradyun Gedam bbd439898b
Better indentation for pip config description 2020-03-14 00:29:41 +05:30
Jason R. Coombs 6282a307dc 👹 Feed the hobgoblins (delint). 2020-03-06 12:43:10 -05:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
sinscary 716c9202ee Raise error if --user and --target arguments are used together 2020-02-27 12:22:56 +05:30
Chris Hunt 60a2fa4dce Inline unconditionally-executed blocks 2020-02-23 18:05:09 -05:00
Chris Hunt 45911713db Globally manage temp build dir
This will let us remove the indentation associated with the `with`
statement and eventually refactor these functions more easily.
2020-02-23 18:04:46 -05:00
Christopher Hunt ea47be571e
Merge pull request #7772 from chrahunt/refactor/command-level-scoped-tracker
Use Command context helper to cleanup requirement tracker
2020-02-24 06:51:06 +08:00
Chris Hunt eb91e8ca39 Use Command context helper to cleanup requirement tracker
The lifetime of the requirement tracker will be essentially the same,
but now we have more flexibility on where in the code we create it.

In a followup we can do the same thing with build_dir and remove the
`with` statement (and its indentation) entirely from these commands.
2020-02-23 14:37:01 -05:00
Chris Hunt 83b0295be9 Dedent block 2020-02-23 14:29:01 -05:00
Chris Hunt ccc6d77a73 Do not update no_clean option value on PreviousBuildDirError
Since a recent refactoring of our temporary directory handling,
`no_clean` is only read prior to these `except` blocks. Since it's not
needed, remove it!
2020-02-23 14:28:59 -05:00
Christopher Hunt 40523794d8
Merge pull request #7747 from pfmoore/parsed_requirement
Refactor parse_requirements to be independent of InstallRequirement
2020-02-24 00:21:28 +08:00
Pradyun Gedam e648e00dc0
pip is spelt all-lowercase 2020-02-18 10:55:16 +05:30
Paul Moore aac5d821f9 Move make_requirement to pip._internal.req.constructors (and rename it) 2020-02-14 12:22:50 +00:00
Paul Moore 90e4eb3eed Make parse_requirements return a ParsedRequirement 2020-02-14 11:52:53 +00:00
Paul Moore 89bf3b02db Record on the requirement whether it has been successfully downloaded 2020-02-07 16:40:27 +00:00
Paul Moore 6f154f5546
Merge pull request #7707 from pfmoore/refactor_options
Pass individual options to InstallRequirement rather than an options object
2020-02-07 14:22:10 +00:00
Paul Moore a9f1d8562b Pass individual options to InstallRequirement rather than an options object 2020-02-06 16:05:11 +00:00
Chris Hunt e7998a3617 Rename populate_requirement_set to get_requirements 2020-02-05 22:30:07 -05:00
Chris Hunt 543c84402d Remove unused requirement_set in commands 2020-02-05 22:30:07 -05:00
Chris Hunt de5ec7e884 Remove unused requirement_set argument 2020-02-05 22:30:07 -05:00
Chris Hunt e872d2bfb6 Make new RequirementSet in populate_requirement_set
Concentrates use of RequirementSet in individual commands so we can
eventually break it up.
2020-02-05 22:30:07 -05:00
Chris Hunt 9c58aa7eb5 Do not use InstallRequirement in warn_deprecated_install_options
This only needed a list of requirements, so give it just that.
2020-02-05 22:30:07 -05:00
Chris Hunt 779d8df5e6 Inline check_supported_wheels
Reduces our dependency on RequirementSet in individual commands.

The default value for this is True, used everywhere except
InstallCommand.
2020-02-05 22:30:07 -05:00
Chris Hunt 5dcc562616 Return a list of InstallRequirement from populate_requirement_set
Next we can hide RequirementSet from the setup phase of the individual
commands.
2020-02-05 22:30:07 -05:00
Chris Hunt fd815bc1fa Pass in a plain list of InstallRequirement to Resolver.resolve
Further simplifies the Resolver interface, and will give us the
opportunity to remove any knowledge of RequirementSet from the
individual commands.
2020-02-05 22:30:05 -05:00
Chris Hunt a814dc9f1f Centralize logic for getting 'all requirements' 2020-02-05 22:29:48 -05:00
Chris Hunt 550ae907bd Parameterize check_supported_wheels to Resolver.resolve
This reduces our dependence on the input RequirementSet.
2020-02-05 22:29:46 -05:00
Chris Hunt 58c06299db Return a different RequirementSet from Resolver.resolve
This makes the resolver interface simpler by returning a brand new
RequirementSet vs mutating the one that was input to the function, and
will let us specialize RequirementSet for the different use cases.
2020-02-05 22:29:30 -05:00
Chris Hunt 4a93045be1 Remove no-op RequirementSet.cleanup_files 2020-02-05 20:16:05 -05:00
Chris Hunt 77e9b79d0e Remove no-op calls to WheelCache.cleanup 2020-02-04 23:11:27 -05:00
Chris Hunt 7068e58b6f Configure tempdir registry
This mirrors the current logic within the individual requirement-related
commands (install, wheel) for setting options.no_clean, which is used to
determine whether we need to delete directories.

Next, we'll add the actual directories to track and remove them from
being managed by other objects.
2020-02-04 20:22:39 -05:00
Chris Hunt 0b4ec28a39 Centralize addition of no_clean argument
We want to rely on --no-clean being a valid option for
RequirementCommand types, so move it to one place close to the code that
will depend on it.
2020-02-04 20:22:39 -05:00
Christian Clauss f58ec8365b
NEWS.rst: Fix typos discovered by codespell (#7642)
https://github.com/codespell-project/codespell
2020-02-03 01:14:08 +08:00
Deepak Sharma d31cf696e8 string_formatting 2020-01-30 20:33:00 +05:30
Stéphane Bidoul (ACSONE) 0e1e0ef566 _should_cache does not depend on check_binary_allowed
_should_cache is only called by _get_cache_dir.

In pip install mode, _get_cache_dir is never called when
check_binary_allowed returns False because in that case
should_build_for_install_command has returned False before
and the build was skipped.

In pip wheel mode, check_binary_allowed always returns True
(because it is not passed to the build function).

So _should_cache can use _always_true for check_binary_allowed.

*Alternative*

Alternatively, we could have passed check_binary_allowed
to build in pip wheel mode. The only difference is that wheels built
locally from *legacy* packages would then not be cached,
when pip wheel is used with --no-binary.
2020-01-20 10:41:48 +01:00
Chris Hunt 80b2c82d0c Use packaging.tags.Tag in place of Tuple
This is the standard type used by packaging.tags. Making this change
throughout the code lets us start switching over to using its
tag-generating functions in get_supported().

We also get rid of a test, since it was superseded by `__str__` in
packaging.tags.Tag.
2020-01-07 01:42:42 -05:00
Stéphane Bidoul (ACSONE) 5aa3b3d2f0
Remove unused build() argument 2020-01-05 23:52:42 +01:00