Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin setuptools in CI #8526

Merged
merged 11 commits into from
Aug 12, 2022
6 changes: 4 additions & 2 deletions .azure/docs-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ jobs:

- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel
pip install -U tox
python -m pip install --upgrade pip 'setuptools<64.0.0' wheel -c constraints.txt
pip install -U tox -c constraints.txt
sudo apt-get update
sudo apt-get install -y graphviz
displayName: 'Install dependencies'
- bash: |
tox -edocs
displayName: 'Run Docs build'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- task: ArchiveFiles@2
inputs:
Expand Down
4 changes: 3 additions & 1 deletion .azure/lint-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ jobs:

- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel virtualenv
python -m pip install --upgrade pip 'setuptools<64.0.0' wheel virtualenv -c constraints.txt
virtualenv test-job
source test-job/bin/activate
pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt
pip install -U -c constraints.txt -e .
pip install -U "qiskit-aer" -c constraints.txt
python setup.py build_ext --inplace
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- bash: |
set -e
Expand Down
5 changes: 4 additions & 1 deletion .azure/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel virtualenv
python -m pip install --upgrade pip 'setuptools<64.0.0' wheel virtualenv -c constraints.txt
virtualenv test-job
displayName: "Prepare venv"

Expand All @@ -82,6 +82,9 @@ jobs:
pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt
pip install -U -c constraints.txt -e .
displayName: "Install Terra directly"
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"


- bash: |
set -e
Expand Down
4 changes: 3 additions & 1 deletion .azure/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ jobs:

- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel virtualenv
python -m pip install --upgrade pip 'setuptools<64.0.0' wheel virtualenv -c constraints.txt
virtualenv test-job
source test-job/bin/activate
pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt
pip install -U -c constraints.txt -e .
python setup.py build_ext --inplace
pip check
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- bash: |
set -e
Expand Down
4 changes: 3 additions & 1 deletion .azure/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel virtualenv
python -m pip install --upgrade pip 'setuptools<64.0.0' wheel virtualenv -c constraints.txt
virtualenv test-job
source test-job/Scripts/activate
pip install -r requirements.txt -r requirements-dev.txt -c constraints.txt
Expand All @@ -39,6 +39,8 @@ jobs:
python setup.py build_ext --inplace
pip check
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- bash: |
set -e
Expand Down
2 changes: 2 additions & 0 deletions .azure/tutorials-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
sudo apt-get install -y graphviz pandoc
pip check
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- bash: |
set -e
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
run: pip install tox coveragepy-lcov
- name: Run coverage report
run: tox -ecoverage
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- name: Convert to lcov
run: coveragepy-lcov --output_file_path coveralls.info
- name: Coveralls
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/randomized_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
pip install -c constraints.txt -e .
pip install "qiskit-ibmq-provider" -c constraints.txt
pip install "qiskit-aer"
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- name: Run randomized tests
run: make test_randomized
- name: Create comment on failed test run
Expand Down
4 changes: 4 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ pyparsing<3.0.0
# to work with the new jinja version (the jinja maintainers aren't going to
# fix things) pin to the previous working version.
jinja2==3.0.3

# setuptools 64.0.0 breaks editable installs. Pin to an old version until
# see https://github.com/pypa/setuptools/issues/3498
setuptools==63.3.0
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools-rust"]
requires = ["setuptools", "wheel", "setuptools-rust<1.5.0"]
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
setuptools-rust
setuptools-rust<1.5.0
coverage>=4.4.0
hypothesis>=4.24.3
python-constraint>=1.4
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ setenv =
QISKIT_SUPRESS_PACKAGING_WARNINGS=Y
QISKIT_TEST_CAPTURE_STREAMS=1
QISKIT_PARALLEL=FALSE
passenv = RAYON_NUM_THREADS OMP_NUM_THREADS QISKIT_PARALLEL
passenv = RAYON_NUM_THREADS OMP_NUM_THREADS QISKIT_PARALLEL SETUPTOOLS_ENABLE_FEATURES
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
commands =
Expand Down