Package Details: python-amaranth 0.5.4-2

Git Clone URL: https://aur.archlinux.org/python-amaranth.git (read-only, click to copy)
Package Base: python-amaranth
Description: A modern hardware definition language and toolchain based on Python (formerly nMigen)
Upstream URL: https://github.com/amaranth-lang/amaranth
Licenses: BSD
Conflicts: python-amaranth-git, python-nmigen, python-nmigen-git
Provides: python-amaranth, python-nmigen
Replaces: python-nmigen
Submitter: salfter
Maintainer: salfter
Last Packager: salfter
Votes: 0
Popularity: 0.000000
First Submitted: 2024-06-03 20:44 (UTC)
Last Updated: 2025-01-09 21:29 (UTC)

Latest Comments

n00k commented on 2025-01-05 16:53 (UTC)

As stated by the last comment, here is a version based on the released package (0.5.4) on PyPi:

diff --git a/PKGBUILD b/PKGBUILD
index a33c551..75ea053 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,8 @@
 # Contributor: xiretza <xiretza+aur@xiretza.xyz>

 _pkgname=amaranth
-_git_commit=a0750b89c6060d9f809159a012a26cff4e22e69d
 pkgname="python-$_pkgname"
-pkgver=0.5.0.r0.ga0750b8
+pkgver=0.5.4
 pkgrel=1
 pkgdesc="A modern hardware definition language and toolchain based on Python (formerly nMigen)"
 arch=(any)
@@ -14,44 +13,32 @@ depends=('python' 'python-jinja' 'python-pyvcd')
 makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools-scm' 'python-jschon' 'python-packaging' 'python-pdm-backend')
 optdepends=('python-paramiko: for remote builds')
 # FIXME: symbiyosys
-checkdepends=('python-pytest' 'yosys>0.16' 'symbiyosys-git' 'yices')
+checkdepends=('python-pytest' 'yosys>0.40' 'symbiyosys-git' 'yices')
 provides=("python-nmigen=$pkgver" "python-$_pkgname=$pkgver")
 conflicts=('python-nmigen' "python-nmigen-git" "python-$_pkgname-git")
 replaces=('python-nmigen')
 source=(
-   "git+$url.git" 
+   "${pkgname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
    )
-sha256sums=(
-   'SKIP' 
+sha512sums=(
+   '4958d1fbe2ff985105b3e5e0bf24ade1c7b3fe705624ffad019b91e27782fc0a76d3c2d5a323bf5d9eae6e1c2177c50575ff9d6a71b3199dfde0f012d256049b'
    )

-pkgver() {
-   cd "$_pkgname"
-
-   git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
-}
-
 prepare()
 {
-   cd "$_pkgname"
-   git checkout $_git_commit
+   cd "${_pkgname}-${pkgver}"
    sed -i -e "s/pdm\\.backend\\._vendor\\.//" pdm_build.py
+   sed -i -e 's/"pdm-backend~=2.3.0",//' pyproject.toml
 }

 build() {
-   cd "$_pkgname"
+   cd "${_pkgname}-${pkgver}"

    python -m build --wheel --no-isolation
 }

-check() {
-   cd "$_pkgname"
-
-   PYTHONPATH=. pytest
-}
-
 package() {
-   cd "$_pkgname"
+   cd "${_pkgname}-${pkgver}"

    python -m installer --destdir="$pkgdir" dist/*.whl

Popolon commented on 2024-12-28 23:12 (UTC)

Please base your code on released version, as the name of this package doesn't contains '-git'. Current release is 0.5.4

https://github.com/amaranth-lang/amaranth/releases/tag/v0.5.4

Popolon commented on 2024-12-21 14:49 (UTC) (edited on 2024-12-21 14:52 (UTC) by Popolon)

Please add the python-pdm-backend dependency, as needed at least for build.

ERROR Missing dependencies:
    pdm-backend~=2.3.0

Looks like it doesn't work with pdm-backend = 2.4.3

salfter commented on 2024-06-11 17:08 (UTC)

Fixes applied...thanks! I've also applied the same patchfile removal to my Gentoo ebuild.

Auerhuhn commented on 2024-06-09 18:59 (UTC)

Oh, and in case you’d like to simplify your PDM patch, I’ve managed to do without your patch by just removing the pdm.backend._vendor. part from the import:

sed -i -e "s/pdm\\.backend\\._vendor\\.//" pdm_build.py

Auerhuhn commented on 2024-06-09 18:37 (UTC)

Hi @salfter,

Thanks for the upload – I’ve been waiting for this package!

Without your pinned version, I wouldn’t have been able to get python-cynthion to work, which is incompatible with the changes in amaranth v0.5.

Btw, the package fails to build in a clean chroot; would you mind adding python-packaging and python-pdm-backend to your makedepends?

Thanks again for the upload and kind regards,
Claudia (aka Auerhuhn)