amaranth/setup.py

66 lines
2 KiB
Python
Raw Normal View History

2018-12-11 13:50:56 -07:00
from setuptools import setup, find_packages
def scm_version():
def local_scheme(version):
2019-10-16 08:24:13 -06:00
if version.tag and not version.distance:
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
def doc_version():
try:
from setuptools_scm.git import parse as parse_git
except ImportError:
return ""
git = parse_git(".")
if not git:
return ""
elif git.exact:
return git.format_with("{tag}")
else:
return "latest"
2018-12-11 13:50:56 -07:00
setup(
2021-12-09 22:39:50 -07:00
name="amaranth",
use_scm_version=scm_version(),
2018-12-11 13:50:56 -07:00
author="whitequark",
author_email="whitequark@whitequark.org",
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",
python_requires="~=3.6",
setup_requires=["wheel", "setuptools", "setuptools_scm"],
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
"pyvcd~=0.2.2", # for amaranth.pysim
"Jinja2~=2.11", # for amaranth.build
],
extras_require={
2021-12-09 22:39:50 -07:00
# this version requirement needs to be synchronized with the one in amaranth.back.verilog!
"builtin-yosys": ["amaranth-yosys>=0.9.post3527.*"],
"remote-build": ["paramiko~=2.7"],
},
2021-12-09 22:39:50 -07:00
packages=find_packages(exclude=("tests", "tests.*")),
entry_points={
"console_scripts": [
2021-12-09 22:39:50 -07:00
"amaranth-rpc = amaranth.rpc:main",
"nmigen-rpc = nmigen.rpc:main",
]
},
project_urls={
2021-12-09 22:39:50 -07:00
"Documentation": "https://amaranth-lang.org/amaranth/{}".format(doc_version()),
"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
)