mirror of https://github.com/Qiskit/qiskit.git
Fix `tox -e docs` for macOS (#9765)
* Fix `tox -e docs` for macOS Co-authored-by: Jake Lishman <jake@binhbar.com> * Fix two issues. Duh, thanks Jake * Update Azure job to set RUST_DEBUG Not strictly necessary since Tox already sets it. But makes things consistent and avoids accidentally removing this in the future --------- Co-authored-by: Jake Lishman <jake@binhbar.com>
This commit is contained in:
parent
d272919172
commit
3284ea088b
|
@ -9,6 +9,7 @@ jobs:
|
|||
|
||||
variables:
|
||||
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
|
||||
RUST_DEBUG: 1
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
@ -29,8 +30,6 @@ jobs:
|
|||
- bash: |
|
||||
tox -edocs
|
||||
displayName: 'Run Docs build'
|
||||
env:
|
||||
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
|
|
12
setup.py
12
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 @@ setup(
|
|||
"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={
|
||||
|
|
14
tox.ini
14
tox.ini
|
@ -67,24 +67,16 @@ commands =
|
|||
coverage3 report
|
||||
|
||||
[testenv:docs]
|
||||
# Editable mode breaks macOS: https://github.com/sphinx-doc/sphinx/issues/10943
|
||||
usedevelop = False
|
||||
basepython = python3
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
QISKIT_SUPPRESS_PACKAGING_WARNINGS=Y
|
||||
RUST_DEBUG=1 # Faster to compile.
|
||||
deps =
|
||||
setuptools_rust # This is work around for the bug of tox 3 (see #8606 for more details.)
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
qiskit-aer
|
||||
commands =
|
||||
sphinx-build -W -j auto -T --keep-going -b html docs/ docs/_build/html {posargs}
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 105
|
||||
# default ignores + E741 because of opflow global variable I
|
||||
# + E203 because of a difference of opinion with black
|
||||
# codebase does currently comply with: E133, E242, E704, W505
|
||||
ignore = E121, E123, E126, E133, E226, E241, E242, E704, W503, W504, W505, E741, E203
|
||||
|
||||
[flake8]
|
||||
max-line-length = 105
|
||||
extend-ignore = E203, E741
|
||||
|
|
Loading…
Reference in New Issue