all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49207] gnu: Add python-iris. (scitools)
@ 2021-06-24 12:39 Vinicius Monego
  2021-07-23 23:25 ` [bug#49207] [PATCH 0/6] gnu: Add python-iris (scitools) Vinicius Monego
  2023-06-09 14:58 ` [bug#49207] [PATCH v2 1/5] gnu: Add python-imagehash Vinicius Monego
  0 siblings, 2 replies; 13+ messages in thread
From: Vinicius Monego @ 2021-06-24 12:39 UTC (permalink / raw)
  To: 49207

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



[-- Attachment #2: 0001-gnu-Add-python-imagehash.patch --]
[-- Type: text/x-patch, Size: 2122 bytes --]

From 99e02748ab5374266677f47a409749475b4ef8fc Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:10:18 -0300
Subject: [PATCH 1/6] gnu: Add python-imagehash.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ec4209108f..c6d8fb1eea 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13018,6 +13018,47 @@ The API is as much as possible the similar to jQuery.  pyquery uses lxml for
 fast xml and html manipulation.")
     (license license:bsd-3)))
 
+(define-public python-imagehash
+  (package
+    (name "python-imagehash")
+    (version "4.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ImageHash" version))
+       (sha256
+        (base32 "0kgiksjggw2warfz5d04fr3iph47vwxcb8jrlj41ljkhrc3ahsd9"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-pillow" ,python-pillow)
+       ("python-pywavelets" ,python-pywavelets)
+       ("python-scipy" ,python-scipy)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/JohannesBuchner/imagehash")
+    (synopsis "Image hashing library")
+    (description "ImageHash is an Image hashing library.  It supports:
+
+@itemize
+@item Average hashing
+@item Perceptual hashing
+@item Difference hashing
+@item Wavelet hashing
+@item HSV color hashing (colorhash)
+@item Crop-resistant hashing
+@end itemize")
+    (license license:bsd-2)))
+
 (define-public python-anyjson
   (package
     (name "python-anyjson")
-- 
2.32.0


[-- Attachment #3: 0002-gnu-Add-python-xxhash.patch --]
[-- Type: text/x-patch, Size: 1822 bytes --]

From 4157cb6a4cc43ba529d71b26729cbbd55ce0c9d3 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:22:34 -0300
Subject: [PATCH 2/6] gnu: Add python-xxhash.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c6d8fb1eea..e1ec61fb0c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -131,6 +131,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dbm)
+  #:use-module (gnu packages digest)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages docker)
   #:use-module (gnu packages enchant)
@@ -13059,6 +13060,31 @@ fast xml and html manipulation.")
 @end itemize")
     (license license:bsd-2)))
 
+(define-public python-xxhash
+  (package
+    (name "python-xxhash")
+    (version "2.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "xxhash" version))
+       (sha256
+        (base32 "0jbvz19acznq00544gcsjg05fkvrmwbnwdfgrvwss3i1ys6avgmp"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'use-system-xxhash
+           (lambda _
+             (setenv "XXHASH_LINK_SO" "1"))))))
+    (inputs
+     `(("xxhash" ,xxhash)))
+    (home-page "https://github.com/ifduyue/python-xxhash")
+    (synopsis "Python binding for xxHash")
+    (description "This package provides a Python interface binding for the
+xxHash non-cryptographic hash algorithm.")
+    (license license:bsd-2)))
+
 (define-public python-anyjson
   (package
     (name "python-anyjson")
-- 
2.32.0


[-- Attachment #4: 0003-gnu-Add-python-antlr4.patch --]
[-- Type: text/x-patch, Size: 1336 bytes --]

From bd87844e37388d54598bb5638c3e6368f8f8b014 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:32:59 -0300
Subject: [PATCH 3/6] gnu: Add python-antlr4.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e1ec61fb0c..b102e1c570 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13085,6 +13085,25 @@ fast xml and html manipulation.")
 xxHash non-cryptographic hash algorithm.")
     (license license:bsd-2)))
 
+(define-public python-antlr4
+  (package
+    (name "python-antlr4")
+    (version "4.7.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "antlr4-python3-runtime" version))
+       (sha256
+        (base32 "02xm7ccsf51vh4xsnhlg6pvchm1x3ckgv9kwm222w5drizndr30n"))))
+    (arguments
+     `(#:tests? #f)) ; there are no tests
+    (build-system python-build-system)
+    (home-page "https://www.antlr.org")
+    (synopsis "ANTLR runtime for Python")
+    (description
+     "This package provides a ANTLR runtime for Python.")
+    (license license:bsd-3)))
+
 (define-public python-anyjson
   (package
     (name "python-anyjson")
-- 
2.32.0


[-- Attachment #5: 0004-gnu-Add-python-cf-units.patch --]
[-- Type: text/x-patch, Size: 2728 bytes --]

From 9b7690968faf0a5a0452f3eee47a486aea11bfda Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Wed, 26 May 2021 13:33:30 -0300
Subject: [PATCH 4/6] gnu: Add python-cf-units.

* gnu/packages/geo.scm (python-cf-units): New variable.
---
 gnu/packages/geo.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 546be33e55..3ea7804725 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -58,6 +58,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages c)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -970,6 +971,52 @@ Shapely capabilities
 @end itemize")
     (license license:lgpl3+)))
 
+(define-public python-cf-units
+  (package
+    (name "python-cf-units")
+    (version "2.1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cf-units" version))
+       (sha256
+        (base32 "0cswphn1cw0qyzglcn4xinr3pfhvbsdyll4hnb702fsfxv9q2cyl"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-doctest
+           (lambda _
+             ;; Two doctests fail.
+             (substitute* "setup.cfg" (("--doctest-modules") ""))))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest" "--pyargs" "cf_units" "-ra"
+                       ;; This test failed.
+                       "-k" "not test_masked_ndarray")))))))
+    (native-inputs
+     `(("python-coveralls" ,python-coveralls)
+       ("python-cython" ,python-cython)
+       ("python-jinja2" ,python-jinja2)
+       ("python-pep8" ,python-pep8)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-runner" ,python-pytest-runner)))
+    (inputs
+     `(("udunits" ,udunits)))
+    (propagated-inputs
+     `(("python-antlr4" ,python-antlr4)
+       ("python-cftime" ,python-cftime)
+       ("python-numpy" ,python-numpy)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/SciTools/cf-units")
+    (synopsis "Units of measure as required by the CF metadata conventions")
+    (description "This package provides units of measure as required by the
+Climate and Forecast (CF) metadata conventions.")
+    (license license:lgpl3)))
+
 (define-public postgis
   (package
     (name "postgis")
-- 
2.32.0


[-- Attachment #6: 0005-gnu-Add-python-pyke.patch --]
[-- Type: text/x-patch, Size: 1915 bytes --]

From f5425a307ca32542b92f79dad584e8c81b10b8bb Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Thu, 27 May 2021 16:49:27 -0300
Subject: [PATCH 5/6] gnu: Add python-pyke.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b102e1c570..3925a96b77 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5918,6 +5918,39 @@ operators such as union, intersection, and difference.")
 search in Python.")
     (license license:lgpl3+)))
 
+(define-public python-pyke
+  (package
+    (name "python-pyke")
+    (version "1.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "scitools-pyke" version))
+       (sha256
+        (base32 "0q7nxd0gw135922ck155w2nj2vf47k7cgzdqipxlyrgq6q3lkinl"))))
+    (build-system python-build-system)
+    ;; FIXME: two tests are failing with:
+    ;; "AttributeError: 'fc_tests' object has no attribute 'engine'.".
+    (arguments
+     `(#:tests? #f))
+    (home-page "https://sourceforge.net/projects/pyke/")
+    (synopsis "Python Knowledge Engine")
+    (description "Pyke is a Python Knowledge Engine and automatic Python
+program generator.  Both forward-chaining and backward-chaining rules (which
+may include Python code) are compiled into Python.  It can also automatically
+assemble Python programs out of Python functions which are attached to
+backward-chaining rules.
+
+Features:
+
+@itemize
+@item Automatic programming: generates Python programs.
+@item Forward and backward chaining.
+@item Multiple knowledge engines and rule bases.
+@item Rule-based inheritance.
+@end itemize")
+    (license license:expat)))
+
 (define-public python-wurlitzer
   (package
     (name "python-wurlitzer")
-- 
2.32.0


[-- Attachment #7: 0006-gnu-Add-python-iris.patch --]
[-- Type: text/x-patch, Size: 3975 bytes --]

From c6c77fe7c130274b5b68ac6fd283bba4dad382ae Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:43:03 -0300
Subject: [PATCH 6/6] gnu: Add python-iris.

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

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 3ea7804725..65d43849df 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -92,6 +92,7 @@
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
@@ -1017,6 +1018,72 @@ Shapely capabilities
 Climate and Forecast (CF) metadata conventions.")
     (license license:lgpl3)))
 
+(define-public python-iris
+  (package
+    (name "python-iris")
+    (version "3.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "scitools-iris" version))
+       (sha256
+        (base32 "1zqicscnnfqpck960xdjng38qk0w0spmcysl89l3smagdsagzxkr"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Some tests require a writable home.
+             (setenv "HOME" "/tmp")
+             ;; Iris will check for "scitools-iris[test]" before running the
+             ;; tests.  The complete test set weighs 150MB.  Skip this check.
+             (substitute* "setup.py"
+               ((".*tests_require.*") ""))
+             ;; The tests below open external connections.
+             (substitute*
+                 "lib/iris/tests/integration/plot/test_vector_plots.py"
+               (("test_2d_plain_latlon") "_test_2d_plain_latlon")
+               (("test_2d_plain_latlon_on_polar_map")
+                "_test_2d_plain_latlon_on_polar_map")
+               (("test_2d_rotated_latlon") "_test_2d_rotated_latlon"))
+             (substitute*
+                 "lib/iris/tests/integration/plot/test_plot_2d_coords.py"
+               (("test_2d_coords_contour") "_test_2d_coords_contour"))
+             ;; This one fails with AssertionError.
+             (substitute* "lib/iris/tests/experimental/test_animate.py"
+               (("test_cube_animation") "_test_cube_animation"))
+             ;; Compile Pyke rules before running the tests.
+             (invoke "python" "setup.py" "pyke_rules"))))))
+    (propagated-inputs
+     `(("python-cartopy" ,python-cartopy)
+       ("python-cf-units" ,python-cf-units)
+       ("python-cftime" ,python-cftime)
+       ("python-dask" ,python-dask)
+       ("python-matplotlib" ,python-matplotlib)
+       ("python-netcdf4" ,python-netcdf4)
+       ("python-numpy" ,python-numpy)
+       ("python-scipy" ,python-scipy)
+       ("python-xxhash" ,python-xxhash)))
+    (native-inputs
+     `(("netcdf" ,netcdf)
+       ("python-black" ,python-black)
+       ("python-filelock" ,python-filelock)
+       ("python-imagehash" ,python-imagehash)
+       ("python-nose" ,python-nose)
+       ("python-pillow" ,python-pillow)
+       ("python-pyke" ,python-pyke)
+       ("python-requests" ,python-requests)
+       ("python-wheel" ,python-wheel)))
+    (home-page "https://github.com/SciTools/iris")
+    (synopsis "Library for analysing and visualising Earth science data")
+    (description "Iris is a Python library for analysing and visualising Earth
+science data.  It excels when working with multi-dimensional Earth Science
+data, where tabular representations become unwieldy and inefficient.  Iris
+implements a data model based on the CF conventions.")
+    ;; See iris/docs/src/copyright.rst.
+    (license license:lgpl3+)))
+
 (define-public postgis
   (package
     (name "postgis")
-- 
2.32.0


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

end of thread, other threads:[~2023-06-09 15:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 12:39 [bug#49207] gnu: Add python-iris. (scitools) Vinicius Monego
2021-07-23 23:25 ` [bug#49207] [PATCH 0/6] gnu: Add python-iris (scitools) Vinicius Monego
2021-07-23 23:25   ` [bug#49207] [PATCH 1/6] gnu: Add python-imagehash Vinicius Monego
2021-07-23 23:25   ` [bug#49207] [PATCH 2/6] gnu: Add python-xxhash Vinicius Monego
2021-07-23 23:25   ` [bug#49207] [PATCH 3/6] gnu: Add python-antlr4 Vinicius Monego
2021-07-23 23:25   ` [bug#49207] [PATCH 4/6] gnu: Add python-cf-units Vinicius Monego
2021-07-23 23:25   ` [bug#49207] [PATCH 5/6] gnu: Add python-pyke Vinicius Monego
2021-07-23 23:25   ` [bug#49207] [PATCH 6/6] gnu: Add python-iris Vinicius Monego
2023-06-09 14:58 ` [bug#49207] [PATCH v2 1/5] gnu: Add python-imagehash Vinicius Monego
2023-06-09 14:58   ` [bug#49207] [PATCH v2 2/5] gnu: Add python-cf-units Vinicius Monego
2023-06-09 14:58   ` [bug#49207] [PATCH v2 3/5] gnu: python-dask: Propagate python-importlib-metadata Vinicius Monego
2023-06-09 14:58   ` [bug#49207] [PATCH v2 4/5] gnu: python-cartopy: Add dependencies Vinicius Monego
2023-06-09 14:58   ` [bug#49207] [PATCH v2 5/5] gnu: Add python-scitools-iris Vinicius Monego

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.