Commit Graph

2940 Commits

Author SHA1 Message Date
Tzu-ping Chung 09f4d0004b Use extra_files to write package files instead 2020-04-02 01:25:05 +08:00
Paul Moore 657cf2515b
Merge pull request #7929 from McSinyx/tmp-file
Use better temporary files mechanism
2020-04-01 16:47:30 +01:00
Nguyễn Gia Phong 209c74f690 Use better temporary files mechanism 2020-04-01 22:02:34 +07:00
Pradyun Gedam 7b02273f3e
Merge pull request #7927 from deveshks/raise-exception-if-rev-empty-git-url
Raise an exception if revision is empty in git url
2020-04-01 18:17:36 +05:30
Tzu-ping Chung d29c86af98 Add method to create requirement from spec 2020-04-01 16:53:39 +08:00
Tzu-ping Chung 32c46403c5 Fix factory fixture for wheel_cache refactoring 2020-04-01 16:00:48 +08:00
Ilan Schnell 83ba23989d remove extra whitespace 2020-03-31 15:55:16 -05:00
Ilan Schnell 9de02c2b41 better naming of constant 2020-03-31 15:47:43 -05:00
Ilan Schnell 2a8f5705b2 combine yaml test functionality into single module 2020-03-31 15:35:29 -05:00
Paul Moore 534561cbec
Merge pull request #7945 from uranusjr/unit-tests-new-resolver
Rename unit tests to use the new_resolver scheme
2020-03-31 10:55:09 +01:00
Pradyun Gedam 0f7fac3a3d
Merge pull request #7801 from uranusjr/yanked-link-refactor
Move wheel cache out of InstallRequirement
2020-03-31 15:14:37 +05:30
Tzu-ping Chung 64c78a5875 Rename unit tests to use the new_resolver scheme 2020-03-31 16:19:41 +08:00
Ilan Schnell 6db7f42186 sort imports 2020-03-31 01:42:40 -05:00
Ilan Schnell 2c6a063a27 remove proxy module tests/lib/scripttest.py in favour of importing from tests.lib directly 2020-03-31 01:25:45 -05:00
Devesh Kumar Singh 0d2ca67729 Changed ValueError to InstallationError 2020-03-30 22:29:40 +05:30
Pradyun Gedam 57cb941645
Merge pull request #7891 from deveshks/ignore-uninstall-error-if-easy-install-missing
Don't fail uninstallation if easy-install.pth doesn't exist
2020-03-30 21:42:38 +05:30
Tzu-ping Chung 1514d85a08 Fix wheel_cache argument for the new resolver 2020-03-30 17:37:28 +08:00
Tzu-ping Chung 6db0df928c Move wheel cache out of InstallRequirment 2020-03-30 17:36:03 +08:00
Devesh Kumar Singh 0d2954d726 Add test to ensure egg-link is removed after uninstall 2020-03-30 01:31:08 +05:30
Tzu-ping Chung 2c8a0bff42 Rewrite tests.lib.create_basic_wheel_for_package
This implementation uses tests.lib.make_wheel, which allows more
flexible wheel configuration in a more structured way.

Output-wise this should be almost identical to the previous
implementation, with the following exceptions:

* Metadata-Version is bumped from 2.0 (previous implementation) to 2.1
  (from make_wheel).
* Fields previously supplied as UNKNOWN are now omitted since they are
  not significant to tests.
* The DESCRIPTION file is omitted (since the description field is now
  missing, see previous point).
