diff --git a/.azure/docs-linux.yml b/.azure/docs-linux.yml index 4f1f9206a11c..0f8e3015c0eb 100644 --- a/.azure/docs-linux.yml +++ b/.azure/docs-linux.yml @@ -30,8 +30,8 @@ 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' @@ -39,6 +39,8 @@ jobs: - bash: | tox -edocs displayName: 'Run Docs build' + env: + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - task: ArchiveFiles@2 inputs: diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index 830acdc1821e..5fddd6afef3f 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -28,7 +28,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/bin/activate pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt @@ -36,6 +36,8 @@ jobs: 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 diff --git a/.azure/test-linux.yml b/.azure/test-linux.yml index 6389dafc8604..14d1c090f822 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -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" @@ -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 @@ -165,6 +168,8 @@ jobs: sudo apt-get install -y graphviz pandoc image_tests/bin/pip check displayName: 'Install dependencies' + env: + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: image_tests/bin/python -m unittest discover -v test/ipynb displayName: 'Run image test' diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index c0e05f4990ff..4417dd8add68 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -41,7 +41,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/bin/activate pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt @@ -49,6 +49,8 @@ jobs: python setup.py build_ext --inplace pip check displayName: 'Install dependencies' + env: + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e diff --git a/.azure/test-windows.yml b/.azure/test-windows.yml index 9bac8b2683bf..8140a6ce4fbb 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -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 @@ -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 diff --git a/.azure/tutorials-linux.yml b/.azure/tutorials-linux.yml index 03eac35bc193..2ce7cb9026c8 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -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 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6e149a0d39c7..08861cb1def9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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 diff --git a/.github/workflows/randomized_tests.yml b/.github/workflows/randomized_tests.yml index 5465e499b105..f96f84e0ed78 100644 --- a/.github/workflows/randomized_tests.yml +++ b/.github/workflows/randomized_tests.yml @@ -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 diff --git a/constraints.txt b/constraints.txt index 3cb8598cb345..bf4e304596c5 100644 --- a/constraints.txt +++ b/constraints.txt @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 9282c3b8c8d0..728e2a2be55a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/requirements-dev.txt b/requirements-dev.txt index eef50c6b96e1..fb5e2cbeae18 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -setuptools-rust +setuptools-rust<1.5.0 coverage>=4.4.0 hypothesis>=4.24.3 python-constraint>=1.4 diff --git a/tox.ini b/tox.ini index f457cab047e0..0561b10732a7 100644 --- a/tox.ini +++ b/tox.ini @@ -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 =