From cd7cb898e119571214cc4d749827f9d8e09b0641 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sun, 28 Sep 2025 18:02:03 -0700 Subject: [PATCH] add: amaranth (#6547) (#6567) --- anda/langs/amaranth/amaranth.spec | 63 +++++++++++++++++++++++++++++++ anda/langs/amaranth/anda.hcl | 6 +++ anda/langs/amaranth/update.rhai | 1 + 3 files changed, 70 insertions(+) create mode 100644 anda/langs/amaranth/amaranth.spec create mode 100644 anda/langs/amaranth/anda.hcl create mode 100644 anda/langs/amaranth/update.rhai diff --git a/anda/langs/amaranth/amaranth.spec b/anda/langs/amaranth/amaranth.spec new file mode 100644 index 0000000000..415b914c4d --- /dev/null +++ b/anda/langs/amaranth/amaranth.spec @@ -0,0 +1,63 @@ +%global pypi_name amaranth +%global _desc Scots A modern hardware definition language and toolchain based on Python. + +%define _python_dist_allow_version_zero 1 + +Name: python-%{pypi_name} +Version: 0.5.7 +Release: 1%?dist +Summary: A modern hardware definition language and toolchain based on Python +License: BSD-2-Clause +URL: https://github.com/amaranth-lang/amaranth +Source0: %url/archive/refs/tags/v%version.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-installer +BuildRequires: python3-wheel +BuildRequires: python3-setuptools_scm +BuildRequires: python3-packaging +BuildRequires: python3-pip + +Requires: python3 +Requires: python3-jinja2 +Requires: python3-jschon +Requires: python3-pyvcd + +Packager: Owen Zimmerman + +%description +%_desc + +%package -n python3-%{pypi_name} +Summary: %{summary} +Provides: amaranth +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%_desc + +%prep +%autosetup -n amaranth-%version + +# Swap out pdm.backend to setuptools.build_meta +sed -i 's|pdm.backend|setuptools.build_meta|' pyproject.toml + +%build +export PDM_BUILD_SCM_VERSION=%{version} +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files amaranth + +%files -n python3-%{pypi_name} -f %{pyproject_files} +%doc README.md CONTRIBUTING.txt +%license LICENSE.txt +%{_bindir}/amaranth-rpc +%ghost %python3_sitelib/__pycache__/*.cpython-*.pyc +%ghost %python3_sitelib/%{name}/subcommands/__pycache__/*.cpython-*.pyc + +%changelog +* Sun Sep 28 2025 Owen Zimmerman +- Initial commit diff --git a/anda/langs/amaranth/anda.hcl b/anda/langs/amaranth/anda.hcl new file mode 100644 index 0000000000..701dd1930c --- /dev/null +++ b/anda/langs/amaranth/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "amaranth.spec" + } +} diff --git a/anda/langs/amaranth/update.rhai b/anda/langs/amaranth/update.rhai new file mode 100644 index 0000000000..7e8bd3f744 --- /dev/null +++ b/anda/langs/amaranth/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("amaranth-lang/amaranth"));