aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine <whitequark@whitequark.org>2023-02-03 05:30:22 +0000
committerCatherine <whitequark@whitequark.org>2023-02-03 05:30:40 +0000
commiteb24f42261f2614eca1446ce2ceabce94be38b00 (patch)
tree198b2f140400f4de218ff66f71d7eabcb1d20295
parent1c72b3800beb4da3dbe108b10adddfc69765efe8 (diff)
Migrate from setup.py to pyproject.toml.
-rw-r--r--.git_archival.txt4
-rw-r--r--.gitattributes1
-rw-r--r--LICENSE.txt2
-rw-r--r--pyproject.toml23
-rw-r--r--setup.py32
5 files changed, 31 insertions, 31 deletions
diff --git a/.git_archival.txt b/.git_archival.txt
new file mode 100644
index 0000000..8fb235d
--- /dev/null
+++ b/.git_archival.txt
@@ -0,0 +1,4 @@
+node: $Format:%H$
+node-date: $Format:%cI$
+describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
+ref-names: $Format:%D$
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..a94cb2f
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+.git_archival.txt export-subst
diff --git a/LICENSE.txt b/LICENSE.txt
index fadbcd7..cb52242 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (C) 2019-2021 Amaranth HDL contributors
+Copyright (C) 2019-2023 Amaranth HDL contributors
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..bc0ccb8
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,23 @@
+[build-system]
+requires = ["wheel", "setuptools~=67.0", "setuptools_scm[toml]>=6.2"]
+build-backend = "setuptools.build_meta"
+
+[project]
+dynamic = ["version"]
+
+name = "amaranth-boards"
+description = "Board and connector definitions for Amaranth HDL"
+authors = [{name = "Amaranth HDL contributors"}]
+license = {file = "LICENSE.txt"}
+
+dependencies = [
+ "importlib_metadata; python_version<'3.8'",
+ "amaranth>=0.2,<0.5",
+]
+
+[project.urls]
+"Source Code" = "https://github.com/amaranth-lang/amaranth-boards"
+"Bug Tracker" = "https://github.com/amaranth-lang/amaranth-boards/issues"
+
+[tool.setuptools_scm]
+local_scheme = "node-and-timestamp"
diff --git a/setup.py b/setup.py
index 724e5c4..b024da8 100644
--- a/setup.py
+++ b/setup.py
@@ -1,32 +1,4 @@
-from setuptools import setup, find_packages
+from setuptools import setup
-def scm_version():
- def local_scheme(version):
- return version.format_choice("+{node}", "+{node}.dirty")
- return {
- "relative_to": __file__,
- "version_scheme": "guess-next-dev",
- "local_scheme": local_scheme,
- }
-
-
-setup(
- name="amaranth-boards",
- use_scm_version=scm_version(),
- author="whitequark",
- author_email="whitequark@whitequark.org",
- description="Board and connector definitions for Amaranth HDL",
- #long_description="""TODO""",
- license="BSD",
- setup_requires=["wheel", "setuptools", "setuptools_scm"],
- install_requires=[
- "amaranth>=0.2,<0.5",
- "importlib_metadata; python_version<'3.8'",
- ],
- packages=find_packages(),
- project_urls={
- "Source Code": "https://github.com/amaranth-lang/amaranth-boards",
- "Bug Tracker": "https://github.com/amaranth-lang/amaranth-boards/issues",
- },
-)
+setup()