2018-12-11 13:50:56 -07:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
|
|
|
2019-09-05 23:11:41 -06:00
|
|
|
def scm_version():
|
|
|
|
def local_scheme(version):
|
2019-10-16 08:24:13 -06:00
|
|
|
if version.tag and not version.distance:
|
2019-10-14 22:04:18 -06:00
|
|
|
return version.format_with("")
|
|
|
|
else:
|
|
|
|
return version.format_choice("+{node}", "+{node}.dirty")
|
2019-09-20 07:48:08 -06:00
|
|
|
return {
|
|
|
|
"relative_to": __file__,
|
|
|
|
"version_scheme": "guess-next-dev",
|
|
|
|
"local_scheme": local_scheme
|
|
|
|
}
|
2018-12-13 00:47:07 -07:00
|
|
|
|
|
|
|
|
2020-07-01 14:49:41 -06:00
|
|
|
def doc_version():
|
2020-07-01 15:04:04 -06:00
|
|
|
try:
|
|
|
|
from setuptools_scm.git import parse as parse_git
|
|
|
|
except ImportError:
|
|
|
|
return ""
|
|
|
|
|
2020-07-01 14:49:41 -06:00
|
|
|
git = parse_git(".")
|
2020-10-26 19:16:25 -06:00
|
|
|
if not git:
|
|
|
|
return ""
|
|
|
|
elif git.exact:
|
2021-12-16 11:02:11 -07:00
|
|
|
return git.format_with("v{tag}")
|
2020-07-01 14:49:41 -06:00
|
|
|
else:
|
|
|
|
return "latest"
|
|
|
|
|
|
|
|
|
2018-12-11 13:50:56 -07:00
|
|
|
setup(
|
2021-12-09 22:39:50 -07:00
|
|
|
name="amaranth",
|
2019-09-05 23:11:41 -06:00
|
|
|
use_scm_version=scm_version(),
|
2023-01-31 14:51:43 -07:00
|
|
|
author="Amaranth HDL contributors",
|
2021-12-09 22:39:50 -07:00
|
|
|
description="Amaranth hardware definition language",
|
2018-12-11 13:50:56 -07:00
|
|
|
#long_description="""TODO""",
|
|
|
|
license="BSD",
|
2022-04-04 03:39:28 -06:00
|
|
|
python_requires="~=3.7",
|
2019-11-22 01:32:41 -07:00
|
|
|
install_requires=[
|
2021-12-09 22:39:50 -07:00
|
|
|
"importlib_metadata; python_version<'3.8'", # for __version__ and amaranth._toolchain.yosys
|
|
|
|
"importlib_resources; python_version<'3.9'", # for amaranth._toolchain.yosys
|
2022-04-04 03:21:11 -06:00
|
|
|
"pyvcd>=0.2.2,<0.4", # for amaranth.pysim
|
2022-03-30 14:49:26 -06:00
|
|
|
"Jinja2~=3.0", # for amaranth.build
|
2019-11-22 01:32:41 -07:00
|
|
|
],
|
2020-05-29 11:45:09 -06:00
|
|
|
extras_require={
|
2021-12-09 22:39:50 -07:00
|
|
|
# this version requirement needs to be synchronized with the one in amaranth.back.verilog!
|
2021-12-11 01:52:14 -07:00
|
|
|
"builtin-yosys": ["amaranth-yosys>=0.10.*"],
|
2020-08-26 16:49:49 -06:00
|
|
|
"remote-build": ["paramiko~=2.7"],
|
2020-05-22 10:50:45 -06:00
|
|
|
},
|
2021-12-09 22:39:50 -07:00
|
|
|
packages=find_packages(exclude=("tests", "tests.*")),
|
2019-09-26 20:35:45 -06:00
|
|
|
entry_points={
|
|
|
|
"console_scripts": [
|
2021-12-09 22:39:50 -07:00
|
|
|
"amaranth-rpc = amaranth.rpc:main",
|
2019-09-26 20:35:45 -06:00
|
|
|
]
|
|
|
|
},
|
2018-12-13 11:00:05 -07:00
|
|
|
project_urls={
|
2021-12-16 10:44:02 -07:00
|
|
|
"Documentation": "https://amaranth-lang.org/docs/amaranth/{}".format(doc_version()),
|
2021-12-09 22:39:50 -07:00
|
|
|
"Source Code": "https://github.com/amaranth-lang/amaranth",
|
|
|
|
"Bug Tracker": "https://github.com/amaranth-lang/amaranth/issues",
|
2019-05-26 05:20:13 -06:00
|
|
|
},
|
2018-12-11 13:50:56 -07:00
|
|
|
)
|