From c2c26986b43b753ac7afa5eac0ffe52aef0d2d89 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 8 Mar 2023 12:12:20 -0600 Subject: [PATCH 1/8] Remove unnecessary `pip install` in CI --- .azure/lint-linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index a538b4a9b48..fdabc2427d7 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -24,7 +24,6 @@ jobs: 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 - pip install -e . displayName: 'Install dependencies' env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" From 5994427302969f94ba9f0ce7a97e967cfd05ce52 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 8 Mar 2023 12:51:57 -0600 Subject: [PATCH 2/8] Consolidate `pip install` calls in CI --- .azure/lint-linux.yml | 9 ++++++--- .azure/test-linux.yml | 30 +++++++++++++++++++++--------- .azure/test-macos.yml | 9 ++++++--- .azure/test-windows.yml | 11 +++++++---- .azure/tutorials-linux.yml | 17 ++++++++++++++--- 5 files changed, 54 insertions(+), 22 deletions(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index fdabc2427d7..ae3385afad4 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -21,9 +21,12 @@ jobs: python -m pip install --upgrade pip setuptools wheel virtualenv 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 + pip install \ + -c constraints.txt \ + -r requirements.txt \ + -r requirements-dev.txt \ + "qiskit-aer" \ + . displayName: 'Install dependencies' env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" diff --git a/.azure/test-linux.yml b/.azure/test-linux.yml index 60f71c04965..0d68efcdd13 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -60,19 +60,25 @@ jobs: # Use stable Rust, rather than MSRV, to spot-check that stable builds properly. rustup override set stable source test-job/bin/activate - pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt # Install setuptools-rust for building sdist - pip install -U -c constraints.txt setuptools-rust + pip install -c constraints.txt setuptools-rust python setup.py sdist - pip install -U -c constraints.txt dist/qiskit-terra*.tar.gz + pip install \ + -c constraints.txt \ + -r requirements.txt \ + -r requirements-dev.txt \ + dist/qiskit-terra*.tar.gz displayName: "Install Terra from sdist" - ${{ if eq(parameters.installFromSdist, false) }}: - bash: | set -e 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 \ + -c constraints.txt \ + -r requirements.txt \ + -r requirements-dev.txt \ + . displayName: "Install Terra directly" env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" @@ -80,7 +86,11 @@ jobs: - bash: | set -e source test-job/bin/activate - pip install -U "cplex;python_version < '3.11'" "qiskit-aer" "z3-solver" -c constraints.txt + pip install \ + -c constraints.txt \ + "cplex;python_version < '3.11'" \ + "qiskit-aer" \ + "z3-solver" mkdir -p /tmp/terra-tests cp -r test /tmp/terra-tests/. cp .stestr.conf /tmp/terra-tests/. @@ -107,7 +117,7 @@ jobs: set -e source test-job/bin/activate cp tools/subunit_to_junit.py /tmp/terra-tests/. - pip install -U junitxml + pip install junitxml pushd /tmp/terra-tests mkdir -p junit stestr last --subunit | ./subunit_to_junit.py -o junit/test-results.xml @@ -162,8 +172,10 @@ jobs: - bash: | set -e virtualenv image_tests - image_tests/bin/pip install -U -r requirements.txt -c constraints.txt - image_tests/bin/pip install -U -c constraints.txt -e ".[visualization]" + image_tests/bin/pip install -U \ + -c constraints.txt \ + -r requirements.txt \ + ".[visualization]" sudo apt-get update sudo apt-get install -y graphviz pandoc image_tests/bin/pip check diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index 208bb020080..f1e55d4b8ac 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -34,8 +34,11 @@ jobs: python -m pip install --upgrade pip setuptools wheel virtualenv 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 \ + -c constraints.txt \ + -r requirements.txt \ + -r requirements-dev.txt \ + . pip check displayName: 'Install dependencies' env: @@ -55,7 +58,7 @@ jobs: - bash: | set -e source test-job/bin/activate - pip install -U junitxml + pip install junitxml mkdir -p junit stestr last --subunit | tools/subunit_to_junit.py -o junit/test-results.xml pushd .stestr diff --git a/.azure/test-windows.yml b/.azure/test-windows.yml index 4d8a10f6bef..870e65e688e 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -33,9 +33,12 @@ jobs: python -m pip install --upgrade pip setuptools wheel virtualenv virtualenv test-job source test-job/Scripts/activate - pip install -r requirements.txt -r requirements-dev.txt -c constraints.txt - pip install -c constraints.txt -e . - pip install "z3-solver" -c constraints.txt + pip install \ + -c constraints.txt \ + -r requirements.txt \ + -r requirements-dev.txt \ + "z3-solver" \ + . pip check displayName: 'Install dependencies' env: @@ -59,7 +62,7 @@ jobs: set -e chcp.com 65001 source test-job/Scripts/activate - pip install -U junitxml + pip install junitxml mkdir -p junit stestr last --subunit | python tools/subunit_to_junit.py -o junit/test-results.xml pushd .stestr diff --git a/.azure/tutorials-linux.yml b/.azure/tutorials-linux.yml index 3ae28279a37..d6e079ad999 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -22,9 +22,20 @@ jobs: set -e git clone https://github.com/Qiskit/qiskit-tutorials --depth=1 python -m pip install --upgrade pip - pip install -U -r requirements.txt -r requirements-dev.txt -c constraints.txt - pip install -c constraints.txt -e . - pip install "qiskit-ibmq-provider" "qiskit-aer" "z3-solver" "networkx" "matplotlib>=3.3.0" sphinx nbsphinx sphinx_rtd_theme cvxpy -c constraints.txt + pip install \ + -c constraints.txt \ + -r requirements.txt \ + -r requirements-dev.txt \ + "qiskit-ibmq-provider" \ + "qiskit-aer" \ + "z3-solver" \ + "networkx" \ + "matplotlib>=3.3.0" \ + sphinx \ + nbsphinx \ + sphinx_rtd_theme \ + cvxpy \ + . sudo apt-get update sudo apt-get install -y graphviz pandoc pip check From 5d0e92e318487bfe3854ee5cffe15153c7940f0a Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 8 Mar 2023 13:11:50 -0600 Subject: [PATCH 3/8] Add back `-U` --- .azure/lint-linux.yml | 2 +- .azure/test-linux.yml | 10 +++++----- .azure/test-macos.yml | 4 ++-- .azure/test-windows.yml | 4 ++-- .azure/tutorials-linux.yml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index ae3385afad4..6b3b6804c24 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -21,7 +21,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel virtualenv virtualenv test-job source test-job/bin/activate - pip install \ + pip install -U \ -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ diff --git a/.azure/test-linux.yml b/.azure/test-linux.yml index 0d68efcdd13..38b2e3935da 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -61,9 +61,9 @@ jobs: rustup override set stable source test-job/bin/activate # Install setuptools-rust for building sdist - pip install -c constraints.txt setuptools-rust + pip install -U -c constraints.txt setuptools-rust python setup.py sdist - pip install \ + pip install -U \ -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ @@ -74,7 +74,7 @@ jobs: - bash: | set -e source test-job/bin/activate - pip install \ + pip install -U \ -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ @@ -86,7 +86,7 @@ jobs: - bash: | set -e source test-job/bin/activate - pip install \ + pip install -U \ -c constraints.txt \ "cplex;python_version < '3.11'" \ "qiskit-aer" \ @@ -117,7 +117,7 @@ jobs: set -e source test-job/bin/activate cp tools/subunit_to_junit.py /tmp/terra-tests/. - pip install junitxml + pip install -U junitxml pushd /tmp/terra-tests mkdir -p junit stestr last --subunit | ./subunit_to_junit.py -o junit/test-results.xml diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index f1e55d4b8ac..7e9aae50413 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -34,7 +34,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel virtualenv virtualenv test-job source test-job/bin/activate - pip install \ + pip install -U \ -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ @@ -58,7 +58,7 @@ jobs: - bash: | set -e source test-job/bin/activate - pip install junitxml + pip install -U junitxml mkdir -p junit stestr last --subunit | tools/subunit_to_junit.py -o junit/test-results.xml pushd .stestr diff --git a/.azure/test-windows.yml b/.azure/test-windows.yml index 870e65e688e..b6fbdc7fc56 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -33,7 +33,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel virtualenv virtualenv test-job source test-job/Scripts/activate - pip install \ + pip install -U \ -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ @@ -62,7 +62,7 @@ jobs: set -e chcp.com 65001 source test-job/Scripts/activate - pip install junitxml + pip install -U junitxml mkdir -p junit stestr last --subunit | python tools/subunit_to_junit.py -o junit/test-results.xml pushd .stestr diff --git a/.azure/tutorials-linux.yml b/.azure/tutorials-linux.yml index d6e079ad999..050ad6bae63 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -22,7 +22,7 @@ jobs: set -e git clone https://github.com/Qiskit/qiskit-tutorials --depth=1 python -m pip install --upgrade pip - pip install \ + pip install -U \ -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ From 11e0d18ddd332785d610d2766a15422dee633eed Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 8 Mar 2023 13:22:20 -0600 Subject: [PATCH 4/8] Go back to editable install so Rust is in debug mode --- .azure/lint-linux.yml | 2 +- .azure/test-linux.yml | 4 ++-- .azure/test-macos.yml | 2 +- .azure/test-windows.yml | 2 +- .azure/tutorials-linux.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index 6b3b6804c24..e38ce315aed 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -26,7 +26,7 @@ jobs: -r requirements.txt \ -r requirements-dev.txt \ "qiskit-aer" \ - . + -e . displayName: 'Install dependencies' env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" diff --git a/.azure/test-linux.yml b/.azure/test-linux.yml index 38b2e3935da..1c7711b1dcd 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -78,7 +78,7 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - . + -e . displayName: "Install Terra directly" env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" @@ -175,7 +175,7 @@ jobs: image_tests/bin/pip install -U \ -c constraints.txt \ -r requirements.txt \ - ".[visualization]" + -e ".[visualization]" sudo apt-get update sudo apt-get install -y graphviz pandoc image_tests/bin/pip check diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index 7e9aae50413..c1eafa41204 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -38,7 +38,7 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - . + -e . pip check displayName: 'Install dependencies' env: diff --git a/.azure/test-windows.yml b/.azure/test-windows.yml index b6fbdc7fc56..7d4eb0d734a 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -38,7 +38,7 @@ jobs: -r requirements.txt \ -r requirements-dev.txt \ "z3-solver" \ - . + -e . pip check displayName: 'Install dependencies' env: diff --git a/.azure/tutorials-linux.yml b/.azure/tutorials-linux.yml index 050ad6bae63..179fec883a3 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -35,7 +35,7 @@ jobs: nbsphinx \ sphinx_rtd_theme \ cvxpy \ - . + -e . sudo apt-get update sudo apt-get install -y graphviz pandoc pip check From 3f2adb75c77c5a9b61f023345cf14791aca8b5d3 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Thu, 9 Mar 2023 14:26:35 -0600 Subject: [PATCH 5/8] Add RUST_DEBUG env var so we can avoid editable install --- .azure/docs-linux.yml | 1 + .azure/lint-linux.yml | 3 ++- .azure/test-linux.yml | 5 +++-- .azure/test-macos.yml | 3 ++- .azure/test-windows.yml | 3 ++- .azure/tutorials-linux.yml | 3 ++- setup.py | 12 +++++++++--- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.azure/docs-linux.yml b/.azure/docs-linux.yml index 99baf236079..7ab6fa04e26 100644 --- a/.azure/docs-linux.yml +++ b/.azure/docs-linux.yml @@ -9,6 +9,7 @@ jobs: variables: PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip + RUST_DEBUG: 1 steps: - checkout: self diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index e38ce315aed..b5c40ba26a7 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -9,6 +9,7 @@ jobs: variables: PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip + RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -26,7 +27,7 @@ jobs: -r requirements.txt \ -r requirements-dev.txt \ "qiskit-aer" \ - -e . + . displayName: 'Install dependencies' env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" diff --git a/.azure/test-linux.yml b/.azure/test-linux.yml index 1c7711b1dcd..43e0d5dd495 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -25,6 +25,7 @@ jobs: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip QISKIT_TEST_CAPTURE_STREAMS: 1 + RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -78,7 +79,7 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - -e . + . displayName: "Install Terra directly" env: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" @@ -175,7 +176,7 @@ jobs: image_tests/bin/pip install -U \ -c constraints.txt \ -r requirements.txt \ - -e ".[visualization]" + ".[visualization]" sudo apt-get update sudo apt-get install -y graphviz pandoc image_tests/bin/pip check diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index c1eafa41204..c62cd93dbbe 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -12,6 +12,7 @@ jobs: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip QISKIT_TEST_CAPTURE_STREAMS: 1 + RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -38,7 +39,7 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - -e . + . pip check displayName: 'Install dependencies' env: diff --git a/.azure/test-windows.yml b/.azure/test-windows.yml index 7d4eb0d734a..acf8c61e143 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -11,6 +11,7 @@ jobs: variables: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y QISKIT_TEST_CAPTURE_STREAMS: 1 + RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -38,7 +39,7 @@ jobs: -r requirements.txt \ -r requirements-dev.txt \ "z3-solver" \ - -e . + . pip check displayName: 'Install dependencies' env: diff --git a/.azure/tutorials-linux.yml b/.azure/tutorials-linux.yml index 179fec883a3..fa7996964ca 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -11,6 +11,7 @@ jobs: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip QISKIT_CELL_TIMEOUT: 300 + RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -35,7 +36,7 @@ jobs: nbsphinx \ sphinx_rtd_theme \ cvxpy \ - -e . + . sudo apt-get update sudo apt-get install -y graphviz pandoc pip check diff --git a/setup.py b/setup.py index 7f6f2cb5b91..693f03b2cb8 100755 --- a/setup.py +++ b/setup.py @@ -14,8 +14,7 @@ import os import re -import sys -from setuptools import setup, find_packages, Extension +from setuptools import setup, find_packages from setuptools_rust import Binding, RustExtension @@ -100,7 +99,14 @@ "Source Code": "https://github.com/Qiskit/qiskit-terra", }, rust_extensions=[ - RustExtension("qiskit._accelerate", "crates/accelerate/Cargo.toml", binding=Binding.PyO3) + RustExtension( + "qiskit._accelerate", + "crates/accelerate/Cargo.toml", + binding=Binding.PyO3, + # If RUST_DEBUG is set, force compiling in debug mode. Else, use the default behavior + # of whether it's an editable installation. + debug=True if os.getenv("RUST_DEBUG") == 1 else None, + ) ], zip_safe=False, entry_points={ From 3d9fbfed47c318ece100f00138d74a05bbd4e0e9 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Thu, 9 Mar 2023 15:39:53 -0600 Subject: [PATCH 6/8] Remove SETUPTOOLS_ENABLE_FEATURES and also Aer from lint job --- .azure/lint-linux.yml | 3 --- .azure/test-linux.yml | 2 -- .azure/test-macos.yml | 2 -- .azure/test-windows.yml | 2 -- .azure/tutorials-linux.yml | 2 -- 5 files changed, 11 deletions(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index b5c40ba26a7..e9f64ff482a 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -26,11 +26,8 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - "qiskit-aer" \ . 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 43e0d5dd495..bc6607c2e79 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -81,8 +81,6 @@ jobs: -r requirements-dev.txt \ . displayName: "Install Terra directly" - env: - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index c62cd93dbbe..ac9a17ffb0a 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -42,8 +42,6 @@ jobs: . 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 acf8c61e143..6cb505da10c 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -42,8 +42,6 @@ jobs: . 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 fa7996964ca..d6f2e405eec 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -41,8 +41,6 @@ jobs: sudo apt-get install -y graphviz pandoc pip check displayName: 'Install dependencies' - env: - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e From 73b70b2db7bf4b5c0e4191ea98109888763b86a8 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Fri, 10 Mar 2023 08:41:48 -0600 Subject: [PATCH 7/8] See if editable install fixes Pylint --- .azure/lint-linux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index e9f64ff482a..1d9045a6889 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -9,7 +9,6 @@ jobs: variables: PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip - RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -26,8 +25,10 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - . + -e . # For some reason, we need an editable install for Pylint to find our Rust code. displayName: 'Install dependencies' + env: + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e From 68156a1cdda55306f660ce083a3a8490ddd4d5d3 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Fri, 10 Mar 2023 11:46:56 -0600 Subject: [PATCH 8/8] Give up on not using editable installs in CI I don't know why they're causing issues with loading the Rust extension. But it's not a priority to figure that out. This PR is still some forward progress. --- .azure/lint-linux.yml | 4 ++-- .azure/test-linux.yml | 7 ++++--- .azure/test-macos.yml | 5 +++-- .azure/test-windows.yml | 5 +++-- .azure/tutorials-linux.yml | 5 +++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.azure/lint-linux.yml b/.azure/lint-linux.yml index 1d9045a6889..0bba15e64ed 100644 --- a/.azure/lint-linux.yml +++ b/.azure/lint-linux.yml @@ -25,10 +25,10 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - -e . # For some reason, we need an editable install for Pylint to find our Rust code. + -e . displayName: 'Install dependencies' env: - SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e diff --git a/.azure/test-linux.yml b/.azure/test-linux.yml index bc6607c2e79..1c7711b1dcd 100644 --- a/.azure/test-linux.yml +++ b/.azure/test-linux.yml @@ -25,7 +25,6 @@ jobs: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip QISKIT_TEST_CAPTURE_STREAMS: 1 - RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -79,8 +78,10 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - . + -e . displayName: "Install Terra directly" + env: + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e @@ -174,7 +175,7 @@ jobs: image_tests/bin/pip install -U \ -c constraints.txt \ -r requirements.txt \ - ".[visualization]" + -e ".[visualization]" sudo apt-get update sudo apt-get install -y graphviz pandoc image_tests/bin/pip check diff --git a/.azure/test-macos.yml b/.azure/test-macos.yml index ac9a17ffb0a..c1eafa41204 100644 --- a/.azure/test-macos.yml +++ b/.azure/test-macos.yml @@ -12,7 +12,6 @@ jobs: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip QISKIT_TEST_CAPTURE_STREAMS: 1 - RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -39,9 +38,11 @@ jobs: -c constraints.txt \ -r requirements.txt \ -r requirements-dev.txt \ - . + -e . 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 6cb505da10c..7d4eb0d734a 100644 --- a/.azure/test-windows.yml +++ b/.azure/test-windows.yml @@ -11,7 +11,6 @@ jobs: variables: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y QISKIT_TEST_CAPTURE_STREAMS: 1 - RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -39,9 +38,11 @@ jobs: -r requirements.txt \ -r requirements-dev.txt \ "z3-solver" \ - . + -e . 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 d6f2e405eec..179fec883a3 100644 --- a/.azure/tutorials-linux.yml +++ b/.azure/tutorials-linux.yml @@ -11,7 +11,6 @@ jobs: QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip QISKIT_CELL_TIMEOUT: 300 - RUST_DEBUG: 1 steps: - task: UsePythonVersion@0 @@ -36,11 +35,13 @@ jobs: nbsphinx \ sphinx_rtd_theme \ cvxpy \ - . + -e . sudo apt-get update sudo apt-get install -y graphviz pandoc pip check displayName: 'Install dependencies' + env: + SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" - bash: | set -e