diff mbox series

[bug#65194,v3] gnu: Add python-altgraph.

Message ID f4085bd91daf39f762d068f130d7cf8f472a2995.1695987035.git.hako@ultrarare.space
State New
Headers show
Series [bug#65194,v3] gnu: Add python-altgraph. | expand

Commit Message

Hilton Chain Sept. 29, 2023, 11:33 a.m. UTC
From: fanquake <fanquake@gmail.com>

* gnu/packages/python-xyz.scm (python-altgraph): New variable.
---

V2 -> V3:
 - Correct license to expat-0.

V1 -> V2:
 - 0.17.3->0.17.4.
 - Adjust description.
 - Rebase.

 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)


base-commit: 1b0ec97bce2db93ec4159a13fb0a184f012df4fe

Comments

jgart Sept. 30, 2023, 2:09 a.m. UTC | #1
Hi Guixers,

Thanks for the patches.

Can you also patch these methods to use our binarie executables in Guix?

https://github.com/ronaldoussoren/altgraph/blob/master/altgraph_tests/test_dot.py#L52

Lars or someone else,

Feel free to let me know if not needed. I'm unsure of when we should and shouldn't for Python libraries sometimes.

Should we document our policy for that in the manual?

all best,

jgart
Munyoki Kilyungi Oct. 2, 2023, 8:14 a.m. UTC | #2
"jgart" <jgart@dismail.de> aliandika:

> Hi Guixers,
>
> Thanks for the patches.
>
> Can you also patch these methods to use our binarie executables in Guix?
>
> https://github.com/ronaldoussoren/altgraph/blob/master/altgraph_tests/test_dot.py#L52
>
I've done a build of python-alt-graph and it
builds just file, tests and all so ...
> Lars or someone else,
>
> Feel free to let me know if not needed. I'm unsure of when we should and shouldn't for Python libraries sometimes.
>

I doubt we need to patch the tests ase you had
earlier indicated since the tests still pass---I
don't know why though.
Just my 2¢s.

> Should we document our policy for that in the manual?
>
> all best,
>
> jgart
jgart Oct. 2, 2023, 1:59 p.m. UTC | #3
Hi Bonface,

Thanks for reviewing and testing.

Ok,

I also think that this patch is good to go. If someone else thinks we should patch just reply to comment or we can take care of that in a future ticket so as to not block this one.

I'll try to merge this by tonight/tomorrow after I do another review and test.

all best,

jgart
jgart Oct. 3, 2023, 1:32 p.m. UTC | #4
Hi fanquake,

Why not use the PyPi source if it includes the tests?

It is what the importer would have produced:

$ guix import pypi altgraph

Starting download of /tmp/guix-file.mH76On
From https://files.pythonhosted.org/packages/de/a8/7145824cf0b9e3c28046520480f207df47e927df83aa9555fb47f8505922/altgraph-0.17.4.tar.gz...
 …17.4.tar.gz  47KiB                  835KiB/s 00:00 ▕██████████████████▏ 100.0%

Starting download of /tmp/guix-file.j6I6jB
From https://files.pythonhosted.org/packages/4d/3f/3bc3f1d83f6e4a7fcb834d3720544ca597590425be5ba9db032b2bf322a2/altgraph-0.17.4-py2.py3-none-any.whl...
 …2.py3-none-any.whl  21KiB           1.8MiB/s 00:00 ▕██████████████████▏ 100.0%
(package
  (name "python-altgraph")
  (version "0.17.4")
  (source
   (origin
     (method url-fetch)
     (uri (pypi-uri "altgraph" version))
     (sha256
      (base32 "01j48np3g50g6insjkszsz0vifwlm6gspria5vdwlkbciywznnhv"))))
  (build-system pyproject-build-system)
  (home-page "https://altgraph.readthedocs.io")
  (synopsis "Python graph (network) package")
  (description "Python graph (network) package")

all best,

jgart
Michael Ford Oct. 3, 2023, 2:26 p.m. UTC | #5
Hi jgart,

I'm happy for this to be changed in whatever way is best for inclusion in
Guix.
The original patch I submitted, came from a manifest in a different
project, where
we have just been using the source, and were not running the tests. If the
PyPi souce
would be a better fit here, that is fine with me.

Thanks,

Michael

On Tue, 3 Oct 2023 at 14:32, jgart <jgart@dismail.de> wrote:

> Hi fanquake,
>
> Why not use the PyPi source if it includes the tests?
>
> It is what the importer would have produced:
>
> $ guix import pypi altgraph
>
> Starting download of /tmp/guix-file.mH76On
> From
> https://files.pythonhosted.org/packages/de/a8/7145824cf0b9e3c28046520480f207df47e927df83aa9555fb47f8505922/altgraph-0.17.4.tar.gz.
> ..
>  …17.4.tar.gz  47KiB                  835KiB/s 00:00 ▕██████████████████▏
> 100.0%
>
> Starting download of /tmp/guix-file.j6I6jB
> From
> https://files.pythonhosted.org/packages/4d/3f/3bc3f1d83f6e4a7fcb834d3720544ca597590425be5ba9db032b2bf322a2/altgraph-0.17.4-py2.py3-none-any.whl.
> ..
>  …2.py3-none-any.whl  21KiB           1.8MiB/s 00:00 ▕██████████████████▏
> 100.0%
> (package
>   (name "python-altgraph")
>   (version "0.17.4")
>   (source
>    (origin
>      (method url-fetch)
>      (uri (pypi-uri "altgraph" version))
>      (sha256
>       (base32 "01j48np3g50g6insjkszsz0vifwlm6gspria5vdwlkbciywznnhv"))))
>   (build-system pyproject-build-system)
>   (home-page "https://altgraph.readthedocs.io")
>   (synopsis "Python graph (network) package")
>   (description "Python graph (network) package")
>
> all best,
>
> jgart
>
jgart Oct. 3, 2023, 4:49 p.m. UTC | #6
Our usual informal protocol in the past for Python packages has been if the PyPi sources have the tests then we prefer that.

We maybe should formally document the policy to avoid these confusions like this.

Lars or another veteran Guix contributor could you confirm that this is indeed what we should do?

Michael,

Can you send a v4 patch for that?

all best,

jgart
jgart Oct. 4, 2023, 1:51 a.m. UTC | #7
Hi Guixers,

I applied the patch with some small changes in 0c6198319a.

I fixed up the description and synopsis a bit and added python-pytest as a native-input since the pyproject-build-system does not include it so test wouldn't be run otherwise.

Thanks for your contributions and review to everyone involved. It is much appreciated!

all best,

jgart
Munyoki Kilyungi Oct. 4, 2023, 10:04 a.m. UTC | #8
"jgart" <jgart@dismail.de> aliandika:

> Hi Guixers,
>
> I applied the patch with some small changes in 0c6198319a.
>
> I fixed up the description and synopsis a bit and added python-pytest as a native-input since the pyproject-build-system does not include it so test wouldn't be run otherwise.
>
Nice!  Thanks for the effort +1
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d3d91480ac..ec0283838e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11493,6 +11493,28 @@  (define-public python-toposort
 algorithm.")
     (license license:asl2.0)))
 
+(define-public python-altgraph
+  (package
+    (name "python-altgraph")
+    (version "0.17.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ronaldoussoren/altgraph")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "03cingygy7k8cg1l7ffxyrsva1a87y0is14wp04y7zazjab12w87"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/ronaldoussoren/altgraph")
+    (synopsis "Python graph (network) package")
+    (description
+     "@code{altgraph} is a graph (network) package for constructing graphs, BFS
+and DFS traversals, topological sort, shortest paths, etc. with graphviz output.
+")
+    (license license:expat-0)))
+
 (define-public python-three-merge
   (package
     (name "python-three-merge")