1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

26 commits

Author SHA1 Message Date
Stéphane Bidoul
8a1a8d7915 Always use pep 517 when the 'wheel' package is absent 2023-03-27 11:55:20 +01:00
Stéphane Bidoul
5189a6e0f4 --no-binary does not imply setup.py install anymore 2023-03-12 17:18:53 +01:00
Stéphane Bidoul
d8e2d6605a
Rename BinaryAllowedPredicate
It really is a BdistWheelAllowedPredicate and
this will make it easier to reason when --no-binary
does not imply setup.py install anymore.
2022-08-12 13:51:45 +02:00
q0w
c8c88ce520 Adapt tests 2022-06-23 19:20:18 +03:00
Tzu-ping Chung
42359a9605 Migrate tests to use pathlib.Path
The pip-specific Path implementation has been removed, and all its
usages replaced by pathlib.Path. The tmpdir and tmpdir_factory fixtures
are also removed, and all usages are replaced by tmp_path and
tmp_path_factory, which use pathlib.Path.

The pip() function now also accepts pathlib.Path so we don't need to put
str() everywhere. Path arguments are coerced with os.fspath() into str.
2022-06-08 19:58:46 +08:00
Pradyun Gedam
94668c6df6
Pacify unit tests 2022-01-25 01:38:23 +00:00
Stéphane Bidoul
ae512892eb
Prepare legacy editable metadata in isolated env
When there is a pyproject.toml, metadata preparation must be
done in the isolated build environment for legacy editable installs too
(fixes a regression).

Also detect earlier if an editable install must go through the
legacy install path, to be sure to run it in an environment
with the correct build requirements.
2021-10-18 14:34:50 +02:00
Stéphane Bidoul
e5be3f796e
Add PEP 660 support (build_editable) 2021-09-28 23:04:51 +02:00
Jon Dufresne
60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Jon Dufresne
ad25b61e07 Remove unused tmpdir fixtures from tests
There was also one unused monkeypatch fixture removed.
2021-09-05 07:08:06 -07:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Andrey Bienkowski
50db373adb Lint 2021-02-10 13:38:21 +03:00
Andrey Bienkowski
ab35018c04 Use unittest.mock instead of mock 2021-02-10 13:28:55 +03:00
Stéphane Bidoul
06f1eff024
Simplify check_binary_allowed
check_binary_allowed is only used to check
if a wheel needs to be built in 'pip install' mode.
It mixed format control and pep517 mode check.

We change it so it checks allowed formats only,
which leads to better readability of _should_build().
2020-12-31 13:17:44 +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)
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)
261c286de9
Make wheel_cache an argument of build() 2019-12-29 18:51:45 +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
37f3fd7087
Move legacy wheel build process 2019-12-25 17:52:39 +05:30
Stéphane Bidoul (ACSONE)
2eff06e7cc
Make WheelBuilder should_unpack argument explicit 2019-12-12 23:46:05 +01:00
Stéphane Bidoul (ACSONE)
e0165e7b30
Remove unused wheel_builder python_tag argument 2019-12-02 12:07:18 +01:00
Pradyun Gedam
b1f2f747f9
🎨 a test 2019-11-04 11:51:44 +05:30
Pradyun Gedam
9435050c2d
Move tests for WheelBuilder and friends 2019-11-04 11:51:44 +05:30