Skip to content
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 .distro/python-scikit-build-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cp -p src/scikit_build_core/_vendor/pyproject_metadata/LICENSE LICENSE-pyproject
%if %{with no_classifier_check}
export HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
%endif
%pyproject_buildrequires -x test,test-meta,test-numpy
%pyproject_buildrequires -g test,test-meta,test-numpy


%build
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ jobs:

- name: Install package (uv)
run:
uv pip install
-e.[test,test-meta,test-numpy,test-schema,test-hatchling,wheels,cov,wheel-free-setuptools]
--system
uv pip install -e.[wheels,wheel-free-setuptools] --group=dev --system

- name: Test package
if: "!contains(matrix.python_version, 'pypy')"
Expand Down Expand Up @@ -182,7 +180,7 @@ jobs:

- name: Install min requirements
run: |
uv pip install -e .[test,pyproject] --resolution=lowest-direct --system
uv pip install -e. --group=test --resolution=lowest-direct --system

- name: Setup CMake 3.15
uses: jwlawson/actions-setup-cmake@v2.0
Expand Down Expand Up @@ -218,7 +216,7 @@ jobs:
run: python3.13t -m venv /venv

- name: Install deps
run: /venv/bin/pip install -e .[test] ninja
run: /venv/bin/pip install -e . --group=test ninja

- name: Test package
run: /venv/bin/pytest
Expand All @@ -241,7 +239,7 @@ jobs:
cmake ninja git make gcc-g++ python39 python39-devel python39-pip

- name: Install
run: python3.9 -m pip install .[test]
run: python3.9 -m pip install . --group=test

- name: Test package
run:
Expand Down Expand Up @@ -274,7 +272,7 @@ jobs:
persist-credentials: false

- name: Install
run: python -m pip install .[test]
run: python -m pip install . --group=test

- name: Test package
run: >-
Expand Down Expand Up @@ -307,7 +305,7 @@ jobs:
persist-credentials: false

- name: Install
run: python -m pip install .[test]
run: python -m pip install . --group=test

- name: Test package
run: >-
Expand Down
31 changes: 10 additions & 21 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,15 @@
# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"

