Skip to content

Commit

Permalink
ci: Fix Python 2.7 builds on macOS 11
Browse files Browse the repository at this point in the history
With current macOS 11 images tox is run under Python 3.12 and setuptools
isn't installed by default. E.g.

```
python -mtox -e "py27-mode_localhost-ansible4"
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /Users/runner/work/_temp/93a29c4c-f606-45e4-8dbd-a4a5f51b8730.sh
GLOB sdist-make: /Users/runner/work/1/s/setup.py
ERROR: invocation failed (exit code 1), logfile: /Users/runner/work/1/s/.tox/log/GLOB-0.log
================================== log start ===================================
Traceback (most recent call last):
  File "/Users/runner/work/1/s/setup.py", line 32, in <module>
    from setuptools import find_packages, setup
ModuleNotFoundError: No module named 'setuptools'
```

Installing setuptools under 3.12 chooses package versions incompatible with
Python 2.7.
  • Loading branch information
moreati committed Nov 14, 2023
1 parent b7188c1 commit 4029fd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci/azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
displayName: Install build deps
condition: and(eq(variables['python.version'], ''), eq(variables['Agent.OS'], 'Linux'))

- script: python -mpip install "tox<4.0"
- script: python -mpip install "setuptools" "tox<4.0"
displayName: Install tooling

- script: python -mtox -e "$(tox.env)"
Expand Down
5 changes: 5 additions & 0 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,28 @@ jobs:
strategy:
matrix:
Mito_27:
python.version: '2.7'
tox.env: py27-mode_mitogen
Mito_311:
python.version: '3.11'
tox.env: py311-mode_mitogen

# TODO: test python3, python3 tests are broken
Loc_27_210:
python.version: '2.7'
tox.env: py27-mode_localhost-ansible2.10
Loc_27_4:
python.version: '2.7'
tox.env: py27-mode_localhost-ansible4

# NOTE: this hangs when ran in Ubuntu 18.04
Van_27_210:
python.version: '2.7'
tox.env: py27-mode_localhost-ansible2.10
STRATEGY: linear
ANSIBLE_SKIP_TAGS: resource_intensive
Van_27_4:
python.version: '2.7'
tox.env: py27-mode_localhost-ansible4
STRATEGY: linear
ANSIBLE_SKIP_TAGS: resource_intensive
Expand Down

0 comments on commit 4029fd9

Please sign in to comment.