Skip to content

Commit a0b3c8c

Browse files
Switch robotpy-build from setuptools to hatchling (#243)
* Switch robotpy-build from setuptools to hatchling - robotpy-build projects still need setuptools * Apply suggestions from code review Co-authored-by: David Vo <[email protected]> --------- Co-authored-by: David Vo <[email protected]>
1 parent f9b4423 commit a0b3c8c

File tree

3 files changed

+72
-56
lines changed

3 files changed

+72
-56
lines changed

pyproject.toml

+72-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,79 @@
11
[build-system]
2-
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2,<8"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling>=1.26.2", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "robotpy-build"
7+
dynamic = ["version"]
8+
description = "Build tool for RobotPy projects"
9+
readme = "README.md"
10+
requires-python = ">=3.8"
11+
license = "BSD-3-Clause"
12+
license-files = ["LICENSE.txt", "robotpy_build/pybind11/LICENSE"]
13+
authors = [
14+
{name = "Dustin Spicuzza", email = "[email protected]"},
15+
]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Intended Audience :: Developers",
19+
"License :: OSI Approved :: BSD License",
20+
"Programming Language :: Python :: 3 :: Only",
21+
"Programming Language :: Python :: 3.8",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Topic :: Software Development",
26+
]
27+
dependencies = [
28+
"setuptools >= 45",
29+
"setuptools_scm >= 6.2, < 8",
30+
"sphinxify >= 0.7.3",
31+
"pydantic >= 1.7.0, < 2",
32+
"cxxheaderparser[pcpp] ~= 1.4.1",
33+
"tomli",
34+
"tomli_w",
35+
"toposort",
36+
"typing-extensions",
37+
"pyyaml >= 5.1",
38+
"patch == 1.*",
39+
"pybind11-stubgen ~= 2.5.1",
40+
"delocate; platform_system == 'Darwin'",
41+
"distro; platform_system == 'Linux'",
42+
]
43+
44+
[project.entry-points.robotpybuild]
45+
robotpy-build = "robotpy_build.pkgcfg"
46+
47+
[project.scripts]
48+
robotpy-build = "robotpy_build.tool:main"
49+
50+
[project.urls]
51+
"Source code" = "https://github.com/robotpy/robotpy-build"
52+
53+
[tool.hatch.version]
54+
source = "vcs"
55+
56+
[tool.hatch.build.hooks.vcs]
57+
version-file = "robotpy_build/version.py"
58+
59+
[tool.hatch.build.targets.sdist]
60+
packages = ["robotpy_build"]
61+
exclude = [
62+
"/robotpy_build/pybind11"
63+
]
64+
[tool.hatch.build.targets.sdist.force-include]
65+
"./robotpy_build/pybind11/include" = "./robotpy_build/pybind11/include"
66+
67+
[tool.hatch.build.targets.wheel]
68+
packages = ["robotpy_build"]
69+
include = [
70+
"/robotpy_build/pybind11/include",
71+
"/robotpy_build/include",
72+
]
473

5-
[tool.setuptools_scm]
6-
write_to = "robotpy_build/version.py"
774

875
[tool.black]
9-
target-version = ['py38']
76+
target-version = ["py38"]
1077
extend-exclude = '''
1178
^/robotpy_build/pybind11
1279
'''

setup.cfg

-46
This file was deleted.

setup.py

-5
This file was deleted.

0 commit comments

Comments
 (0)