You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove GNU make-specific directive from Doc/Makefile
`define` - https://www.gnu.org/software/make/manual/html_node/Multi_002dLine.html -
is a GNU make extension not generally supported by other makes.
Introduce `UV` variable to accomodate for the case when `uv` is not
in `PATH`.
Remove the
```bash
$ python -m $(1) --version >/dev/null
```
commands that can prevent the installation of a package when it's
already present.
The rationale is this approach is really fragile, for multiple
reasons.
Firstly, it works on packages defining `__main__.py` module, there-
fore as an example, `anyio==4.4.0` package, even if installed, would
output:
```bash
$ /tmp/venv/bin/python -m anyio >/dev/null
/tmp/venv/bin/python: No module named anyio.__main__; 'anyio' is a package and cannot be directly executed
$ echo $?
1
```
Secondly, unlike package installation, which is insensitive to
capitalization as well as `-`/`_` separators - https://packaging.python.org/en/latest/specifications/name-normalization/#names-and-normalization -
module names are sensitive to naming, meaning this may happen
(and indeed happened in bc37ac7)
```bash
$ /tmp/venv/bin/python -m sphinx-autobuild --help >/dev/null
/tmp/venv/bin/python: No module named sphinx-autobuild
$ echo $?
1
$ /tmp/venv/bin/python -m sphinx_autobuild --help >/dev/null
$ echo $?
0
```
And lastly, name of the package may not be the same as its contents
that are subsequently imported. Consider `PyYAML==6.0.1`, whose contents
are importable from the `yaml` namespace - https://pyyaml.org/wiki/PyYAMLDocumentation
```bash
$ /tmp/venv/bin/python -m pyyaml >/dev/null
/tmp/venv/bin/python: No module named pyyaml
$ /tmp/venv/bin/python -m yaml >/dev/null
/tmp/venv/bin/python: No module named yaml.__main__; 'yaml' is a package and cannot be directly executed
```
0 commit comments