2020-03-30 03:20:00 +08:00
gutsytechster 315447d170 fix(tests/lib): Catch `subprocess.CalledProcessError` in need_executable
This fixes https://github.com/pypa/pip/issues/7924
2020-03-29 16:21:02 +05:30
Devesh Kumar Singh 106bd0d77f Raise an exception if revision is empty in git url 2020-03-29 12:04:48 +05:30
Ilan Schnell b328a50125 add simple yaml test 2020-03-28 01:15:28 -05:00
Devesh Kumar Singh 0acfdcd719 Check for uninstalled package after deleting pth file 2020-03-28 11:07:52 +05:30
Devesh Kumar Singh bcb4009688 Add a test case for missing easy-install.pth fix 2020-03-28 02:14:29 +05:30
Paul Moore 904d1c8c0a
Merge pull request #7907 from uranusjr/resolver-refactor-factory
Initial refactoring to decouple candidate and requirement modules
2020-03-27 14:18:41 +00:00
Tzu-ping Chung f32beda075 Remove unused provider fixture from argumnet lists 2020-03-27 18:57:53 +08:00
Tzu-ping Chung b1272a98f9 Make factory available in tests as a fixture 2020-03-27 03:53:01 +08:00
Tzu-ping Chung 4fd12fbf56 Fix PipProvider signature in test fixture 2020-03-27 03:34:27 +08:00
Noah Gorny 2050ecc7d7 tests: session: Remake test_insecure_host into test_trusted_host 2020-03-26 21:29:32 +02:00
Tzu-ping Chung 231ce27829 Delete unused improt and test util
This util function is already broken by previous signature changes to
make_requirement() anyway.
2020-03-27 03:25:43 +08:00
Noah Gorny c936ed0165 session: Rename _insecure_adapter to _trusted_host_adapter
Currently it is just the insecure adapter, but this can change in the future
2020-03-26 21:15:38 +02:00
Tzu-ping Chung 79f2553228 Use set operations in tests for readability 2020-03-27 02:39:33 +08:00
Paul Moore fea9766fa2 Merge branch 'master' into new_resolver_extras 2020-03-26 15:49:43 +00:00
Paul Moore a68345e81c Warn if invalid extras are given 2020-03-26 14:53:24 +00:00
Paul Moore 7e97cf6426 Ignore invalid extras 2020-03-26 11:57:34 +00:00
Tzu-ping Chung 6d3a89c992 Add --no-deps test for the new resolver 2020-03-26 01:48:47 +08:00
Tzu-ping Chung 1a210d1c62 Improve utility to test installed env
Make assert_installed actually check the provided entries against the
pip --list output.

