Commit Graph

60 Commits

Author SHA1 Message Date
Devesh Kumar Singh 60f00b837a Upgrade flake8 to 3.8.1
Co-Authored-By: Anthony Sottile <asottile@umich.edu>
2020-05-18 21:58:26 +05:30
Stéphane Bidoul d8c14d4006
Clarify message when wheel is not installed 2020-05-01 09:57:16 +02:00
Stéphane Bidoul c20f778899
Do not unncessarily warn about wheel being absent
Do not warn about the wheel package being absent
if wheel building would have been skipped for another reason.
2020-05-01 09:57:15 +02:00
Tzu-ping Chung 510aa46580 Space after comma 2020-04-17 22:39:35 +08:00
Anudit Nagar e6ed38dbce
Add info log when wheel building is skipped (#7768) 2020-02-23 22:56:36 +01: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
Stéphane Bidoul (ACSONE) 5aa3b3d2f0
Remove unused build() argument 2020-01-05 23:52:42 +01:00
Stéphane Bidoul (ACSONE) 66e010980a
Remove WheelBuilder
build is now a function
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) c0aca12123
Clarify should_cache a bit 2020-01-05 23:52:42 +01:00
Stéphane Bidoul (ACSONE) 25521f29b5
should_build always returns a boolean 2020-01-05 23:52:41 +01:00
Stéphane Bidoul (ACSONE) 6e7d0e5a05
_collect_buildset becomes _get_cache_dir
The only purpose of _collect_buildset is now
to compute the cache directory to use
for a given requirements. This is better
computed one by one in the build loop.
2020-01-05 23:52:41 +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) 3de4765ec7
Add should_build function for wheel and install commands 2020-01-05 23:52:40 +01:00
Chris Hunt a94fb53dad Don't unpack wheel files after building for install
Actual installation has been using the wheel file directly for some
time. The last piece that required an unpacked wheel was metadata. Now
that it uses the wheel file directly, we can remove the unpacking after
build.
2020-01-05 10:57:15 -05:00
Stéphane Bidoul (ACSONE) 8d1d20de8c
Do not attempt setup.py clean for failed pep517 builds
Fixes #6642
2020-01-02 12:14:03 +01:00
Stéphane Bidoul (ACSONE) 261c286de9
Make wheel_cache an argument of build() 2019-12-29 18:51:45 +01:00
Stéphane Bidoul (ACSONE) c8d4277535
Convert _build_one from method to function
It does not rely on WheelBuilder anymore.
2019-12-29 18:51:44 +01:00
Stéphane Bidoul (ACSONE) 3828699ddc
Move build options from WheelBuilder to build function 2019-12-29 18:49:54 +01:00
Pradyun Gedam ccfef67016
Move PEP-517 wheel build logic into operations.build 2019-12-29 16:57:02 +05:30
Christopher Hunt 711cf4deaf
Merge pull request #7517 from sbidoul/wheel-builder-disentangle-6-sbi
Move final wheel builder copy operation to wheel command
2019-12-29 13:46:02 +08:00
Pradyun Gedam 7d9b392fc0
Move legacy wheel build process into "operations.build" (#7513) 2019-12-28 18:55:06 +00:00
Stéphane Bidoul (ACSONE) 7c2c58442f
Update docstring 2019-12-28 16:18:10 +01:00
Stéphane Bidoul (ACSONE) 158ae67910
Remove unused _wheel_dir in WheelBuilder 2019-12-26 21:43:57 +01:00
Stéphane Bidoul (ACSONE) 9909b4069a
Move final copy operation from wheel_builder to wheel command 2019-12-26 21:43:57 +01:00
Stéphane Bidoul (ACSONE) cf21401fd7
Make wheelbuilder.build return successes too
Also, pluralize variable names for readability and consistency with
similar variables in callers.
2019-12-26 21:43:57 +01:00
Stéphane Bidoul (ACSONE) a4d06aecaa wheel builder: unconditionally update req.link (#7515)
We unconditionally update the requirement
link with the build wheel (in cache), so
when build() will return build success as
well as build failure, the caller can obtain
the built wheel by looking at req.local_file_path
2019-12-27 04:31:55 +08:00
Pradyun Gedam 37f3fd7087
Move legacy wheel build process 2019-12-25 17:52:39 +05:30
Christopher Hunt 2a48286178
Merge pull request #7484 from sbidoul/wheel-builder-disentangle-3-sbi
Add missing error logging in WheelBuilder
2019-12-18 13:12:54 +08:00
Stéphane Bidoul (ACSONE) 2a1fb915e2
Remove useless pass statement
Co-Authored-By: Christopher Hunt <chrahunt@gmail.com>
2019-12-16 17:44:34 +01:00
Stéphane Bidoul (ACSONE) 45222a2b36
ensure cache dir is present before building 2019-12-15 23:56:20 +01:00
Christopher Hunt d6491fe666
Merge pull request #7483 from chrahunt/refactor/install-packed-wheel
Add downloaded/local archive path to InstallRequirement
2019-12-15 23:50:36 +08:00
Stéphane Bidoul (ACSONE) 2f125342e0
Remove now redundant ensure_dir
Since _build_one ensure the output dir is
present and does proper error logging,
we can remove ensure_dir from build(), further
simplifying that method.
2019-12-14 23:01:58 +01:00
Stéphane Bidoul (ACSONE) 5de1d51610
Ensure output directory is present inside _build_one 2019-12-14 23:01:58 +01:00
Stéphane Bidoul (ACSONE) f60d15ca87
Add missing error report
Use the same error message as in WheelBuilder.build(),
include the exception in the message.
2019-12-14 23:01:58 +01:00
Chris Hunt 327c295554 Keep path to downloaded archive on InstallRequirement
Now we'll be able to transition other parts of the code to use
pre-existing archives directly instead of relying on unpacked sources.
2019-12-14 11:59:42 -05:00
Stéphane Bidoul (ACSONE) 510970968f
Remove unused WheelBuilder attribute
Remnant of a reverted feature.
2019-12-14 12:47:23 +01:00
Stéphane Bidoul (ACSONE) c0d05dc6a3
Make _collect_buildset a standalone function 2019-12-14 12:47:23 +01:00
Stéphane Bidoul (ACSONE) b9faa61c8f
Remove incorrect os.path.join in WheelBuilder
The join is done in _build_one_inside_env.
The bug as undetected because the cache directory is absolute most of
the time.
2019-12-14 12:47:23 +01:00
Stéphane Bidoul (ACSONE) 98f6ff8661
Rename output_dir to cache_dir in WheelBuilder for clarity 2019-12-13 22:01:54 +01:00
Stéphane Bidoul (ACSONE) 9e737fe511
Extract buildset collection from WheelBuilder.build
Towards splitting the build method in two
for pip wheel and pip install cases.
2019-12-13 21:42:06 +01:00
Pradyun Gedam 8e7a87bf4b
Factor out pep517 wheel build function (#7473) 2019-12-13 04:26:44 +00:00
Christopher Hunt d7eaede434
Revert "Add new option: pip wheel --save-wheel-names (#6377)" (#7420)
This reverts commit bcad1b1cb5, reversing
changes made to f86490317a.

As discussed, we should rethink the interface of this command output as
part of larger CLI usability review. In the interim, the same
functionality can be achieved using straightforward shell commands.
2019-12-13 07:57:05 +08:00
Stéphane Bidoul (ACSONE) 339e061e6b
Don't pass req to _build_wheel_pep517 2019-12-12 23:46:05 +01:00
Stéphane Bidoul (ACSONE) 2eff06e7cc
Make WheelBuilder should_unpack argument explicit 2019-12-12 23:46:05 +01:00
Stéphane Bidoul (ACSONE) deb322d7b7
Move pep517 wheel build method to standalone function 2019-12-12 23:45:45 +01:00
Stéphane Bidoul (ACSONE) e0165e7b30
Remove unused wheel_builder python_tag argument 2019-12-02 12:07:18 +01:00
Stéphane Bidoul (ACSONE) 178cd3f244
Better workaround for cache poisoning #3025
Make sure ``pip wheel`` never outputs pure python wheels with a
python implementation tag. Better fix/workaround for
`#3025 <https://github.com/pypa/pip/issues/3025>`_ by
using a per-implementation wheel cache instead of caching pure python
wheels with an implementation tag in their name.

Fixes #7296
2019-12-02 12:07:18 +01:00
Pradyun Gedam ccd2ced9bc
Add disallow_any_generics = True to mypy configuration (#7110) 2019-11-14 20:46:21 +05:30