Skip to content

Commit

Permalink
Explicitly check if python -c "import distutils" is possible
Browse files Browse the repository at this point in the history
This makes the check more general and compatible with later versions
of Python than just 3.12.
  • Loading branch information
bartoldeman committed Mar 18, 2024
1 parent 38cc5ea commit b6e3018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/eb_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
# update to latest pip, check version
pip install --upgrade pip
pip --version
if [[ "${{matrix.python}}" == 3.12 ]]; then
# needed for python setup.py sdist
if ! python -c "import distutils" 2> /dev/null; then
# we need setuptools for distutils in Python 3.12+, needed for python setup.py sdist
pip install --upgrade setuptools
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ jobs:
pip install --upgrade pip
pip --version
pip install -r requirements.txt
if [[ "${{matrix.python}}" == 3.12 ]]; then
# needed for python setup.py sdist
if ! python -c "import distutils" 2> /dev/null; then
# we need setuptools for distutils in Python 3.12+, needed for python setup.py sdist
pip install --upgrade setuptools
fi
# git config is required to make actual git commits (cfr. tests for GitRepository)
Expand Down

0 comments on commit b6e3018

Please sign in to comment.