pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/cad/py-PyRTL



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Thu May 19 15:59:04 UTC 2022

Modified Files:
        pkgsrc/cad/py-PyRTL: Makefile distinfo
Added Files:
        pkgsrc/cad/py-PyRTL/patches: patch-pyrtl_visualization.py

Log Message:
py-PyRTL: Support graphics/py-graphviz-0.19 or later too


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/cad/py-PyRTL/Makefile \
    pkgsrc/cad/py-PyRTL/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_visualization.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/cad/py-PyRTL/Makefile
diff -u pkgsrc/cad/py-PyRTL/Makefile:1.5 pkgsrc/cad/py-PyRTL/Makefile:1.6
--- pkgsrc/cad/py-PyRTL/Makefile:1.5    Tue Jan  4 20:52:35 2022
+++ pkgsrc/cad/py-PyRTL/Makefile        Thu May 19 15:59:04 2022
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2022/01/04 20:52:35 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2022/05/19 15:59:04 ryoon Exp $
 
 DISTNAME=      pyrtl-${PKGVERSION_NOREV}
 PKGNAME=       ${PYPKGPREFIX}-PyRTL-0.10.1
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    cad python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pyrtl/}
 
Index: pkgsrc/cad/py-PyRTL/distinfo
diff -u pkgsrc/cad/py-PyRTL/distinfo:1.5 pkgsrc/cad/py-PyRTL/distinfo:1.6
--- pkgsrc/cad/py-PyRTL/distinfo:1.5    Sun Nov 21 15:10:08 2021
+++ pkgsrc/cad/py-PyRTL/distinfo        Thu May 19 15:59:04 2022
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.5 2021/11/21 15:10:08 ryoon Exp $
+$NetBSD: distinfo,v 1.6 2022/05/19 15:59:04 ryoon Exp $
 
 BLAKE2s (pyrtl-0.10.1.tar.gz) = 9cfd2f3c21ddb36d47607efe9d371201cb2405eab9ad0c83c14c6187337caf1c
 SHA512 (pyrtl-0.10.1.tar.gz) = 84a9c8da6e793d7740a38753ff8ae96b16e734e6024ce2df8b15df6e469ccedbd2a4f9019882d985c8842c73a4d7d4d2637d8ca071cfd9429ed27f3f07471b7f
 Size (pyrtl-0.10.1.tar.gz) = 199543 bytes
+SHA1 (patch-pyrtl_visualization.py) = 2b7bdb0171fa13e8c9d0317b782c6d0a5fc80b66

Added files:

Index: pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_visualization.py
diff -u /dev/null pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_visualization.py:1.1
--- /dev/null   Thu May 19 15:59:04 2022
+++ pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_visualization.py    Thu May 19 15:59:04 2022
@@ -0,0 +1,25 @@
+$NetBSD: patch-pyrtl_visualization.py,v 1.1 2022/05/19 15:59:04 ryoon Exp $
+
+* Support SVG output with py-graphviz 0.19 or later too.
+
+--- pyrtl/visualization.py.orig        2021-09-02 19:11:31.000000000 +0000
++++ pyrtl/visualization.py
+@@ -453,8 +453,16 @@ def block_to_svg(block=None, split_state
+     """
+     try:
+         from graphviz import Source
+-        return Source(block_to_graphviz_string(block, split_state=split_state,
+-                                               maintain_arg_order=maintain_arg_order))._repr_svg_()
++        src = Source(block_to_graphviz_string(block, split_state=split_state,
++                                              maintain_arg_order=maintain_arg_order))
++        try:
++            svg = src._repr_image_svg_xml()
++        except AttributeError:
++            # py-graphviz 0.18.3 or earlier
++            return src._repr_svg_()
++        else:
++            # py-graphviz 0.19 or later
++            return svg
+     except ImportError:
+         raise PyrtlError('need graphviz installed (try "pip install graphviz")')
+ 



Home | Main Index | Thread Index | Old Index