Skip to content

Commit

Permalink
Temporary workaround to avoid: "pip subprocess to install build depen…
Browse files Browse the repository at this point in the history
…dencies did not run successfully."

when pip installing in Python 3.9 environment.

See:
- pypa/pip#11294 for discussion on issue being introduced in pip 22.2
- pypa/pip#11298 for fix, due to be included in pip 22.2.1 release
  • Loading branch information
JonathanWillitts committed Jul 27, 2022
1 parent ebd14d1 commit 2a0bf34
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pyproject.toml
Expand Up @@ -48,6 +48,29 @@ DJANGO =
dev: djdev
[testenv]
# Temporary workaround to avoid: "pip subprocess to install build dependencies did not run successfully."
# when pip installing in Python 3.9 environment.
#
# This workaround uses workaround 1. below, fixing issues occuring both when
# running tox locally, or via CI (GitHub actions).
#
# The 3 available workarounds seem to be:
# 1. Override Setuptools' own copy of distutils, see:
# - Setuptools issue: https://github.com/pypa/setuptools/issues/2965
# - Setuptools docs on use of (and overriding) local, vendored copy of distutils: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html
# - Example of this fix in the wild: https://github.com/astronomer/astro-sdk/pull/571
# 2. Avoid pip v22.2, e.g. downgrading to pip 22.1.2, see:
# - Discussion on issue being introduced in pip 22.2: https://github.com/pypa/pip/issues/11294
# - PR including fix (to be included in 22.2.1 release): https://github.com/pypa/pip/pull/11298
# - Example of this fix in the wild: https://github.com/paavopere/palabras/pull/4/commits/8aec95f99e6cf233b6e125502791f27a6af146f3
# 3. Use Python 3.10 (or greater), see:
# - Why it's not an issue on >=3.10: https://github.com/pypa/pip/issues/11294#issuecomment-1193137150
#
# Also note: distutils is due to be deprecated in Python 3.12
#
setenv =
SETUPTOOLS_USE_DISTUTILS = stdlib
deps =
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/tox.txt
-r https://raw.githubusercontent.com/clinicedc/edc/develop/requirements.tests/test_utils.txt
Expand Down

0 comments on commit 2a0bf34

Please sign in to comment.