# Unshallow the git clone to allow vcs versioning to pick
# up tags properly
jobs:
post_checkout:
- git fetch --unshallow

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .
extra_requirements:
- docs
- pyproject
python: "3.13"
commands:
- git fetch --unshallow
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv sync --group docs
- uv run python -m sphinx -T -b html -d docs/_build/doctrees -D language=en
docs $READTHEDOCS_OUTPUT/html
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def pylint(session: nox.Session) -> None:
"""
# This needs to be installed into the package environment, and is slower
# than a pre-commit check
session.install("-e.[dev,test,test-meta]", "pylint==3.3.*")
session.install("-e.", "--group=dev", "pylint==3.3.*")
session.run("pylint", "--version")
session.run("pylint", "scikit_build_core", *session.posargs)

Expand Down Expand Up @@ -80,8 +80,8 @@ def _run_tests(
posargs.append("--cov-config=pyproject.toml")
env["COVERAGE_CORE"] = "sysmon"

install_arg = f"-e.[{','.join(_extras)}]"
session.install(install_arg, *install_args, silent=False)
install_arg = ["-e.", *{" ".join(f"--group={e}" for e in _extras)}]
session.install(*install_arg, *install_args, silent=False)
session.run("pytest", *run_args, *posargs, env=env)


Expand All @@ -104,7 +104,7 @@ def tests(session: nox.Session) -> None:
"""
Run the unit and regular tests. Includes coverage if --cov passed.
"""
_run_tests(session, extras=["test-meta,test-numpy,test-schema,test-hatchling"])
_run_tests(session, extras=["dev"])


@nox.session(reuse_venv=True, tags=["gen"])
Expand Down Expand Up @@ -158,7 +158,7 @@ def docs(session: nox.Session) -> None:

serve = args.builder == "html" and session.interactive
extra_installs = ["sphinx-autobuild"] if serve else []
session.install("-e.[docs]", *extra_installs)
session.install("-e.", "--group=docs", *extra_installs)

session.chdir("docs")

Expand Down
59 changes: 36 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,32 @@ dependencies = [
[project.optional-dependencies]
pyproject = [
]
wheels = [
"cmake",
"ninja; sys_platform!='win32'",
]
wheel-free-setuptools = [
'setuptools>=70.1; python_version>="3.8"',
]

[project.urls]
Changelog = "https://scikit-build-core.readthedocs.io/en/latest/changelog.html"
Discussions = "https://github.com/orgs/scikit-build/discussions"
Documentation = "https://scikit-build-core.readthedocs.io"
Homepage = "https://github.com/scikit-build/scikit-build-core"
Issues = "https://github.com/scikit-build/scikit-build-core/issues"

[project.entry-points]
"distutils.commands".build_cmake = "scikit_build_core.setuptools.build_cmake:BuildCMake"
"distutils.setup_keywords".cmake_source_dir = "scikit_build_core.setuptools.build_cmake:cmake_source_dir"
"distutils.setup_keywords".cmake_args = "scikit_build_core.setuptools.build_cmake:cmake_args"
"distutils.setup_keywords".cmake_install_target = "scikit_build_core.setuptools.build_cmake:cmake_install_target"
"setuptools.finalize_distribution_options".scikit_build_entry = "scikit_build_core.setuptools.build_cmake:finalize_distribution_options"
"validate_pyproject.tool_schema".scikit-build = "scikit_build_core.settings.skbuild_schema:get_skbuild_schema"
hatch.scikit-build = "scikit_build_core.hatch.hooks"


[dependency-groups]
test = [
"build >=0.8",
"cattrs >=22.2.0",
Expand All @@ -64,30 +90,36 @@ test = [
"wheel >=0.40",
]
test-hatchling = [
{ include-group = "test" },
"hatchling >=1.24.0",
]
test-meta = [
{ include-group = "test" },
"hatch-fancy-pypi-readme>=22.3",
"setuptools-scm",
]
test-numpy = [
{ include-group = "test" },
"numpy; python_version<'3.14' and platform_python_implementation!='PyPy' and (platform_system != 'Windows' or platform_machine != 'ARM64')",
"numpy~=1.24.0; python_version=='3.8' and platform_python_implementation=='PyPy'",
"numpy~=2.0.0; python_version=='3.9' and platform_python_implementation=='PyPy'",
"numpy~=2.2.0; python_version=='3.10' and platform_python_implementation=='PyPy'",
]
test-schema = [
{ include-group = "test" },
"fastjsonschema",
"validate-pyproject",
]
cov = [
{ include-group = "test" },
"pytest-cov",
]
wheels = [
"cmake",
"ninja; sys_platform!='win32'",
]
dev = [
{ include-group = "cov" },
{ include-group = "test-hatchling" },
{ include-group = "test-meta" },
{ include-group = "test-numpy" },
{ include-group = "test-schema" },
"rich",
]
docs = [
Expand All @@ -103,33 +135,14 @@ docs = [
"sphinx-tippy",
"sphinxcontrib-programoutput",
]
wheel-free-setuptools = [
'setuptools>=70.1; python_version>="3.8"',
]

[project.urls]
Changelog = "https://scikit-build-core.readthedocs.io/en/latest/changelog.html"
Discussions = "https://github.com/orgs/scikit-build/discussions"
Documentation = "https://scikit-build-core.readthedocs.io"
Homepage = "https://github.com/scikit-build/scikit-build-core"
Issues = "https://github.com/scikit-build/scikit-build-core/issues"

[project.entry-points]
"distutils.commands".build_cmake = "scikit_build_core.setuptools.build_cmake:BuildCMake"
"distutils.setup_keywords".cmake_source_dir = "scikit_build_core.setuptools.build_cmake:cmake_source_dir"
"distutils.setup_keywords".cmake_args = "scikit_build_core.setuptools.build_cmake:cmake_args"
"distutils.setup_keywords".cmake_install_target = "scikit_build_core.setuptools.build_cmake:cmake_install_target"
"setuptools.finalize_distribution_options".scikit_build_entry = "scikit_build_core.setuptools.build_cmake:finalize_distribution_options"
"validate_pyproject.tool_schema".scikit-build = "scikit_build_core.settings.skbuild_schema:get_skbuild_schema"
hatch.scikit-build = "scikit_build_core.hatch.hooks"

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/scikit_build_core/_version.py"


[tool.uv]
dev-dependencies = ["scikit-build-core[test,test-hatchling,test-meta,test-numpy,test-schema,cov,dev]"]
workspace.members = ["tmp/hello/hello"]


Expand Down
2 changes: 1 addition & 1 deletion tests/plans.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
node-date: 2025-02-27T16:18:39-05:00
describe-name: v0.11.0
EOF
pip install --user .[test]
pip install --user . --group=test
discover:
how: fmf
filter: "tag: pytest"
Expand Down
Loading