Skip to content

Commit eb24f42

Browse files
committed
Migrate from setup.py to pyproject.toml.
1 parent 1c72b38 commit eb24f42

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

.git_archival.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4+
ref-names: $Format:%D$

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2019-2021 Amaranth HDL contributors
1+
Copyright (C) 2019-2023 Amaranth HDL contributors
22

33
Redistribution and use in source and binary forms, with or without modification,
44
are permitted provided that the following conditions are met:

pyproject.toml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[build-system]
2+
requires = ["wheel", "setuptools~=67.0", "setuptools_scm[toml]>=6.2"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
dynamic = ["version"]
7+
8+
name = "amaranth-boards"
9+
description = "Board and connector definitions for Amaranth HDL"
10+
authors = [{name = "Amaranth HDL contributors"}]
11+
license = {file = "LICENSE.txt"}
12+
13+
dependencies = [
14+
"importlib_metadata; python_version<'3.8'",
15+
"amaranth>=0.2,<0.5",
16+
]
17+
18+
[project.urls]
19+
"Source Code" = "https://github.com/amaranth-lang/amaranth-boards"
20+
"Bug Tracker" = "https://github.com/amaranth-lang/amaranth-boards/issues"
21+
22+
[tool.setuptools_scm]
23+
local_scheme = "node-and-timestamp"

setup.py

+2-30
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,4 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import setup
22

33

4-
def scm_version():
5-
def local_scheme(version):
6-
return version.format_choice("+{node}", "+{node}.dirty")
7-
return {
8-
"relative_to": __file__,
9-
"version_scheme": "guess-next-dev",
10-
"local_scheme": local_scheme,
11-
}
12-
13-
14-
setup(
15-
name="amaranth-boards",
16-
use_scm_version=scm_version(),
17-
author="whitequark",
18-
author_email="[email protected]",
19-
description="Board and connector definitions for Amaranth HDL",
20-
#long_description="""TODO""",
21-
license="BSD",
22-
setup_requires=["wheel", "setuptools", "setuptools_scm"],
23-
install_requires=[
24-
"amaranth>=0.2,<0.5",
25-
"importlib_metadata; python_version<'3.8'",
26-
],
27-
packages=find_packages(),
28-
project_urls={
29-
"Source Code": "https://github.com/amaranth-lang/amaranth-boards",
30-
"Bug Tracker": "https://github.com/amaranth-lang/amaranth-boards/issues",
31-
},
32-
)
4+
setup()

0 commit comments

Comments
 (0)