unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#29144] [PATCH 1/3] gnu: Add pydot.
@ 2017-11-04 19:36 Gábor Boskovits
  2017-11-05 16:27 ` Marius Bakke
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Gábor Boskovits @ 2017-11-04 19:36 UTC (permalink / raw)
  To: 29144; +Cc: Gábor Boskovits

    * gnu/packages/python.scm (python-pydot): New variable.
---
 gnu/packages/python.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e8a733919..c16122438 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
+;;; Copyright @ 2017 Gábor Boskovits <boskovits@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -16871,3 +16872,26 @@ executed more than a given number of times during a given period.")
 
 (define-public python2-ratelimiter
   (package-with-python2 python-ratelimiter))
+
+(define-public python-pydot
+  (package
+    (name "python-pydot")
+    (version "1.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pydot" version))
+       (sha256
+        (base32
+         "00imlz0033dygb9gdag1xr0cybn33gk5jsdi9ffbszzr97rd7dgd"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-pyparsing",python-pyparsing)
+       ("python-chardet",python-chardet)))
+    (home-page "https://github.com/erocarrera/pydot")
+    (synopsis "Python interface to Graphviz's Dot language")
+    (description
+     "An interface to Graphviz that can parse and dump
+into the DOT language used by GraphViz, is written in pure Python,
+and networkx can convert its graphs to pydot.")
+    (license license:expat)))
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#29144] [PATCH 1/3] gnu: Add pydot.
  2017-11-04 19:36 [bug#29144] [PATCH 1/3] gnu: Add pydot Gábor Boskovits
@ 2017-11-05 16:27 ` Marius Bakke
  2017-11-06  8:30 ` [bug#29144] [PATCH] gnu: add pydot Gábor Boskovits
  2017-11-06  8:32 ` [bug#29144] Updated patch Gábor Boskovits
  2 siblings, 0 replies; 5+ messages in thread
From: Marius Bakke @ 2017-11-05 16:27 UTC (permalink / raw)
  To: Gábor Boskovits, 29144

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

Gábor Boskovits <boskovits@gmail.com> writes:

>     * gnu/packages/python.scm (python-pydot): New variable.

Thanks!  I think we can add this package to graphviz.scm instead, since
python.scm is very generic (and huge!).  A few comments..

> +(define-public python-pydot
> +  (package
> +    (name "python-pydot")
> +    (version "1.2.3")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "pydot" version))
> +       (sha256
> +        (base32
> +         "00imlz0033dygb9gdag1xr0cybn33gk5jsdi9ffbszzr97rd7dgd"))))
> +    (build-system python-build-system)
> +    (inputs
> +     `(("python-pyparsing",python-pyparsing)
> +       ("python-chardet",python-chardet)))

According to setup.py, chardet is only needed for tests, so it should be
a "native-input.  Pyparsing OTOH should be a propagated-input since it
is required at runtime.

I haven't tried building it since it does not apply on current 'master'
after 2e15906c1c1337945b6578c7f58a4fd4af52aaf3.  Can you send an updated
patch please, for 'graphviz.scm'?  Please also try to get the unit tests
running if they are not already, see the '.travis.yml' file for how
upstream does it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#29144] [PATCH] gnu: add pydot.
  2017-11-04 19:36 [bug#29144] [PATCH 1/3] gnu: Add pydot Gábor Boskovits
  2017-11-05 16:27 ` Marius Bakke
@ 2017-11-06  8:30 ` Gábor Boskovits
  2017-11-06  8:32 ` [bug#29144] Updated patch Gábor Boskovits
  2 siblings, 0 replies; 5+ messages in thread
From: Gábor Boskovits @ 2017-11-06  8:30 UTC (permalink / raw)
  To: 29144; +Cc: Gábor Boskovits

* gnu/packages/graphviz.scm(python-pydot): New variable.
---
 gnu/packages/graphviz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index c71fb74cf..dbc501733 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +42,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages python)
   #:use-module ((guix licenses) #:prefix license:))
 
 (define-public graphviz
@@ -211,3 +213,27 @@ visualization tool suite.")
 an intermediate format,and @code{gtk} and @code{cairo} for rendering.  Xdot can
 be used either as a standalone application, or as a python library.")
     (license license:lgpl3+)))
