Commit Graph

27 Commits

Author SHA1 Message Date
Pradyun Gedam 25ab172b55
Update linter: isort 2020-09-23 19:52:28 +05:30
Pradyun Gedam 8f3687cfd9
Rename pip._internal.distributions.{source -> sdist}
Certain environments seem to be leaving behind empty folders in this
directory -- There was an older pip release that included a source/
folder here which isn't getting deleted for some reason. I have not
figured out the root cause why this happens yet. This is resulting in
ImportErrors since Python imports have a higher precedence for packages
compared to modules.

This commit changes the name we're trying to import from, which should
help prevent this mode of failure.
2020-01-21 17:53:24 +05:30
Chris Hunt 33043ba22f Use pkg_resources.Distribution derived from wheel directly
We now extract all metadata files from the wheel directly into memory
and make them available to the wrapping pkg_resources.Distribution via
the DictMetadata introduced earlier.
2020-01-05 10:57:14 -05:00
Maxim Kurnikov b69560661b remove disallow_untyped_defs=False for pip._internal.distributions, pip._internal.operations.prepare 2019-12-12 21:35:37 +01:00
Pradyun Gedam 528d27a2fe
Nicer comments in prepare_distribution_metadata 2019-11-04 14:30:21 +05:30
Pradyun Gedam 67ae8fdc28
Move call to assert_source_matches_version 2019-11-04 14:30:20 +05:30
Pradyun Gedam 911722173e
Move distributions.{source.legacy -> source}
Why: Based on some more experience from refactoring metadata generation,
it became clear to me that the separation of legacy vs modern codepaths
should happen at lower level than this abstraction.
2019-11-04 12:01:38 +05:30
admin 7cfc16d016 Change %s to .format 2019-10-15 13:44:43 +05:30
Pradyun Gedam 1ad0495fdd
Rename {run -> runner}_with_spinner_message 2019-09-30 12:17:07 +05:30
Pradyun Gedam 46bd454e3e
Use pep517.Pep517HookCaller.subprocess_runner
Also, create a new utility function for showing a spinner when running
a subprocess.

Why: The subprocess_runner API was specifically added to make it
possible for pip to stop monkey-patching Pep517HookCaller, while still
maintaining its output style. The relevant monkeypatch will be removed
in a follow up commit.
2019-09-30 12:16:45 +05:30
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Pradyun Gedam ea68afab93
Enable isort in pre-commit 2019-09-24 18:03:22 +05:30
Pradyun Gedam 13ab7a2bce
Linearize a nested-error-message-generation (#7040)
Merge pull request #7040 from pradyunsg/cleanup/nicer-error-message-creation
2019-09-19 20:06:54 +05:30
Pradyun Gedam f051201d08
Invoke method only when build isolation is needed 2019-09-19 15:23:10 +05:30
Pradyun Gedam b22333e44e
Linearize a nested-error-message-generation 2019-09-19 15:19:06 +05:30
Pradyun Gedam 8dac3a046b
Move isolation setup code into a helper method 2019-09-19 15:05:31 +05:30
Pradyun Gedam c3c2831893
Merge pull request #6980 from pradyunsg/refactor/simplify-make_distribution
Improve make_distribution_for_install_requirement()
2019-09-05 15:30:55 +05:30
Pradyun Gedam fc338512de
Better comments in make_distribution_for_install_requirement() 2019-09-05 11:22:03 +05:30
Pradyun Gedam e31192cf49
Simplify conditional for choosing WheelDistribution 2019-09-05 09:34:16 +05:30
Pradyun Gedam b731b012e0
Update import statement 2019-08-27 15:14:54 +05:30
Pradyun Gedam e9d8e1d326
Move distributions/{source.py -> source/legacy.py}
This would simplify for splitting up the build logic, in follow up
commits.
2019-08-27 14:09:15 +05:30
Pradyun Gedam a0670a9c98
Rename AbstractDistribution.prep_for_dist()
Use a better name prepare_distribution_metadata()
2019-06-16 05:29:00 +05:30
Pradyun Gedam 7908973c07
Rename AbstractDistribution.dist()
Use a more descriptive name get_pkg_resources_distribution()
2019-06-16 05:28:55 +05:30
Pradyun Gedam 534a102564
Rename make_abstract_dist
Use a more descriptive name make_distribution_for_install_requirement()
2019-06-16 05:23:16 +05:30
Pradyun Gedam ad68a85e45
Add TODOs to improve the names for Distribution's methods 2019-06-14 23:28:22 +05:30
Pradyun Gedam 6f1e2ce5bc
Add docstrings to Distribution classes 2019-06-14 23:28:21 +05:30
Pradyun Gedam d43e31802b
Add distributions sub-package for holding build logic
This moves the DistAbstraction logic into a dedicated 'distributions'
sub-package, with separated modules for the concrete implementations of
various distribution handling logic.
2019-06-14 23:27:42 +05:30