From 6780f5a9ac80c29cfe181fbe488df18799e9ff06 Mon Sep 17 00:00:00 2001 From: burgholzer Date: Tue, 24 Oct 2023 16:53:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20temporary=20workaround=20for=20p?= =?UTF-8?q?roblems=20with=20editable=20installs=20in=20scikit-build-core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: burgholzer --- .pre-commit-config.yaml | 2 +- noxfile.py | 14 +++++++++++--- pyproject.toml | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b96de6bf..17ae9b66 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -128,6 +128,6 @@ repos: - id: check-sdist args: [--inject-junk] additional_dependencies: - - scikit-build-core[pyproject]>=0.5.0 + - scikit-build-core[pyproject]>=0.5.0,<0.6 # TODO: remove upper cap once scikit-build-core is updated - setuptools-scm>=7 - pybind11>=2.11 diff --git a/noxfile.py b/noxfile.py index d5d66801..ecd0525d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -36,7 +36,9 @@ def pylint(session: nox.Session) -> None: Simply execute `nox -rs pylint` to run PyLint. """ - session.install("scikit-build-core[pyproject]", "setuptools_scm", "pybind11") + session.install( + "scikit-build-core[pyproject]<0.6", "setuptools_scm", "pybind11" + ) # TODO: remove upper cap once scikit-build-core is updated session.install("--no-build-isolation", "-ve.", "pylint") session.run("pylint", "mqt.qcec", *session.posargs) @@ -59,7 +61,9 @@ def _run_tests( _extras.append("coverage") posargs.append("--cov-config=pyproject.toml") - session.install("scikit-build-core[pyproject]", "setuptools_scm", "pybind11", *install_args, env=env) + session.install( + "scikit-build-core[pyproject]<0.6", "setuptools_scm", "pybind11", *install_args, env=env + ) # TODO: remove upper cap once scikit-build-core is updated install_arg = f"-ve.[{','.join(_extras)}]" session.install("--no-build-isolation", install_arg, *install_args, env=env) session.run("pytest", *run_args, *posargs, env=env) @@ -93,7 +97,11 @@ def docs(session: nox.Session) -> None: if args.builder != "html" and args.serve: session.error("Must not specify non-HTML builder with --serve") - build_requirements = ["scikit-build-core[pyproject]", "setuptools_scm", "pybind11"] + build_requirements = [ + "scikit-build-core[pyproject]<0.6", + "setuptools_scm", + "pybind11", + ] # TODO: remove upper cap once scikit-build-core is updated extra_installs = ["sphinx-autobuild"] if args.serve else [] session.install(*build_requirements, *extra_installs) session.install("--no-build-isolation", "-ve.[docs]") diff --git a/pyproject.toml b/pyproject.toml index ffeef1d4..b7450e4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] -requires = ["scikit-build-core>=0.5.0", "setuptools-scm>=7", "pybind11>=2.11"] +# TODO: remove upper cap once scikit-build-core is updated +requires = ["scikit-build-core>=0.5.0,<0.6.0", "setuptools-scm>=7", "pybind11>=2.11"] build-backend = "scikit_build_core.build" [project]