-
Notifications
You must be signed in to change notification settings - Fork 175
/
pyproject.toml
98 lines (79 loc) · 3.04 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Project metadata
[tool.pdm.version]
source = "scm"
version_format = "pdm_build:format_version"
[project]
dynamic = ["version"]
name = "amaranth"
description = "Amaranth hardware definition language"
readme = "README.md"
authors = [{name = "Amaranth HDL contributors"}]
license = { text = "BSD-2-clause" }
requires-python = "~=3.9"
dependencies = [
"jschon~=0.11.1", # for amaranth.lib.meta
"pyvcd>=0.2.2,<0.5", # for amaranth.sim.pysim
"Jinja2~=3.0", # for amaranth.build
]
[project.optional-dependencies]
# This version requirement needs to be synchronized with:
# - pyproject.toml: tool.pdm.dev-dependencies.test
# - amaranth/back/verilog.py: _convert_rtlil_text
# - docs/install.rst: yosys-version
builtin-yosys = ["amaranth-yosys>=0.40"]
remote-build = ["paramiko~=2.7"]
[project.scripts]
amaranth-rpc = "amaranth.rpc:main"
[project.entry-points."amaranth.lib.meta"]
"0.5/component.json" = "amaranth.lib.wiring:ComponentMetadata"
[project.urls]
"Homepage" = "https://amaranth-lang.org/"
"Documentation" = "https://amaranth-lang.org/docs/amaranth/" # modified in pdm_build.py
"Source Code" = "https://github.com/amaranth-lang/amaranth"
"Bug Tracker" = "https://github.com/amaranth-lang/amaranth/issues"
# Build system configuration
[build-system]
requires = ["pdm-backend~=2.3.0"]
build-backend = "pdm.backend"
[tool.pdm.build]
# If amaranth 0.3 is checked out with git (e.g. as a part of a persistent editable install or
# a git worktree cached by tools like poetry), it can have an empty `nmigen` directory left over,
# which causes a hard error because setuptools cannot determine the top-level package.
# Add a workaround to improve experience for people upgrading from old checkouts.
includes = ["amaranth/"]
source-includes = [
".gitignore",
".coveragerc",
".env.toolchain",
"CONTRIBUTING.txt",
]
# Development workflow configuration
[tool.pdm.dev-dependencies]
# This version requirement needs to be synchronized with the one in pyproject.toml above!
test = [
"yowasp-yosys>=0.40",
"coverage",
]
docs = [
"sphinx~=7.1",
"sphinxcontrib-platformpicker~=1.4",
"sphinxcontrib-yowasp-wavedrom==1.8", # exact version to avoid changes in rendering
"sphinx-rtd-theme~=2.0",
"sphinx-autobuild",
]
examples = [
"amaranth-boards @ git+https://github.com/amaranth-lang/amaranth-boards.git"
]
[tool.pdm.scripts]
_.env_file = ".env.toolchain"
test.composite = ["test-code", "test-docs", "coverage-xml"]
test-code.env = {PYTHONWARNINGS = "error"}
test-code.cmd = "python -m coverage run -m unittest discover -t . -s tests -v"
test-docs.cmd = "sphinx-build -b doctest docs/ docs/_build"
document.cmd = "sphinx-build docs/ docs/_build/ -W --keep-going"
document-live.cmd = "sphinx-autobuild docs/ docs/_build/ --watch amaranth"
document-linkcheck.cmd = "sphinx-build docs/ docs/_linkcheck/ -b linkcheck"
coverage-text.cmd = "python -m coverage report"
coverage-html.cmd = "python -m coverage html"
coverage-xml.cmd = "python -m coverage xml"
extract-schemas.call = "amaranth.lib.meta:_extract_schemas('amaranth', base_uri='https://amaranth-lang.org/schema/amaranth')"