[PATCH] gnu: Add python-cocotb.

  • Open
  • quality assurance status badge
Details
2 participants
  • Cayetano Santos
  • Troy Figiel
Owner
unassigned
Submitted by
Cayetano Santos
Severity
normal
C
C
Cayetano Santos wrote on 30 Dec 2023 19:44
(address . guix-patches@gnu.org)(name . Cayetano Santos)(address . csantosb@inventati.org)
3fee261b22e793873c0624d5a4f79a1c7b85118f.1703961850.git.csantosb@inventati.org
* gnu/packages/fpga.scm (python-cocotb): New variable.

Signed-off-by: Cayetano Santos <csantosb@inventati.org>
---
gnu/packages/fpga.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 13ac1a0b57..74eff01a7a 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -422,6 +422,33 @@ (define-public python-myhdl
a hardware description and verification language.")
(license license:lgpl2.1+)))
+(define-public python-cocotb
+ (package
+ (name "python-cocotb")
+ (version "1.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cocotb/cocotb")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "07h8c3cjn4hhywvakcyk3chia102iszn6kjm53vl5f16rwy9xd07"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-find_libpython))
+ (arguments
+ `(#:tests? #f ; no test suite
+ ))
+ (home-page "https://github.com/cocotb/cocotb")
+ (synopsis
+ "Library for writing HDL testbenches in Python")
+ (description
+ "Coroutine based cosimulation testbench environment for
+verifying VHDL and Verilog RTL using Python.")
+ (license license:bsd-3)))
+
(define-public nvc
(package
(name "nvc")

base-commit: 7722da6fa5422c4fec69d6c8b9536c7d6fc3d326
--
2.41.0
T
T
Troy Figiel wrote on 31 Dec 2023 12:27
python-find-libpython
(address . 68153@debbugs.gnu.org)
87wmsuy5l7.fsf@troyfigiel.com
I would love to see cocotb included in Guix. Your patch does not build
for me though, because find-libpython is missing. I took the liberty to
add it. After replacing `python-find_libpython' by
`python-find-libpython' and including my patch, your patch does
successfully build for me.

That being said, it seems cocotb actually has a very extensive set of
tests. If possible, it would be nice if these can be included as well.

Best wishes,

Troy
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEE5HwNzSdo36E4/NzWxnyRgbOJP7AFAmWRUDQUHHRyb3lAdHJv
eWZpZ2llbC5jb20ACgkQxnyRgbOJP7DAHA//Y5USc/qC88ZuaPeYq4EcfbJfjBCc
LhLfZ/ysJ35lFfCv8Qkuavtc2AcHp+eiFGxIssWH0YVnI8F0ZKmCWJ+kiHG8zapj
eHW2qfZ7ucx+WWJW/5RQRds7b071ncmErIlSY06gNwv8zxWVEZjgU+JT0jrkYqM2
UPJ5OKrTHKH4i4xbSpp0gQEBNKOW0jvIxNdIuHcL5EnSzjN7gUpfOJifsHt+5aGu
yX+yWNeppws4eq9To53Ofg+lmE+MEOACBNm64uCKwI49M5j4FEEJp9jVcDhZoX+p
+6FjjsVfh4TovwypPWDxHIscr+XETYV4qbVQHicUm1+MT3naS5vmvSnT4OmUYTKI
+VN6NgRmfhUIpLpCmx/q3/s+DaxNTTTkqQlEfGGqFXVPUglcVViidSNRsEl7xKUv
BZtCuRuwLWTn+JQP+qeQKRkBG+tedX/gjafW87QMFk3elB7Delrj2xstbWEN/QqK
uDcGcNbo0JbY5+GZSx2xSAAAhLThFpy3jcQtjxrNBY5Y7yAGGi9HrxPJDmbpvLaJ
1NBuyQwDzueM7g4fIy8kAKfyqBMICIEKMVJfz00q326sG1JsEIWJvD42Ws8ChJrJ
FooTnb8JUMZDxymYE2GpImySK2LTi8NaARu2n/3a1/eKY1SohJfc6YQpSaKKaPhU
dBZ3PPzKgocRQeM=
=PcHb
-----END PGP SIGNATURE-----

T
T
Troy Figiel wrote on 31 Dec 2023 12:14
[PATCH] gnu: Add python-find-libpython.
(address . 68153@debbugs.gnu.org)
87v88ey5it.fsf@troyfigiel.com
* gnu/packages/python-xyz.scm (python-find-libpython): New variable.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2afce6c667..c4bbe14a7c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9159,6 +9159,30 @@ (define-public python-executor
particularly the AST node being executed.")
(license license:expat))) ; MIT license
+(define-public python-find-libpython
+ (package
+ (name "python-find-libpython")
+ (version "0.3.1")
+ (source
+ (origin
+ ;; Only available as a binary release on PyPI.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ktbarrett/find_libpython")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1d7y9srf5j8g34azf0j1jnnrn5al55cnzb4kkx2l1q8hys0l040c"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/ktbarrett/find_libpython")
+ (synopsis "Find the path to the @code{libpython} dynamic library")
+ (description "@code{find_libpython} helps find the path to the
+@code{libpython} dynamic library for the current Python environment. It is
+both a script and a Python package.")
+ (license license:expat))) ; MIT license
+
(define-public python-roifile
(package
(name "python-roifile")

base-commit: 2a242e86379ebddbdddf2927f26e5e27a98fc605
--
2.40.1
?