[PATCH 0/7] Update python-networkx.

  • Done
  • quality assurance status badge
Details
2 participants
  • Greg Hogan
  • Ludovic Courtès
Owner
unassigned
Submitted by
Greg Hogan
Severity
normal
G
G
Greg Hogan wrote on 22 Sep 2022 21:39
(address . guix-patches@gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
cover.1663873592.git.code@greghogan.com
A version update to python-networkx and build fixes for several
packages.

The only dependent failing to build is python-hyperopt, which has
likewise been failing to build upstream:

Greg Hogan (7):
gnu: python-networkx: Update to 2.8.6.
gnu: python-aws-sam-translator: Update to 1.51.0.
gnu: Add python-jschema-to-python.
gnu: Add python-sarif-om.
gnu: python-cfn-lint: Update to 0.65.0.
gnu: python-setools: Update to 4.4.0.
gnu: python-louvain: Fix test.

gnu/local.mk | 1 +
gnu/packages/graph.scm | 1 +
.../patches/python-louvain-fix-test.patch | 15 +++++
gnu/packages/python-web.scm | 55 +++++++++++++++++--
gnu/packages/python-xyz.scm | 4 +-
gnu/packages/selinux.scm | 13 +++--
6 files changed, 77 insertions(+), 12 deletions(-)
create mode 100644 gnu/packages/patches/python-louvain-fix-test.patch

--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 2/7] gnu: python-aws-sam-translator: Update to 1.51.0.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
59c0b34470a4678f6610681b643bcfe808e9229a.1663875245.git.code@greghogan.com
* gnu/packages/python-web.scm (python-aws-sam-translator): Update to 1.51.0.
---
gnu/packages/python-web.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 94544e1e74..be780e5d3c 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -563,13 +563,13 @@ (define-public python-css-html-js-minify
(define-public python-aws-sam-translator
(package
(name "python-aws-sam-translator")
- (version "1.40.0")
+ (version "1.51.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "aws-sam-translator" version))
(sha256
(base32
- "1hq5ggbzcq4k3ks439hki493w4sasgaxns6j5x57xsj822acalmf"))))
+ "1ywzchc3nk13xh593j7b14qp3y0fdx7cfbdhnm34p39av66xffac"))))
(build-system python-build-system)
(arguments
`(;; XXX: Tests are not distributed with the PyPI archive, and would
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 1/7] gnu: python-networkx: Update to 2.8.6.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
8c8ce6c1782d4a6b0ab8871c90ab6ba5d605ea39.1663875244.git.code@greghogan.com
* gnu/packages/python-xyz.scm (python-networkx): Update to 2.8.6.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 92e0c9dbe8..bcf28d54ce 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9497,13 +9497,13 @@ (define-public python-netifaces
(define-public python-networkx
(package
(name "python-networkx")
- (version "2.6.2")
+ (version "2.8.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "networkx" version))
(sha256
- (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
+ (base32 "19h18f5j79l7kmwm5cvm75fadjgmkzw5m3pyvb9cnq0860q7faxx"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 3/7] gnu: Add python-jschema-to-python.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
0e6d1dd294b092821cfc90844d3949e86af93d7a.1663875245.git.code@greghogan.com
* gnu/packages/python-web.scm (python-jschema-to-python): New variable.
---
gnu/packages/python-web.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index be780e5d3c..6a7c4be531 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -757,6 +757,25 @@ (define-public python-cfn-lint
for resource properties and best practices.")
(license license:expat)))
+(define-public python-jschema-to-python
+ (package
+ (name "python-jschema-to-python")
+ (version "1.2.3")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "jschema_to_python" version))
+ (sha256
+ (base32
+ "14cvaiwm56g0v6p7zviikaa5i9ln3yqy910jmp60hirhbpz19zvn"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-attrs python-jsonpickle python-pbr))
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/microsoft/jschema-to-python")
+ (synopsis "Generate Python classes from a JSON schema.")
+ (description "This package generates source code for Python classes from a
+@url{http://jschema.org,JSchema} JSON schema.")
+ (license license:expat)))
+
(define-public python-falcon
(package
(name "python-falcon")
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 4/7] gnu: Add python-sarif-om.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
37502a85b4de4bca7576faaa76687b8c07779021.1663875245.git.code@greghogan.com
* gnu/packages/python-web.scm (python-sarif-om): New variable.
---
gnu/packages/python-web.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 6a7c4be531..9d1fed7edd 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -776,6 +776,26 @@ (define-public python-jschema-to-python
@url{http://jschema.org,JSchema} JSON schema.")
(license license:expat)))
+(define-public python-sarif-om
+ (package
+ (name "python-sarif-om")
+ (version "1.0.4")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "sarif_om" version))
+ (sha256
+ (base32
+ "167gb8xjm0310km3w1s12bqldbv7zyklkr4j5900vq4361ml2pyd"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-attrs))
+ (native-inputs (list python-pbr))
+ (home-page "https://github.com/microsoft/sarif-python-om")
+ (synopsis "Python implementation of the SARIF 2.1.0 object model.")
+ (description "This module contains classes for the object model defined
+by the @url{https://sarifweb.azurewebsites.net,Static Analysis Results
+Interchange Format (SARIF)} file format.")
+ (license license:expat)))
+
(define-public python-falcon
(package
(name "python-falcon")
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 5/7] gnu: python-cfn-lint: Update to 0.65.0.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
17faf0389c712400350a2a47ea1565c39eedc071.1663875245.git.code@greghogan.com
* gnu/packages/python-web.scm (python-cfn-lint): Update to 0.65.0.
[arguments]<#:phases>: Add 'skip-network-test.
[propagated-inputs]: Add python-importlib-resources,
python-jschema-to-python, python-sarif-om.
---
gnu/packages/python-web.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9d1fed7edd..2aa487d5c3 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -710,7 +710,7 @@ (define-public python-cbor2
(define-public python-cfn-lint
(package
(name "python-cfn-lint")
- (version "0.54.3")
+ (version "0.65.0")
(home-page "https://github.com/aws-cloudformation/cfn-lint")
(source (origin
(method git-fetch)
@@ -720,11 +720,16 @@ (define-public python-cfn-lint
(file-name (git-file-name name version))
(sha256
(base32
- "106qf19n2k6sdjkb4006aidibd24qqiw901c1613xgjpnyw4dyl6"))))
+ "1rfacp39jssrbchrzb49vwrqyzhx5v7jfcgngqnb9r7qfs4bwi3w"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'skip-network-test
+ (lambda _
+ ;; This test requires networking.
+ (substitute* "test/unit/module/formatters/test_formatters.py"
+ (("def test_sarif_formatter") "def _test_sarif_formatter"))))
(replace 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
(when tests?
@@ -744,11 +749,14 @@ (define-public python-cfn-lint
(list python-pydot python-mock))
(propagated-inputs
(list python-aws-sam-translator
+ python-importlib-resources
+ python-jschema-to-python
python-jsonpatch
python-jsonschema
python-junit-xml
python-networkx
python-pyyaml
+ python-sarif-om
python-six))
(synopsis "Validate CloudFormation templates")
(description
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 6/7] gnu: python-setools: Update to 4.4.0.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
481dc680d61463c6a7a578c5e30ee26504e47fc9.1663875245.git.code@greghogan.com
* gnu/packages/selinux.scm (python-setools): Update to 4.4.0.
[source, home-page]: Update url.
[inputs]: Add python-pyqt.
[native-inputs]: Add python-cython.
---
gnu/packages/selinux.scm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index b4f074b695..d898b55129 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -42,6 +42,7 @@ (define-module (gnu packages selinux)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages qt)
#:use-module (gnu packages swig)
#:use-module (gnu packages xml))
@@ -305,16 +306,16 @@ (define-public python-sepolgen
(define-public python-setools
(package
(name "python-setools")
- (version "4.1.1")
+ (version "4.4.0")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/TresysTechnology/setools")
+ (url "https://github.com/SELinuxProject/setools")
(commit version)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0459xxly6zzqc5azcwk3rbbcxvj60dq08f8z6xr05y7dsbb16cg6"))))
+ "1qvd5j6zwq4fmlahg45swjplhif2z89x7s6pnp07gvcp2fbqdsh5"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; the test target causes a rebuild
@@ -339,10 +340,10 @@ (define-public python-setools
(propagated-inputs
(list python-networkx))
(inputs
- (list libsepol libselinux))
+ (list libsepol libselinux python-pyqt))
(native-inputs
- (list bison flex swig))
- (home-page "https://github.com/TresysTechnology/setools")
+ (list bison flex python-cython swig))
+ (home-page "https://github.com/SELinuxProject/setools")
(synopsis "Tools for SELinux policy analysis")
(description "SETools is a collection of graphical tools, command-line
tools, and libraries designed to facilitate SELinux policy analysis.")
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:44
[core-updates PATCH 7/7] gnu: python-louvain: Fix test.
(address . 58012@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
115f9b06a44f76669dcf9944235dab12ee130728.1663875245.git.code@greghogan.com
* gnu/packages/graph.scm (python-louvain)[source]: Add patch.
* gnu/packages/patches/python-louvain-fix-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
---
gnu/local.mk | 1 +
gnu/packages/graph.scm | 1 +
.../patches/python-louvain-fix-test.patch | 15 +++++++++++++++
3 files changed, 17 insertions(+)
create mode 100644 gnu/packages/patches/python-louvain-fix-test.patch

Toggle diff (47 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ef1bae5f3c..11213b2197 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1614,6 +1614,7 @@ dist_patch_DATA = \
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
%D%/packages/patches/python-chai-drop-python2.patch \
+ %D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-random2-getrandbits-test.patch \
%D%/packages/patches/python-poppler-qt5-fix-build.patch \
%D%/packages/patches/python-w3lib-fix-test-failure.patch \
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 109ba68675..02c80f0682 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -290,6 +290,7 @@ (define-public python-louvain
(origin
(method url-fetch)
(uri (pypi-uri "python-louvain" version))
+ (patches (search-patches "python-louvain-fix-test.patch"))
(sha256
(base32 "0sx53l555rwq0z7if8agirjgw4ddp8r9b949wwz8vlig03sjvfmp"))))
(build-system python-build-system)
diff --git a/gnu/packages/patches/python-louvain-fix-test.patch b/gnu/packages/patches/python-louvain-fix-test.patch
new file mode 100644
index 0000000000..2127df681c
--- /dev/null
+++ b/gnu/packages/patches/python-louvain-fix-test.patch
@@ -0,0 +1,15 @@
+https://github.com/taynaud/python-louvain/commit/638804ae636dc65306900ef6518ca0a1c9202566.diff
+
+diff --git a/test_community.py b/test_community.py
+index 1ee1976..566a4b1 100644
+--- a/test_community.py
++++ b/test_community.py
+@@ -203,7 +203,7 @@ def test_karate(self):
+ self.assertAlmostEqual(co.modularity(part, graph),
+ co.modularity(part_weight,
+ graph,
+- "test_weight"), places=2)
++ "test_weight"), places=1)
+
+ part_res_low = co.best_partition(graph, resolution=0.1)
+ self.assertTrue(
--
2.37.3
G
G
Greg Hogan wrote on 22 Sep 2022 21:53
Re: [PATCH 0/7] Update python-networkx.
(address . guix-patches@gnu.org)
CA+3U0ZkDzf06ONfSsNaZhomfhBTeG33J5vCQnqaFDyWi+eYA4Q@mail.gmail.com
On Thu, Sep 22, 2022 at 3:39 PM Greg Hogan <code@greghogan.com> wrote:
Toggle quote (4 lines)
>
> A version update to python-networkx and build fixes for several
> packages.

My apologies, this should be for the master branch. Not sure if this
can be retitled.

Greg
L
L
Ludovic Courtès wrote on 3 Oct 2022 00:10
Re: bug#58012: [PATCH 0/7] Update python-networkx.
(name . Greg Hogan)(address . code@greghogan.com)(address . 58012-done@debbugs.gnu.org)
875yh1ancf.fsf@gnu.org
Hi Greg,

Greg Hogan <code@greghogan.com> skribis:

Toggle quote (8 lines)
> gnu: python-networkx: Update to 2.8.6.
> gnu: python-aws-sam-translator: Update to 1.51.0.
> gnu: Add python-jschema-to-python.
> gnu: Add python-sarif-om.
> gnu: python-cfn-lint: Update to 0.65.0.
> gnu: python-setools: Update to 4.4.0.
> gnu: python-louvain: Fix test.

Applied on ‘master’, thanks!

Ludo’.
Closed
?