|
1 | 1 | # Project metadata
|
2 | 2 |
|
| 3 | + |
3 | 4 | [tool.pdm.version]
|
4 | 5 | source = "scm"
|
5 | 6 | version_format = "pdm_build:format_version"
|
6 | 7 |
|
| 8 | +[tool.pdm.build] |
| 9 | +# If amaranth 0.3 is checked out with git (e.g. as a part of a persistent editable install or |
| 10 | +# a git worktree cached by tools like poetry), it can have an empty `nmigen` directory left over, |
| 11 | +# which causes a hard error because setuptools cannot determine the top-level package. |
| 12 | +# Add a workaround to improve experience for people upgrading from old checkouts. |
| 13 | +includes = ["amaranth/"] |
| 14 | + |
| 15 | +source-includes = [ |
| 16 | + ".gitignore", |
| 17 | + ".coveragerc", |
| 18 | + ".env.toolchain", |
| 19 | + "CONTRIBUTING.txt", |
| 20 | +] |
| 21 | + |
| 22 | +# Development workflow configuration |
| 23 | + |
| 24 | +[tool.pdm.dev-dependencies] |
| 25 | +# This version requirement needs to be synchronized with the one in pyproject.toml above! |
| 26 | +docs = [ |
| 27 | + "sphinx~=7.1", |
| 28 | + "sphinxcontrib-platformpicker~=1.4", |
| 29 | + "sphinxcontrib-yowasp-wavedrom==1.8", # exact version to avoid changes in rendering |
| 30 | + "sphinx-rtd-theme~=2.0", |
| 31 | + "sphinx-autobuild", |
| 32 | +] |
| 33 | +examples = [ |
| 34 | + "amaranth-boards @ git+https://github.com/amaranth-lang/amaranth-boards.git" |
| 35 | +] |
| 36 | + |
| 37 | +[tool.pdm.scripts] |
| 38 | +_.env_file = ".env.toolchain" |
| 39 | + |
| 40 | +test.composite = ["test-code", "test-docs", "coverage-xml"] |
| 41 | +test-code.env = {PYTHONWARNINGS = "error"} |
| 42 | +test-code.cmd = "python -m coverage run -m unittest discover -t . -s tests -v" |
| 43 | +test-docs.cmd = "sphinx-build -b doctest docs/ docs/_build" |
| 44 | + |
| 45 | +document.cmd = "sphinx-build docs/ docs/_build/ -W --keep-going" |
| 46 | +document-live.cmd = "sphinx-autobuild docs/ docs/_build/ --watch amaranth" |
| 47 | +document-linkcheck.cmd = "sphinx-build docs/ docs/_linkcheck/ -b linkcheck" |
| 48 | + |
| 49 | +coverage-text.cmd = "python -m coverage report" |
| 50 | +coverage-html.cmd = "python -m coverage html" |
| 51 | +coverage-xml.cmd = "python -m coverage xml" |
| 52 | + |
| 53 | +extract-schemas.call = "amaranth.lib.meta:_extract_schemas('amaranth', base_uri='https://amaranth-lang.org/schema/amaranth')" |
7 | 54 | [project]
|
8 | 55 | dynamic = ["version"]
|
9 | 56 |
|
@@ -48,53 +95,10 @@ amaranth-rpc = "amaranth.rpc:main"
|
48 | 95 | requires = ["pdm-backend~=2.3.0"]
|
49 | 96 | build-backend = "pdm.backend"
|
50 | 97 |
|
51 |
| -[tool.pdm.build] |
52 |
| -# If amaranth 0.3 is checked out with git (e.g. as a part of a persistent editable install or |
53 |
| -# a git worktree cached by tools like poetry), it can have an empty `nmigen` directory left over, |
54 |
| -# which causes a hard error because setuptools cannot determine the top-level package. |
55 |
| -# Add a workaround to improve experience for people upgrading from old checkouts. |
56 |
| -includes = ["amaranth/"] |
57 | 98 |
|
58 |
| -source-includes = [ |
59 |
| - ".gitignore", |
60 |
| - ".coveragerc", |
61 |
| - ".env.toolchain", |
62 |
| - "CONTRIBUTING.txt", |
63 |
| -] |
64 |
| - |
65 |
| -# Development workflow configuration |
66 |
| - |
67 |
| -[tool.pdm.dev-dependencies] |
68 |
| -# This version requirement needs to be synchronized with the one in pyproject.toml above! |
| 99 | +[dependency-groups] |
69 | 100 | test = [
|
70 |
| - "yowasp-yosys>=0.40", |
71 |
| - "coverage", |
72 |
| -] |
73 |
| -docs = [ |
74 |
| - "sphinx~=7.1", |
75 |
| - "sphinxcontrib-platformpicker~=1.4", |
76 |
| - "sphinxcontrib-yowasp-wavedrom==1.8", # exact version to avoid changes in rendering |
77 |
| - "sphinx-rtd-theme~=2.0", |
78 |
| - "sphinx-autobuild", |
79 |
| -] |
80 |
| -examples = [ |
81 |
| - "amaranth-boards @ git+https://github.com/amaranth-lang/amaranth-boards.git" |
| 101 | + "yowasp-yosys>=0.40", |
| 102 | + "coverage", |
| 103 | + "pytest>=8.4.1", |
82 | 104 | ]
|
83 |
| - |
84 |
| -[tool.pdm.scripts] |
85 |
| -_.env_file = ".env.toolchain" |
86 |
| - |
87 |
| -test.composite = ["test-code", "test-docs", "coverage-xml"] |
88 |
| -test-code.env = {PYTHONWARNINGS = "error"} |
89 |
| -test-code.cmd = "python -m coverage run -m unittest discover -t . -s tests -v" |
90 |
| -test-docs.cmd = "sphinx-build -b doctest docs/ docs/_build" |
91 |
| - |
92 |
| -document.cmd = "sphinx-build docs/ docs/_build/ -W --keep-going" |
93 |
| -document-live.cmd = "sphinx-autobuild docs/ docs/_build/ --watch amaranth" |
94 |
| -document-linkcheck.cmd = "sphinx-build docs/ docs/_linkcheck/ -b linkcheck" |
95 |
| - |
96 |
| -coverage-text.cmd = "python -m coverage report" |
97 |
| -coverage-html.cmd = "python -m coverage html" |
98 |
| -coverage-xml.cmd = "python -m coverage xml" |
99 |
| - |
100 |
| -extract-schemas.call = "amaranth.lib.meta:_extract_schemas('amaranth', base_uri='https://amaranth-lang.org/schema/amaranth')" |
|
0 commit comments