Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ update scikit-build-core #328

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ repos:
- id: check-sdist
args: [--inject-junk]
additional_dependencies:
- scikit-build-core[pyproject]>=0.5.0,<0.6 # TODO: remove upper cap once scikit-build-core is updated
- scikit-build-core[pyproject]>=0.6.1
- setuptools-scm>=7
- pybind11>=2.11
21 changes: 9 additions & 12 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]

BUILD_REQUIREMENTS = [
"scikit-build-core[pyproject]>=0.6.1",
"setuptools_scm>=7",
"pybind11>=2.11",
]

if os.environ.get("CI", None):
nox.options.error_on_missing_interpreters = True

Expand All @@ -36,9 +42,7 @@ def pylint(session: nox.Session) -> None:

Simply execute `nox -rs pylint` to run PyLint.
"""
session.install(
"scikit-build-core[pyproject]<0.6", "setuptools_scm", "pybind11"
) # TODO: remove upper cap once scikit-build-core is updated
session.install(*BUILD_REQUIREMENTS)
session.install("--no-build-isolation", "-ve.", "pylint")
session.run("pylint", "mqt.qcec", *session.posargs)

Expand All @@ -61,9 +65,7 @@ def _run_tests(
_extras.append("coverage")
posargs.append("--cov-config=pyproject.toml")

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
session.install(*BUILD_REQUIREMENTS, *install_args, env=env)
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 @@ -97,13 +99,8 @@ 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]<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(*BUILD_REQUIREMENTS, *extra_installs)
session.install("--no-build-isolation", "-ve.[docs]")
session.chdir("docs")

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[build-system]
# 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"]
requires = ["scikit-build-core>=0.6.1", "setuptools-scm>=7", "pybind11>=2.11"]
build-backend = "scikit_build_core.build"

[project]
Expand Down Expand Up @@ -71,7 +70,7 @@ Discussions = "https://github.com/cda-tum/mqt-qcec/discussions"

[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "0.5.0"
minimum-version = "0.6.1"

# Set the target to build
cmake.targets = ["pyqcec"]
Expand Down Expand Up @@ -214,6 +213,7 @@ extend-select = [
]
extend-ignore = [
"ANN101", # Missing type annotation for self in method
"ISC001", # Conflicts with formatter
"PLR", # Design related pylint codes
]
isort.required-imports = ["from __future__ import annotations"]
Expand Down
2 changes: 1 addition & 1 deletion test/python/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scikit-build-core==0.5.0
scikit-build-core==0.6.1
setuptools-scm==7.0.0
pybind11==2.11.0
pytest==7.0.0
Expand Down