diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 95916d74..da383ca7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -86,7 +86,7 @@ jobs: create-symlink: true - name: Install python tools - run: uv pip install --system -r dev-requirements.txt pytest-github-actions-annotate-failures 'numpy>=2.0.0b1; python_version>="3.9"' + run: uv pip install --system -r dev-requirements.txt pytest-github-actions-annotate-failures - name: Configure run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }} diff --git a/.gitignore b/.gitignore index 8f81fdce..887f921c 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,6 @@ compile_commands.json # Cache /emsdk-cache/* + +# Nox +.nox/* diff --git a/noxfile.py b/noxfile.py index d7fa3f99..b3f5fdf5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -20,16 +20,6 @@ def tests(session: nox.Session) -> None: session.run("pytest", *session.posargs) -@nox.session -def testsnp2(session: nox.Session) -> None: - """ - Run the unit and regular tests with NumPy 2. - """ - - session.install(".[test]", "numpy>=2.0a1") - session.run("pytest", *session.posargs) - - @nox.session def hist(session: nox.Session) -> None: """ @@ -127,8 +117,8 @@ def pylint(session: nox.Session) -> None: """ session.install("pylint==3.2.*") - session.install(".") - session.run("pylint", "src", *session.posargs) + session.install("-e.") + session.run("pylint", "boost_histogram", *session.posargs) @nox.session diff --git a/pyproject.toml b/pyproject.toml index 7d6809b9..de836be7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core>=0.9", "pybind11>=2.12"] +requires = ["scikit-build-core>=0.10", "pybind11>=2.12"] build-backend = "scikit_build_core.build" [project] @@ -9,7 +9,8 @@ description = "The Boost::Histogram Python wrapper." readme = "README.md" requires-python = ">=3.7" authors = [ - { name = "Hans Dembinski and Henry Schreiner", email = "hschrein@cern.ch" }, + { name = "Hans Dembinski", email = "hans.dembinski@gmail.com" }, + { name = "Henry Schreiner", email = "hschrein@cern.ch" }, ] keywords = [ "boost-histogram", @@ -91,11 +92,9 @@ Homepage = "https://github.com/scikit-hep/boost-histogram" [tool.scikit-build] +minimum-version = "build-system.requires" +cmake.version = "CMakeLists.txt" metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" -sdist.include = ["src/boost_histogram/version.py"] -wheel.expand-macos-universal-tags = true -minimum-version = "0.9" -cmake.version = ">=3.24" sdist.exclude = [ "extern/**/*.py", "extern/**/*.md", @@ -113,8 +112,14 @@ sdist.exclude = [ ] +[[tool.scikit-build.generate]] +path = "boost_histogram/version.py" +template = ''' +__version__ = version = '$version' +''' + + [tool.setuptools_scm] -write_to = "src/boost_histogram/version.py" [tool.pytest.ini_options] diff --git a/src/boost_histogram/__init__.py b/src/boost_histogram/__init__.py index 98d3882d..fe56f708 100644 --- a/src/boost_histogram/__init__.py +++ b/src/boost_histogram/__init__.py @@ -10,6 +10,7 @@ sum, underflow, ) +# pylint: disable-next=import-error from .version import version as __version__ try: diff --git a/src/boost_histogram/version.pyi b/src/boost_histogram/version.pyi index 91744f98..502a8eeb 100644 --- a/src/boost_histogram/version.pyi +++ b/src/boost_histogram/version.pyi @@ -1,4 +1,3 @@ from __future__ import annotations version: str -version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]