Add assert_not_installed to check for the reverse.
2020-03-26 01:47:22 +08:00
Paul Moore 653bac26c9 Add a test to validate if extras are respected 2020-03-25 12:27:23 +00:00
Tzu-ping Chung 3cb7a08f0d Implement ignore_dependencies in new resolver
If this flag is set, simply report every candidate has no dependencies.
2020-03-24 02:02:36 +08:00
Tzu-ping Chung 5af542ccac Use named arguments for clarity 2020-03-24 02:00:08 +08:00
Paul Moore 0b1306bbf0 I must remember to run lint locally before pushing :-( 2020-03-20 11:12:38 +00:00
Paul Moore 89f4f16e3e Add some functional tests for the new resolver 2020-03-20 11:00:07 +00:00
Miro Hrončok eb070d2372 Avoid a test dependency on a C compiler, skip the test on Windows 2020-03-19 23:50:41 +01:00
Miro Hrončok 98aa09cf88 Prevent infinite recursion with pip wheel with $TMPDIR in $PWD
During a build of extension module within `pip wheel` the source directory is
recursively copied in a temporary directory.

See https://github.com/pypa/pip/issues/7555

When the temporary directory is inside the source directory
(for example by setting `TMPDIR=$PWD/tmp`) this caused an infinite recursion
that ended in:

    [Errno 36] File name too long

We prevent that buy never copying the target to the target in _copy_source_tree.

Fixes https://github.com/pypa/pip/issues/7872
2020-03-19 18:07:56 +01:00
Paul Moore cec27c747c Added an end-to-end install test of the new resolver 2020-03-18 14:54:29 +00:00
Paul Moore 098d00d8c3 Add a test that runs the full resolver 2020-03-18 14:42:20 +00:00
Paul Moore 7d2eb544b5 Implement PipProvider 2020-03-18 14:42:16 +00:00
Tzu-ping Chung ffb3692e00 Add simple tests for get_installation_order()
The implementation is improved a bit to make the sorting result more
predictable for easier testing.
2020-03-15 23:01:57 +08:00
Pradyun Gedam 4f6bef6eb4
Merge pull request #7792 from pradyunsg/misc/utils-tags
Rename pep425tags -> utils.compatibility_tags
2020-03-12 14:46:52 +05:30
Paul Moore 9b10b93503 Implement the resolvelib Requirement class 2020-03-11 11:37:56 +00:00
Pradyun Gedam 4d1932fcdd
Merge pull request #7826 from jaraco/bugfix/6973-format-method
Convert the remaining '%' formatters to '.format'.
2020-03-10 14:58:25 +05:30
Prashant Sharma 115a83698f
fix(tests/lib/path): Remove duplicate resolve method (#7837) 2020-03-09 23:29:27 +01:00
Jason R. Coombs fd288ab0e5 Merge remote-tracking branch 'origin/master' into bugfix/6973-format-method 2020-03-06 18:17:10 -05:00
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
Jason R. Coombs 2c0d691893 Skip svn tests if svnadmin is not available. Fixes #7823. 2020-03-06 04:09:48 -05:00
Xavier Fernandez 3ce1872aaf Actually test user_config_dir in TestUserConfigDir 2020-02-28 10:58:54 +01:00
Xavier Fernandez b42a069920 utils.appdirs: drop unused user_data_dir function
The vendored appdir's user_data_dir function is used inside
user_config_dir which is itself tested.
2020-02-28 10:58:54 +01:00
sinscary 716c9202ee Raise error if --user and --target arguments are used together 2020-02-27 12:22:56 +05:30
Pradyun Gedam 3fa356a772
Update references to pep425tags 2020-02-26 10:24:43 -08:00
Chris Hunt 8362c20da5 Rename legacy resolver unit tests
It's a little long, but better to be consistent with our other test file
naming conventions until we come up with better ones.
2020-02-25 09:04:07 -05:00
Chris Hunt fd74d0362c Move legacy_resolve to resolution.legacy.resolver
This gives us a concrete place to put the new resolver code and
resolver-specific modules (`resolution.resolver`).

The reason for another level of hierarchy compared to other modules
is to allow us to move other modules here as they
become implementation details of the legacy resolver. Examples I
have in mind are: `req.req_set`, `req.req_install`,
`req.constructors`, and `operations.prepare`.
2020-02-25 09:04:06 -05:00
Chris Hunt 40bc4ea8fe Move network unit tests to align with subpackage names 2020-02-23 16:22:30 -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
Anudit Nagar 082c0f01d2
Update old-style formatting to new-style formatting (#7762) 2020-02-21 21:48:14 +05:30
Nitesh Sharma ce1e0f470a
Move UI helpers to cli subpackage (#6727) 2020-02-21 14:01:13 +05:30
Pradyun Gedam e648e00dc0
pip is spelt all-lowercase 2020-02-18 10:55:16 +05:30
Paul Moore f085bb0e0e Merge branch 'master' into parsed_requirement 2020-02-14 20:34:44 +00:00
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
Pradyun Gedam cdae7277ef
Merge pull request #7596 from uranusjr/6446-link-url-quoting
Fix incorrect quoting Link.url
2020-02-14 16:00:43 +05:30
Paul Moore e2a57fd1e6 Refactor to reduce coupling.
* Make ParsedLine record the type of line
* Split handle_line to allow passing arguments only where needed
* Remove unneeded attributes from ParsedRequirement
2020-02-14 09:56:42 +00:00
Paul Moore f2e49b3946 Use a new ParsedRequirement class to communicate between handle_line and parse_requirements 2020-02-13 10:39:17 +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
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 de5ec7e884 Remove unused requirement_set argument 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 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 98cd193727 Remove delete_marker_file writing in tests
Nothing checks for this file, so no need to write it.
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 b8c0d0175d Do not test unpack_http_url or unpack_file_url
The tests for unpack_{file,http}_url relies on these functions to both
retrieve and unpack. We want to move unpacking out, so call unpack_url
instead.
2020-02-04 21:49:40 -05:00
Chris Hunt 39d1c51fdb Globally-manage BuildEnvironment._temp_dir 2020-02-04 20:32:27 -05:00
Christopher Hunt f537db5021
Merge pull request #7651 from chrahunt/refactor/wheel-builder-helper-2
Add new wheel builder test helper
2020-02-03 23:45:23 +08:00
Bhavam Vidyarthi 7534dccd6c
Removed tests/scripts folder with its contents (#7680) 2020-02-03 05:17:02 +08:00
Chris Hunt 667dc392e5 Remove unused futurewheel fixture 2020-01-31 19:33:51 -05:00
Chris Hunt e83e134f5f Use wheel_builder for future wheel functional test 2020-01-31 19:33:48 -05:00
Chris Hunt 6d8a58f7e1 Add wheel builder test helper
As we introduce stricter metadata parsing, we will need to ensure that
the wheel files used in our tests are compliant (except in the specific
way that we're testing against).

Currently we have a large number of test cases relying on undocumented or
under-documented wheel files that have various inconsistencies
(incorrect name, missing fields) that are unrelated to the features
actually under test.

With a new wheel builder helper function, we will be able to replace all
of our instances of pre-built wheel test fixtures with dynamically-generated
files in code that are correct by default.
2020-01-31 19:30:19 -05:00
Chris Hunt f2af7df453 Use tempdir_registry to control auto-deleted files globally
Next we can actually transition some files to be globally-managed that
are only deleted conditionally.
2020-01-29 23:04:26 -05:00
Chris Hunt 45991bcc1e Use explicit default value for TempDirectory delete flag
Now we can opt-in to globally-managed + globally-configured file
deletion for pre-existing directories by passing an explicit `None`.
2020-01-29 23:04:14 -05:00
Chris Hunt dd8753cdee Mitigate Windows test failures due to PAX-format wheel release 2020-01-29 08:53:23 -05:00
Deepak Sharma b242c3979a String formatting updated 2020-01-23 18:09:59 +05:30
Christopher Hunt f1cd4cb48e
Merge pull request #7608 from uranusjr/global-cleanup
Delay TempDirectory.delete resolution to cleanup
2020-01-22 18:25:05 +08:00
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
Tzu-ping Chung 35377c995c Add test for tempdir registry lazy eval 2020-01-19 18:22:14 +07:00
Pradyun Gedam f1cf84e2f8
Merge pull request #7542 from sbidoul/normalize-cache-dir-sbi
Eagerly normalize cache directory
2020-01-18 22:38:59 +05:30
Pradyun Gedam 8bc1024a13
Touch command may not be available on Windows (#7601) 2020-01-15 16:08:17 +00:00
Paul Moore 3288d902e6 Touch command may not be available on Windows 2020-01-15 15:14:22 +00:00
Tzu-ping Chung 2dc061d960 Normailze case in tests 2020-01-15 17:50:41 +08:00
Christopher Hunt f2bb7c4e57
Merge pull request #7588 from uranusjr/reinstall-test
Delete a file to let --force-reinstall fix it
2020-01-15 11:48:27 +08:00
Tzu-ping Chung 8b1f4d80c1 Modify test to unify site_packages path usages 2020-01-14 21:56:23 +08:00
Tzu-ping Chung d301cbeb4e Add marker to Mercurial test 2020-01-14 18:00:49 +08:00
Tzu-ping Chung 284352a42c Add test to verify freeze output 2020-01-14 17:54:54 +08:00
Tzu-ping Chung e5c43ed6af Add tests for get_repository_root 2020-01-14 16:45:28 +08:00
Tzu-ping Chung cdd7821d92 Fix incorrect quoting Link.url
Cherry-picked manually from atugushev:fix-issue-6446.

Co-Authored-By: Albert Tugushev <albert@tugushev.ru>
2020-01-14 16:12:11 +08:00
Christopher Hunt cf722df4f9
Merge pull request #7581 from chrahunt/refactor/split-install-tests
Split relative requirement install tests
2020-01-14 01:40:29 +08:00
Pradyun Gedam b411cdbdf5
Azure Pipelines: Test Windows on Python 3.8 (#7320) 2020-01-13 12:33:43 +00:00
Tzu-ping Chung 2d3f2cdba5 Delete a file to let --force-reinstall fix it 2020-01-13 18:04:52 +08:00
Christopher Hunt 7e65a5a40f
Merge pull request #7578 from uranusjr/test-uppercase-console-scripts
Add test for uppercase script name
2020-01-13 09:42:38 +08:00
Chris Hunt 8d92e40c1f Use USERPROFILE in expanduser test
In Python 3.8, expanduser on Windows no longer respects HOME, per
https://bugs.python.org/issue36264.
2020-01-12 19:44:43 -05:00
Tzu-ping Chung 8e72502118 Add test for uppercase script name 2020-01-12 17:16:52 +08:00
Tzu-ping Chung 4def73ca3a Refactor test to remove unneeded network dep 2020-01-12 17:12:08 +08:00
Tzu-ping Chung 10022df906 Rename test to make its intention clearer 2020-01-12 17:03:28 +08:00
Chris Hunt e53d10db01 Remove unnecessary uninstall
Since a new temporary script path is used for each test, no need to do
uninstall.
2020-01-11 19:39:12 -05:00
Chris Hunt f89013daa4 Parametrize editable for relative install tests 2020-01-11 19:37:10 -05:00
Chris Hunt 2801de5825 Parametrize long relative install tests
This lets us make better use of parallelization and will let us remove
the unnecessary uninstallation from these individual tests.
2020-01-11 19:32:44 -05:00
Chris Hunt 0a57e4e9f2 Manage temp directory deletion centrally
This gives us a global toggle that we can use to control whether
temporary directories get deleted from one place (ideally, in the
commands taking --no-clean).
2020-01-10 11:08:05 +01:00
Tzu-ping Chung facf5c8894 Add comments to unicode workarounds 2020-01-09 13:11:30 +05:30
Tzu-ping Chung 7a80acaf44 Tell shutil.make_archive to use Unicode paths
By default, make_archive uses str paths on Python 2, which causes it to
skip files with unencodable names. By passing in a unicode base_dir
explicitly, it is smart enough to use unicode all the way down instead.
2020-01-09 13:01:31 +05:30
Tzu-ping Chung 37f97140af Also use rmtree to remove tmpdir_factory
Same as e2c3451001
2020-01-09 13:00:49 +05:30
Xavier Fernandez fe3e892a93
Merge pull request #7354 from chrahunt/maint/use-packaging-tags
Use packaging.tags for doing compatible wheel tag calculation
2020-01-08 22:41:35 +01:00
Tzu-ping Chung e2c3451001 Delete tmpdir with rmtree to handle Unicode paths
pytest (rather py.path.local) does not handle non-ASCII paths properly
on Windows with Python 2, but Python's builtin shutil.rmtree() does.

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2020-01-08 18:26:42 +05:30
Stéphane Bidoul (ACSONE) 8ce0859012
Remove redundant expanduser in WheelCache
Path normalization, which includes expanduser is now
done eagerly. Assert this when initializing
WheelCache.
2020-01-08 08:02:29 +01:00
Chris Hunt 896317d13d Remove unused abi functions
Previously, these were used when the user did not provide an explicit
ABI. Now this is handled internally in `packaging.tags` (by
`_cpython_abi` and `_generic_abi`).
2020-01-07 19:01:05 -05:00
Chris Hunt 7aaa705c15 Remove unused glibc functions
The remaining glibc-related functions are required to allow us to put
the libc version in the pip user agent (for stats).
2020-01-07 19:01:00 -05:00
Chris Hunt 2455977bc8 Remove unused manylinux auto-deduction functions 2020-01-07 19:00:55 -05:00
Chris Hunt 5dbef5debe Use packaging.tags.cpython_tags
We assume this function improves the status quo over the current
`_cpython_tags`, so we use it when no arguments need to be customized.

Since `packaging.tags` has its own tests and derives defaults
differently than pep425tags, we also remove the applicable tests that
were testing against the result of a plain call to
`pep425tags.get_supported()`.
2020-01-07 18:59:44 -05:00
Chris Hunt 4659a78935 Use packaging.tags.compatible_tags
We assume this function improves on our existing behavior, so use it
as-is. We will customize the arguments over the next few commits.

Since packaging.tags internally calculates platforms when not provided,
we skip the tests which patch functions assuming that manylinux
compatibility determination depends on them.
2020-01-07 18:55:26 -05:00
Pradyun Gedam ea27521359
Custom optparse.Option type that calls expanduser (#7534) 2020-01-07 12:26:38 +00:00
Pradyun Gedam 6c515125c2
Merge pradyunsg:revert/6864 into master (#7557)
Revert addition of un-suffixed pip CLI entry points for invocation check on Windows
2020-01-07 08:16:38 +00:00
Pradyun Gedam 4ee779f79e
Drop no longer valid tests 2020-01-07 12:25:11 +05:30
Chris Hunt 58f175fdf2 Remove unused format_tag
Since we delegate tag formatting to packaging.tags.Tag, we don't need
this function or its tests.
2020-01-07 01:42:42 -05: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
Chris Hunt 893faa9e44 Replace get_abbr_impl with interpreter_name
This reduces the amount of code we have to manage.

interpreter_name is calculated differently, defaulting to the
long name of the interpreter rather than "cp", but that is more
conformant.
2020-01-06 18:27:51 -05:00
Chris Hunt 4b5614c9e2 Replace get_impl_ver with interpreter_version 2020-01-06 18:27:27 -05:00
Pradyun Gedam d9d801f818
Drop no-suffix checks for pip-from-PATH 2020-01-06 19:29:56 +05:30
Stéphane Bidoul (ACSONE) f04e6ab7b5
Split should_build test
Separately test should_build_for_wheel_command
and should_buid_for_install_command.
The tests are simpler and this open the door
for reasoning about both functions independently.
2020-01-05 23:52:42 +01:00
Stéphane Bidoul (ACSONE) 9729273ca8
Make should_build and should_cache "private" 2020-01-05 23:52:42 +01:00
Stéphane Bidoul (ACSONE) 870106b9bb
Simplify _collect_buildset
Since filtering of what to build has been
done beforehand, there is no need to filter
again here anymore.
2020-01-05 23:52:41 +01:00
Stéphane Bidoul (ACSONE) 8ca8e9bf61
Extend should_build scope wrt legacy requirements
We don't build legacy requirements
when wheel is not installed because
we'll fallback to a legacy install in such case.
2020-01-05 23:52:40 +01:00
Stéphane Bidoul (ACSONE) 4bdca1a09a
Remove now useless build_wheels function 2020-01-05 23:52:40 +01:00
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
Chris Hunt ae34781826 Parameterize wheel file path for metadata extraction 2020-01-04 20:50:17 -05:00
Chris Hunt 20706eb93f Add DictMetadata for adapting zip data to Distribution
pkg_resources.Distribution classes delegate to the IMetadataProvider
implementation provided at construction. This is the one we'll use for
adapting a ZipFile to pkg_resources.DistInfoDistribution.
2020-01-04 20:49:41 -05:00
Christopher Hunt c3ab0a0b13
Merge pull request #7552 from chrahunt/refactor/cleanup-wheel-install-tests
Make wheel install test packages more explicit
2020-01-05 08:46:07 +08:00
Chris Hunt b263fcc105 Move parse_wheel and supporting functions to utils.wheel
In order to parse metadata from wheel files directly we want to reuse
parse_wheel. Moving it out helps avoid creating an unnecessary
dependence on operations.install.wheel.
2020-01-04 23:11:51 +01:00