Changeset View
Changeset View
Standalone View
Standalone View
bin/install
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
# Usage: bin/install [PIP_INSTALL_OPTION..] | # Usage: bin/install [PIP_INSTALL_OPTION..] | ||||
PREREQUISITES="pre-commit flake8 pifpaf tox wheel mypy" | PREREQUISITES="pre-commit flake8 pifpaf tox wheel mypy" | ||||
PIP_FLAGS="--disable-pip-version-check" | PIP_FLAGS="--disable-pip-version-check" | ||||
PIP="python3 -m pip $PIP_FLAGS" | PIP="python3 -m pip $PIP_FLAGS" | ||||
# python3 -m pip install --upgrade pip "$@" | # pip 21.3 added support to editable installs for projects that have a | ||||
# pyproject.toml and use a build backend that supports PEP 660, but mypy | |||||
# does not detect yet such editable installs and following errors are | |||||
# reported when type checking swh modules : | |||||
# | |||||
# Cannot find implementation or library stub for module named swh.... | |||||
# | |||||
# TODO: Remove that version pin once mypy supports PEP 660 editable | |||||
# installs, see https://github.com/python/mypy/issues/12313 | |||||
vlorentz: Shouldn't it be `$PIP install "pip<21.3"`? | |||||
Done Inline ActionsAh right, I am also wondering if pinning setuptools to < 64 (before PEP 660 support) is not the right way to go instead of pinning pip, need to check. anlambert: Ah right, I am also wondering if pinning `setuptools` to < 64 (before PEP 660 support) is not… | |||||
Done Inline ActionsNope, pinning pip is the only way to keep mypy working with editable swh modules. anlambert: Nope, pinning pip is the only way to keep mypy working with editable swh modules. | |||||
$PIP install "pip<21.3" | |||||
$PIP install $PREREQUISITES "$@" | $PIP install $PREREQUISITES "$@" | ||||
bin/pip-swh-packages --with-testing | \ | bin/pip-swh-packages --with-testing | \ | ||||
while read pkg_spec ; do | while read pkg_spec ; do | ||||
$PIP install $pkg_spec "$@" | $PIP install $pkg_spec "$@" | ||||
done | done |
Shouldn't it be $PIP install "pip<21.3"?