Skip to content

Commit a4ebc73

Browse files
committed
Migrate setup.cfg to pyproject.toml for newer setuptools compat.
The setuptools>=69 dependency includes a fix to automatically include the py.typed marker in the distribution, thus making type hints usage much easier. The newer version however fails to build when the basic project metadata is missing in pyproject.toml. Thus the settings from setup.cfg are migrated entirely, upgrading to setuptools_scm >= 8 in the process.
1 parent 9bd503e commit a4ebc73

File tree

2 files changed

+36
-31
lines changed

2 files changed

+36
-31
lines changed

pyproject.toml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
[build-system]
2-
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
2+
requires = ["setuptools>=69", "wheel", "setuptools_scm>=8"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "canopen"
7+
authors = [
8+
{name = "Christian Sandberg", email = "[email protected]"},
9+
]
10+
description = "CANopen stack implementation"
11+
readme = "README.rst"
12+
requires-python = ">=3.6"
13+
license = {file = "LICENSE.txt"}
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"License :: OSI Approved :: MIT License",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3 :: Only",
19+
"Intended Audience :: Developers",
20+
"Topic :: Scientific/Engineering",
21+
]
22+
dependencies = [
23+
"python-can >= 3.0.0",
24+
]
25+
dynamic = ["version"]
26+
27+
[project.urls]
28+
documentation = "https://canopen.readthedocs.io/en/stable/"
29+
repository = "https://github.com/christiansandberg/canopen"
30+
531
[tool.setuptools_scm]
6-
write_to = "canopen/_version.py"
32+
version_file = "canopen/_version.py"
33+
34+
[tool.pytest.ini_options]
35+
testpaths = [
36+
"test",
37+
]
38+
filterwarnings = [
39+
"ignore::DeprecationWarning",
40+
]

setup.cfg

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)