py-setuptools: install setuptools from wheels directly (#31131)

When installing setuptools from sources in Spack, we might
get into weird failures due to the way we use pip.

In particular, for Spack it's necessary to install in a
non-isolated pip environment to allow using PYTHONPATH as a
selection method for all the build requirements of a
Python package.

This can fail when installing setuptools since there might
be a setuptools version already installed for the Python
interpreter being used, with different entry points than
the one we want to install.

Installing from wheels both pip and setuptools should
harden our installation procedure in the context of:
- Bootstrapping Python dependencies of Spack
- Using external Python packages
This commit is contained in:
Massimiliano Culpo
2022-06-17 10:42:28 +02:00
committed by GitHub
parent f35d8c4102
commit 667c39987c
3 changed files with 48 additions and 39 deletions

View File

@@ -44,7 +44,7 @@ jobs:
python-version: '3.10'
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools==62.3.4 types-six
pip install --upgrade pip six setuptools types-six
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.

View File

@@ -46,7 +46,7 @@ jobs:
python-version: 3.9
- name: Install Python packages
run: |
python -m pip install --upgrade pip six setuptools==62.3.4 flake8 isort>=4.3.5 mypy>=0.800 black pywin32 types-python-dateutil
python -m pip install --upgrade pip six setuptools flake8 isort>=4.3.5 mypy>=0.800 black pywin32 types-python-dateutil
- name: Create local develop
run: |
.\spack\.github\workflows\setup_git.ps1