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

47 commits

Author SHA1 Message Date
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
Paul Moore
89bf3b02db Record on the requirement whether it has been successfully downloaded 2020-02-07 16:40:27 +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
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
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
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
Stéphane Bidoul (ACSONE)
1ee270a8d4
Check that the cache is writable in _main()
This avoid code duplication (for the wheel and http
cache) and repeated warnings.
2019-12-28 13:04:54 +01:00
Chris Hunt
b6e007c6a8 Remove redundant src_dir normalization 2019-12-12 21:46:04 +08:00
Pradyun Gedam
1405a403fe
Merge branch 'master' into add-use-user-site-to-preparer 2019-11-11 08:40:20 +05:30
Pradyun Gedam
c9606b86e1
Add use_user_site to RequirementPreparer 2019-11-10 13:51:29 +05:30
Pradyun Gedam
c40a9d332d
Update callsites for RequirementTracker 2019-11-10 12:33:25 +05:30
Chris Hunt
deac2343dc Don't pass PackageFinder to Preparer from Resolver
Preparer's overall responsibilities align more with having its own
reference to finder, which will help us remove it from resolver later.
2019-11-05 20:57:14 -05:00
Chris Hunt
f305f66eb2 Trace common finder info outside resolver
There's no reason for Resolver to trace this information about our
PackageFinder, we just need a common one-time function to trace useful
information.
2019-11-05 20:57:14 -05:00
Chris Hunt
3076c39f25 Remove unused Resolver.session 2019-11-03 14:31:38 -05:00
Chris Hunt
44cc3aeb0a Use session from RequirePreparer, not Resolver 2019-11-03 14:26:47 -05:00
Chris Hunt
b8fb97a815 Remove unused RequirementSet.require_hashes 2019-10-13 13:19:49 -04:00
Maxim Kurnikov
3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Chris Hunt
81d8005bd1 Change argument name to better reflect purpose.
Also assert on provided path, since it should have been created in all
cases.
2019-09-11 19:03:57 -04:00
Chris Hunt
82be4ee76a Use application context manager for PipSession.
This removes a level of indentation from all commands without
introducing any dummy functions.
2019-09-07 09:46:48 -04:00
A_Rog
70027b2f50 Address #6876: Make command output go through a single function (#6881) 2019-08-22 17:29:22 -07:00
Chris Jerdonek
23446f6d0e Remove the unneeded name argument from populate_requirement_set(). 2019-08-08 17:29:02 -07:00
Chris Jerdonek
da9ebed9df Move RequirementCommand to req_command.py. 2019-08-04 02:05:33 -07:00
Prabakaran Kumaresshan
b562531cc5 Add make_resolver() to RequirementCommand base class (#6826). 2019-08-03 23:47:50 -07:00
Prabakaran Kumaresshan
82dbcdae87 Add make_requirement_preparer() to RequirementCommand base class (#6810) 2019-08-01 20:29:44 -07:00
Chris Jerdonek
1f09e67f34 Only import a Command class when it is actually needed.
This resulted in an approximate 24% speed-up of a vanilla `pip`
invocation on one system (0.477 secs before, 0.363 secs after).
2019-07-26 23:30:26 -04:00
Chris Jerdonek
db213c04d7 Add add_target_python_options() and make_target_python(). 2019-06-23 09:28:54 -07:00
Chris Jerdonek
8dbf88dff7 Update pip-download to respect --python-version. 2019-06-06 13:20:29 -07:00
Chris Jerdonek
798d814629 Change PackageFinder to use Tuple[int, ...] instead of List[str] for --python-version. 2019-05-28 03:05:14 -07:00
Pradyun Gedam
b05c66722e
Move Resolver to a legacy_resolve module 2019-05-25 12:35:31 -04:00
Paul Moore
9d2b17854d Add --[no-]use-pep517 command line flag 2018-10-29 23:33:21 +01:00
Loren Carvalho
cddcb1407f Open up plat/abi/impl options to install --target
* Move dist restriction options to be re-usable (between install/download)
* Make dist restriction options usable in `install` (exclusively with --target)
* Add a check_supported_wheels bool to RequiriementSet for non-resolved (full path) dependencies
2018-08-05 16:13:20 -05:00
Pradyun Gedam
21d9825efd
Rename basecommand -> base_command 2018-07-30 09:32:47 +05:30
Pradyun Gedam
8b4713f63c
Move cmdoptions to pip._internal.cli 2018-07-29 18:26:33 +05:30
Pradyun Gedam
8d45e0e647
Move basecommand to pip._internal.cli 2018-07-29 18:26:28 +05:30
Benoit Pierre
43b8ed4945 detect fork-bombs during build dependencies installs 2018-06-26 10:40:23 +02:00
Daniel Shaulov
d67d98dd91 Add a --prefer-binary flag. (#5370)
The flag makes pip prefer an older but valid binary distributions over a newer source distributions.

Fixes #3785.
2018-05-11 11:17:32 +05:30
Pradyun Gedam
c08d4cc806
Add --no-build-isolation for disabling build isolation 2018-03-09 00:01:26 +05:30
Pradyun Gedam
729990c986
Round 1 of Cleanups (#4844)
* misc: fix typo
* misc: 🎨 cleanup parenthesis
* misc: 🎨 minor simplifications
* tests: fix test_console_to_str_warning
2017-12-25 15:23:27 +05:30
Michael Williamson
2d97891497 Allow downloading of sdists for specific platform with --no-deps 2017-10-12 09:30:28 +01:00
Donald Stufft
95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Renamed from pip/commands/download.py (Browse further)