+
+(define-public python-pydot
+  (package
+    (name "python-pydot")
+    (version "1.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pydot" version))
+       (sha256
+        (base32
+         "00imlz0033dygb9gdag1xr0cybn33gk5jsdi9ffbszzr97rd7dgd"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-pyparsing",python-pyparsing)))
+    (native-inputs
+     `(("python-chardet",python-chardet)))
+    (home-page "https://github.com/erocarrera/pydot")
+    (synopsis "Python interface to Graphviz's Dot language")
+    (description
+     "An interface to Graphviz that can parse and dump
++into the DOT language used by GraphViz, is written in pure Python,
++and networkx can convert its graphs to pydot.")
+    (license license:expat)))
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#29144] Updated patch
  2017-11-04 19:36 [bug#29144] [PATCH 1/3] gnu: Add pydot Gábor Boskovits
  2017-11-05 16:27 ` Marius Bakke
  2017-11-06  8:30 ` [bug#29144] [PATCH] gnu: add pydot Gábor Boskovits
@ 2017-11-06  8:32 ` Gábor Boskovits
  2017-11-07 20:07   ` bug#29144: " Marius Bakke
  2 siblings, 1 reply; 5+ messages in thread
From: Gábor Boskovits @ 2017-11-06  8:32 UTC (permalink / raw)
  To: 29144

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

I've sent an update patch with the requested modidications modulo the unit
tests.

It seems, that unit tests are not included in the pypi tarball.

Should we go with a git checkout, and do unit tests, or should we leave it
this way?

[-- Attachment #2: Type: text/html, Size: 322 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#29144: Updated patch
  2017-11-06  8:32 ` [bug#29144] Updated patch Gábor Boskovits
@ 2017-11-07 20:07   ` Marius Bakke
  0 siblings, 0 replies; 5+ messages in thread
From: Marius Bakke @ 2017-11-07 20:07 UTC (permalink / raw)
  To: Gábor Boskovits, 29144-done


[-- Attachment #1.1: Type: text/plain, Size: 447 bytes --]

Gábor Boskovits <boskovits@gmail.com> writes:

> I've sent an update patch with the requested modidications modulo the unit
> tests.
>
> It seems, that unit tests are not included in the pypi tarball.
>
> Should we go with a git checkout, and do unit tests, or should we leave it
> this way?

Bah.  It would be good to have unit tests, but I don't want to hold this
patch back, so I committed it with the following changes for now:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: pydot.diff --]
[-- Type: text/x-patch, Size: 1259 bytes --]

diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index dbc501733..2fefb41c0 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -226,14 +226,16 @@ be used either as a standalone application, or as a python library.")
         (base32
          "00imlz0033dygb9gdag1xr0cybn33gk5jsdi9ffbszzr97rd7dgd"))))
     (build-system python-build-system)
+    ;; FIXME: No tests in PyPi release tarball.
+    (arguments '(#:tests? #f))
     (propagated-inputs
-     `(("python-pyparsing",python-pyparsing)))
-    (native-inputs
-     `(("python-chardet",python-chardet)))
+     `(("python-pyparsing" ,python-pyparsing)))
     (home-page "https://github.com/erocarrera/pydot")
-    (synopsis "Python interface to Graphviz's Dot language")
+    (synopsis "Python interface to Graphviz's DOT language")
     (description
-     "An interface to Graphviz that can parse and dump
-+into the DOT language used by GraphViz, is written in pure Python,
-+and networkx can convert its graphs to pydot.")
+     "Pydot provides an interface to create, handle, modify and process
+graphs in Graphviz's DOT language, written in pure Python.")
     (license license:expat)))
+
+(define-public python2-pydot
+  (package-with-python2 python-pydot))

[-- Attachment #1.3: Type: text/plain, Size: 361 bytes --]


Sorry for rewriting the description, but I thought the double Graphviz
mention was redundant and the NetworkX reference rather "out of place"
(presumably other tools too can output to Pydot).  Since the original
text was copied off the README I hope it was okay.  Improvements welcome!

Also adjusted the commit message to mention the extra variable.  Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-07 20:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-04 19:36 [bug#29144] [PATCH 1/3] gnu: Add pydot Gábor Boskovits
2017-11-05 16:27 ` Marius Bakke
2017-11-06  8:30 ` [bug#29144] [PATCH] gnu: add pydot Gábor Boskovits
2017-11-06  8:32 ` [bug#29144] Updated patch Gábor Boskovits
2017-11-07 20:07   ` bug#29144: " Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).