Unverified Commit 8c7e2be0 authored by Hongtao Zhang's avatar Hongtao Zhang Committed by GitHub
Browse files

CI/CD - Fix setuptools-scm 10.x compatibility for Python 3.12 (#805)



## Description
This affects all PRs running `python3 setup.py lint` on the Python 3.12
CI job.

## Root Cause

Comparing the last successful cpu-unit-test build (58939, Mar 25) with a
recent failing build (58996, Apr 14), the Python 3.12 "Install
dependencies" step shows:

| Package | Successful (Mar 25) | Failing (Apr 14) |
|---|---|---|
| `setuptools-scm` | < 10.0 (no `vcs-versioning` dep) | 10.0.5 (requires
`vcs-versioning`) |

`setuptools-scm` 10.0.5 was released between the two runs and added
`vcs-versioning` as a new dependency. The `setup_requires` mechanism in
`setup.py` does not install transitive dependencies, so `vcs-versioning`
is missing at runtime.

The successful build lint log (Python 3.12): "ModuleNotFoundError: No
module named 'vcs_versioning'"

This affects all PRs running `python3 setup.py lint` on the Python 3.12
CI job.

## Changes

- Add `vcs_versioning` explicitly to `setup_requires` in `setup.py` so
it is available when `setuptools-scm` is imported during `setup.py`
execution.

## Testing

Verified that `setuptools-scm` 10.0.5 declares `vcs-versioning` as a
dependency, and the CI failure matches the missing transitive dependency
pattern.
Co-authored-by: default avatarHongtao Zhang <hongtaozhang@microsoft.com>
parent 036c4712
......@@ -13,12 +13,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
- name: Install misspell
run: |
curl -L https://git.io/misspell | sudo bash -s -- -b /bin
go install github.com/client9/misspell/cmd/misspell@v0.3.4
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Check spelling
run: |
misspell -error .
run: misspell -error .
cpp:
name: CPP code lint
runs-on: ubuntu-latest
......
......@@ -162,6 +162,7 @@ def run(self):
},
setup_requires=[
'setuptools_scm',
'vcs_versioning; python_version>="3.10"',
],
install_requires=[
'ansible;os_name=="posix" and python_version>"3.10"',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment