Skip to content

Commit

Permalink
🩹 temporary workaround for problems with editable installs in scikit-…
Browse files Browse the repository at this point in the history
…build-core (#386)

## Description

This PR works around a couple of issues that arose with editable
installs in the latest scikit-build-core version (`0.6.0`).
While this is investigated on the SBC side, we introduce an upper cap on
the respective version.

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer authored Oct 24, 2023
1 parent 28579a2 commit 1024b3a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,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
14 changes: 11 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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.qmap", *session.posargs)

Expand All @@ -56,7 +58,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)
Expand Down Expand Up @@ -90,7 +94,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]")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 1024b3a

Please sign in to comment.