diff --git a/pyproject.toml b/pyproject.toml index bfe3680..e04ec4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,79 @@ [build-system] -requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2,<8"] -build-backend = "setuptools.build_meta" +requires = ["hatchling>=1.26.2", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "robotpy-build" +dynamic = ["version"] +description = "Build tool for RobotPy projects" +readme = "README.md" +requires-python = ">=3.8" +license = "BSD-3-Clause" +license-files = ["LICENSE.txt", "robotpy_build/pybind11/LICENSE"] +authors = [ + {name = "Dustin Spicuzza", email = "robotpy@googlegroups.com"}, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Software Development", +] +dependencies = [ + "setuptools >= 45", + "setuptools_scm >= 6.2, < 8", + "sphinxify >= 0.7.3", + "pydantic >= 1.7.0, < 2", + "cxxheaderparser[pcpp] ~= 1.4.1", + "tomli", + "tomli_w", + "toposort", + "typing-extensions", + "pyyaml >= 5.1", + "patch == 1.*", + "pybind11-stubgen ~= 2.5.1", + "delocate; platform_system == 'Darwin'", + "distro; platform_system == 'Linux'", +] + +[project.entry-points.robotpybuild] +robotpy-build = "robotpy_build.pkgcfg" + +[project.scripts] +robotpy-build = "robotpy_build.tool:main" + +[project.urls] +"Source code" = "https://github.com/robotpy/robotpy-build" + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "robotpy_build/version.py" + +[tool.hatch.build.targets.sdist] +packages = ["robotpy_build"] +exclude = [ + "/robotpy_build/pybind11" +] +[tool.hatch.build.targets.sdist.force-include] +"./robotpy_build/pybind11/include" = "./robotpy_build/pybind11/include" + +[tool.hatch.build.targets.wheel] +packages = ["robotpy_build"] +include = [ + "/robotpy_build/pybind11/include", + "/robotpy_build/include", +] -[tool.setuptools_scm] -write_to = "robotpy_build/version.py" [tool.black] -target-version = ['py38'] +target-version = ["py38"] extend-exclude = ''' ^/robotpy_build/pybind11 ''' diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 4e3f739..0000000 --- a/setup.cfg +++ /dev/null @@ -1,46 +0,0 @@ -[metadata] -name = robotpy-build -description = Build tool for RobotPy projects -long_description = file: README.md -long_description_content_type = text/markdown -author = Dustin Spicuzza -author_email = robotpy@googlegroups.com -url = https://github.com/robotpy/robotpy-build -license = BSD-3-Clause -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Topic :: Software Development - -[options] -zip_safe = False -include_package_data = True -packages = find: -install_requires = - setuptools >= 45 - setuptools_scm >= 6.2, < 8 - sphinxify >= 0.7.3 - pydantic >= 1.7.0, < 2 - cxxheaderparser[pcpp] ~= 1.4.1 - tomli - tomli_w - toposort - typing-extensions - pyyaml >= 5.1 - patch == 1.* - pybind11-stubgen ~= 2.5.1 - delocate; platform_system == 'Darwin' - distro; platform_system == 'Linux' -python_requires = >=3.8 - -[options.entry_points] -console_scripts = - robotpy-build = robotpy_build.tool:main -robotpybuild = - robotpy-build = robotpy_build.pkgcfg diff --git a/setup.py b/setup.py deleted file mode 100644 index 44b3ba8..0000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup - -setup(use_scm_version=True)