Pradyun Gedam
025e99ec61
Merge pull request #7719 from uranusjr/virtualenv-20-detection
...
Swap venv and virtualenv checks
2020-02-12 12:16:43 +05:30
Paul Moore
73d472bb87
Merge branch 'master' into refactor_legacy_install
2020-02-11 16:53:01 +00:00
Tzu-ping Chung
6104060580
Swap venv and virtualenv checks
...
Environments created by pypa/virtualenv >=20 can pass both real_prefix
and base_prefix checks, but are only able to use the pyvenv.cfg values,
not the legacy `no-global-site-packages.txt`. So we need to check for
venv (PEP 405) first.
2020-02-11 17:56:40 +08:00
Paul Moore
9f87f46ac3
Tidy up exception block
2020-02-10 18:50:58 +00:00
Pradyun Gedam
313740f6ee
Merge pull request #7593 from uranusjr/hg-under-git
...
Detect all registered VCS and choose inner-most
2020-02-08 17:34:31 +05:30
Tzu-ping Chung
8b0146b748
Use double backtick in comments
...
Co-Authored-By: Christopher Hunt <chrahunt@gmail.com>
2020-02-08 17:53:58 +08:00
Paul Moore
89bf3b02db
Record on the requirement whether it has been successfully downloaded
2020-02-07 16:40:27 +00:00
Paul Moore
1aa27c4595
Merge branch 'master' into refactor_legacy_install
2020-02-07 14:49:28 +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
Xavier Fernandez
8b20443224
Merge pull request #7704 from chrahunt/refactor/simpler-resolver-interface
...
Reduce usage of RequirementSet in commands
2020-02-06 23:19:19 +01:00
Paul Moore
a9f1d8562b
Pass individual options to InstallRequirement rather than an options object
2020-02-06 16:05:11 +00:00
Paul Moore
98da0a680d
Correctly preserve exception type
2020-02-06 13:48:36 +00:00
Pradyun Gedam
3c684b5910
Merge pull request #7695 from chrahunt/refactor/remove-confusing-comment
...
Remove confusing comment from operations.prepare
2020-02-06 18:50:18 +05:30
Paul Moore
0dd1c72715
Fix handling of rollback on failure
2020-02-06 11:40:37 +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
441b211048
Remove old comment from Resolver.resolve
...
This was moved to RequirementCommand.populate_requirement_set, so it's
no longer applicable in this context.
2020-02-05 21:08:58 -05:00
Chris Hunt
85ab574dc1
Remove unused RequirementSet.reqs_to_cleanup
2020-02-05 20:16:05 -05:00
Chris Hunt
4a93045be1
Remove no-op RequirementSet.cleanup_files
2020-02-05 20:16:05 -05:00
Chris Hunt
5cca8f10b3
Remove InstallRequirement.remove_temporary_source
...
Since all directories are now globally-managed, we don't need to be
concerned with resetting the member values.
This will also let us remove several responsibilities from
RequirementSet, which will make integrating the new resolver easier.
2020-02-05 20:14:44 -05:00
Chris Hunt
efe663d476
Remove unused utils.marker_files
2020-02-05 20:14:44 -05:00
Chris Hunt
e6cc9e9351
Do not remove source directory in cleanup_temporary_source
...
Since nothing in our code writes the delete marker file, this block will
never execute.
2020-02-05 20:14:44 -05:00
Chris Hunt
8197a4bbc5
Do not write delete marker file to track source_dir delete preference
...
Previously we were writing a delete marker file which is checked in
InstallRequirement.remove_temporary_source which is only invoked if the
user did not pass --no-clean (and a PreviousBuildDirError was not
raised). Since our TempDirectory machinery now respects these conditions
we can just wrap our source directory in that instead of using this
ad-hoc mechanism for tracking our delete preference.
This will let us clean up a lot of dead code that only existed for this
use case.
2020-02-05 20:14:44 -05:00
Chris Hunt
470c39990e
Wrap InstallRequirement.ensure_build_location in TempDirectory
...
Since we explicitly disable deletion this is a no-op, but we'll
parameterize the deletion soon.
2020-02-05 20:14:44 -05:00
Chris Hunt
c7cb3cd81d
Calculate autodelete_unpacked earlier in prepare_linked_requirement
...
We want to use this value to determine whether a globally-managed
source_dir should delegate choosing deletion to the global tempdir
manager, so it needs to be above our call to
InstallRequirement.ensure_has_source_dir.
2020-02-05 20:14:44 -05:00
Xavier Fernandez
19665791fa
Merge pull request #7694 from chrahunt/refactor/move-up-file-unpacking
...
Move file unpacking out of lower level functions in operations.prepare
2020-02-05 23:08:25 +01:00
Paul Moore
87217fbf2e
Refactor legacy_install to not take an install_req
2020-02-05 16:07:45 +00:00
Chris Hunt
0410535ef2
Remove unused WheelCache.cleanup
2020-02-04 23:11:27 -05:00
Chris Hunt
77e9b79d0e
Remove no-op calls to WheelCache.cleanup
2020-02-04 23:11:27 -05:00
Chris Hunt
eead579049
Remove no-op calls to WheelCache.cleanup
2020-02-04 23:11:27 -05:00
Chris Hunt
34df623016
Globally manage EphemWheelCache temp directory
2020-02-04 23:11:25 -05:00
Chris Hunt
63743fcc30
Make ephem-wheel-cache tempdir name globally accessible
2020-02-04 23:01:24 -05:00
Chris Hunt
e69d10637b
Remove confusing comment from operations.prepare
...
prepare_linked_requirements only handles non-editable requirements, so
this comment seems like its been misplaced over several years of
refactoring.
2020-02-04 21:57:43 -05:00
Chris Hunt
4acc059cfd
Remove unused argument
2020-02-04 21:55:42 -05:00
Chris Hunt
c825c53f76
Rename unpack_{file,http}_url since they no longer unpack
2020-02-04 21:55:12 -05:00
Chris Hunt
ada2f55f13
Inline file variable
2020-02-04 21:49:42 -05:00
Chris Hunt
135f2ac0ef
Move unpacking into unpack_url
2020-02-04 21:49:42 -05:00
Chris Hunt
35a52c1397
Hold file in intermediate variable in unpack_url
2020-02-04 21:49:42 -05:00
Chris Hunt
71eaa4658f
Return File from unpack_* functions
...
Since we need both the file path and content type to unpack, and we want
to move unpacking out of the lower-level functions, return all the
information needed so it's easier to move the unpacking out.
2020-02-04 21:49:42 -05:00
Chris Hunt
791725aad9
Move directory handling from unpack_file_url to unpack_url
2020-02-04 21:49:42 -05:00
Chris Hunt
395787bebc
Inline link.file_path in unpack_file_url
2020-02-04 21:49:42 -05:00