From 39a8d90d36642cfc1af90a947c4593b0acd3a900 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Wed, 10 Dec 2025 21:46:09 -0500 Subject: [PATCH 1/2] Update for 2026, migrate to hatchling --- .github/workflows/dist.yml | 2 +- pyproject.toml | 47 ++++++++++++++++++++++++++++++++++++++ setup.cfg | 33 -------------------------- setup.py | 5 ---- 4 files changed, 48 insertions(+), 39 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 6b7d13b..9b98b30 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -11,7 +11,7 @@ on: jobs: ci: - uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2025 + uses: robotpy/build-actions/.github/workflows/package-pure.yml@v2026 secrets: META_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} PYPI_API_TOKEN: ${{ secrets.PYPI_PASSWORD }} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ac0bc54 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "robotpy-wpilib-utilities" +dynamic = ["version"] +description = "Useful utility functions/objects for RobotPy" +readme = "README.rst" +requires-python = ">=3.10" +license = {file = "LICENSE"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development", + "Topic :: Scientific/Engineering" +] +dependencies = [ + "wpilib>=2026.1.1b1,<2027", +] + +[[project.authors]] +name = "RobotPy Development Team" +email = "robotpy@googlegroups.com" + +[project.urls] +"Source code" = "https://github.com/robotpy/robotpy-wpilib-utilities" + +[tool.hatch.build.targets.sdist] +exclude = [ + ".github", + ".readthedocs.yml", + "docs", + "devtools", + "tests", +] + +[tool.hatch.build.targets.wheel] +packages = ["magicbot", "robotpy_ext"] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.targets.sdist.hooks.vcs] +version-file = "robotpy_ext/version.py" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5a8eec9..0000000 --- a/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = robotpy-wpilib-utilities -description = Useful utility functions/objects for RobotPy -long_description = file: README.rst -long_description_content_type = text/x-rst -author = RobotPy Development Team -author_email = robotpy@googlegroups.com -url = https://github.com/robotpy/robotpy-wpilib-utilities -license = BSD-3-Clause -# Include the license file in wheels. -license_file = LICENSE - -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python :: 3 :: Only - Topic :: Software Development - Topic :: Scientific/Engineering - -[options] -zip_safe = False -include_package_data = True -packages = find: -install_requires = - wpilib>=2025.1.1,<2026 -setup_requires = - setuptools_scm > 6 -python_requires = >=3.9 - -[options.package_data] -magicbot = py.typed, magic_reset.pyi diff --git a/setup.py b/setup.py deleted file mode 100644 index b0fc364..0000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup - -setup(use_scm_version={"write_to": "robotpy_ext/version.py"}) From a321bd888dba04bc467c3e960061b77015c4ff92 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Wed, 10 Dec 2025 21:56:04 -0500 Subject: [PATCH 2/2] pin sphinx-autodoc-typehints --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index b93ba13..19af5f9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ # This file is intended for use on readthedocs -sphinx-autodoc-typehints +sphinx-autodoc-typehints<3.6 sphinx-rtd-theme robotpy-sphinx-plugin -e .