pip/src/pip/_internal
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
..
cli Remove redundant cache dir normalization in _build_session 2020-01-08 08:02:29 +01:00
commands _should_cache does not depend on check_binary_allowed 2020-01-20 10:41:48 +01:00
distributions Use pkg_resources.Distribution derived from wheel directly 2020-01-05 10:57:14 -05:00
index Use packaging.tags.Tag in place of Tuple 2020-01-07 01:42:42 -05:00
models Use packaging.tags.Tag in place of Tuple 2020-01-07 01:42:42 -05:00
network Check that the cache is writable in _main() 2019-12-28 13:04:54 +01:00
operations Assert req.source_dir is None during linked requirement preparation 2020-01-08 20:11:28 -05:00
req Inline _make_build_dir in InstallRequirement 2020-01-08 20:34:28 -05:00
utils Merge pull request #7542 from sbidoul/normalize-cache-dir-sbi 2020-01-18 22:38:59 +05:30
vcs Remove untyped defs (#7382) 2019-11-19 11:46:26 +08:00
__init__.py Setup old entrypoints in pip module 2019-12-19 21:20:51 -05:00
build_env.py Update imports to {index -> index.package_finder} 2019-10-19 22:24:01 +05:30
cache.py Remove redundant expanduser in WheelCache 2020-01-08 08:02:29 +01:00
configuration.py Remove untyped defs (#7382) 2019-11-19 11:46:26 +08:00
exceptions.py add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
legacy_resolve.py In Resolver, assume wheel_download_dir exists 2019-12-30 09:53:08 +01:00
locations.py Remove untyped defs (#7382) 2019-11-19 11:46:26 +08:00
main.py Setup old entrypoints in pip module 2019-12-19 21:20:51 -05:00
pep425tags.py Remove unused version functions 2020-01-07 19:01:14 -05:00
pyproject.py Capital S in BuildSystemDetails 2019-11-23 16:46:40 +00:00
self_outdated_check.py Update src/pip/_internal/self_outdated_check.py 2020-01-02 00:00:59 +08:00
wheel_builder.py _should_cache does not depend on check_binary_allowed 2020-01-20 10:41:48 +01:00