GNU bug report logs - #52966
[PATCH 1/6] gnu: Add python-piexif.

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Sun, 2 Jan 2022 22:00:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52966 in the body.
You can then email your comments to 52966 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sun, 02 Jan 2022 22:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 02 Jan 2022 22:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/6] gnu: Add python-piexif.
Date: Sun,  2 Jan 2022 22:59:37 +0100
* gnu/packages/python-xyz.scm (python-piexif): New variable.
* gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch: New file.
* gnu/packages/python-xyz.scm (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 ...hon-piexif-fix-tests-with-pillow-7.2.patch | 44 +++++++++++++++++++
 gnu/packages/python-xyz.scm                   | 22 ++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 852f9f3246..322b07ad74 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1678,6 +1678,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-keras-integration-test.patch	\
   %D%/packages/patches/python-peachpy-determinism.patch	\
   %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
+  %D%/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch	\
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch	\
   %D%/packages/patches/python-pyflakes-test-location.patch	\
   %D%/packages/patches/python-flint-includes.patch		\
diff --git a/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch
new file mode 100644
index 0000000000..a012a92f91
--- /dev/null
+++ b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch
@@ -0,0 +1,44 @@
+From 5209b53e9689ce28dcd045f384633378d619718f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Wi=C5=9Bniewski?= <vuko <at> vuko.pl>
+Date: Thu, 5 Nov 2020 16:18:52 +0100
+Subject: [PATCH] convert IFDRational to tuples in tests
+
+This fixes tests with Pillow version >= 7.2.0
+---
+ tests/s_test.py | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/tests/s_test.py b/tests/s_test.py
+index 5d105de..a7cad54 100644
+--- a/tests/s_test.py
++++ b/tests/s_test.py
+***************
+*** 9,14 ****
+--- 9,15 ----
+  import time

+  import unittest

+  

++ import PIL

+  from PIL import Image

+  import piexif

+  from piexif import _common, ImageIFD, ExifIFD, GPSIFD, TAGS, InvalidImageDataError

+***************
+*** 580,585 ****
+--- 581,597 ----
+  # test utility methods----------------------------------------------

+  

+      def _compare_value(self, v1, v2):

++         if isinstance(v2, PIL.TiffImagePlugin.IFDRational):

++             v2 = (v2.numerator, v2.denominator)

++         if isinstance(v2, tuple):

++             converted_v2 = []

++             for el in v2:

++                 if isinstance(el, PIL.TiffImagePlugin.IFDRational):

++                     converted_v2.append((el.numerator, el.denominator))

++                 else:

++                     converted_v2.append(el)

++             v2 = tuple(converted_v2)

++ 

+          if type(v1) != type(v2):

+              if isinstance(v1, tuple):

+                  self.assertEqual(pack_byte(*v1), v2)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b6534c677f..4e408f1d49 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27867,3 +27867,25 @@ keyboard-friendly package.")
     (description
      "This package provides a Python interface to iw wireless tools.")
     (license license:gpl2)))
+
+(define-public python-piexif
+  (package
+    (name "python-piexif")
+    (version "1.1.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "piexif" version ".zip"))
+        (sha256
+         (base32 "06sz58q4mrw472p8fbnq7wsj8zpi5js5r8phm2hiwfmz0v33bjw3"))
+        (patches
+         (search-patches "python-piexif-fix-tests-with-pillow-7.2.patch"))))
+    (build-system python-build-system)
+    (native-inputs
+     (list unzip python-pillow))
+    (home-page "https://github.com/hMatoba/Piexif")
+    (synopsis "Simplify exif manipulations with Python")
+    (description "@code{Piexif} simplifies interacting with EXIF data in
+Python.  It includes the tools necessary for extracting, creating,
+manipulating, converting and writing EXIF data to JPEG, WebP and TIFF files.")
+    (license license:expat)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sun, 02 Jan 2022 22:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 52966 <at> debbugs.gnu.org
Subject: [PATCH 2/6] gnu: Add python-pyrss2gen.
Date: Sun,  2 Jan 2022 23:00:39 +0100
* gnu/packages/python-xyz.scm (python-pyrss2gen): New variable.
---
 gnu/packages/python-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4e408f1d49..4d32b4dd97 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27889,3 +27889,20 @@ keyboard-friendly package.")
 Python.  It includes the tools necessary for extracting, creating,
 manipulating, converting and writing EXIF data to JPEG, WebP and TIFF files.")
     (license license:expat)))
+
+(define-public python-pyrss2gen
+  (package
+    (name "python-pyrss2gen")
+    (version "1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "PyRSS2Gen" version))
+        (sha256
+          (base32 "1rvf5jw9hknqz02rp1vg8abgb1lpa0bc65l7ylmlillqx7bswq3r"))))
+    (build-system python-build-system)
+    (home-page "http://dalkescientific.com/Python/PyRSS2Gen.html")
+    (synopsis "Generate RSS 2.0 feeds using a Python data structure")
+    (description "@code{PyRSS2Gen} is the interface to generate RSS 2.0
+feeds.  PyRSS2Gen builds the feed up by using a XML generator.")
+    (license license:bsd-3)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sun, 02 Jan 2022 22:01:02 GMT) Full text and rfc822 format available.

Message #11 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 52966 <at> debbugs.gnu.org
Subject: [PATCH 3/6] gnu: Add python-yapsy.
Date: Sun,  2 Jan 2022 23:00:40 +0100
* gnu/packages/python-xyz.scm (python-yapsy): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4d32b4dd97..01ae4cf96a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27906,3 +27906,25 @@ manipulating, converting and writing EXIF data to JPEG, WebP and TIFF files.")
     (description "@code{PyRSS2Gen} is the interface to generate RSS 2.0
 feeds.  PyRSS2Gen builds the feed up by using a XML generator.")
     (license license:bsd-3)))
+
+(define-public python-yapsy
+  (package
+    (name "python-yapsy")
+    (version "1.12.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "Yapsy" version))
+        (sha256
+          (base32 "12rznbnswfw0w7qfbvmmffr9r317gl1rqg36nijwzsklkjgks4fq"))))
+    (build-system python-build-system)
+    (home-page "http://yapsy.sourceforge.net")
+    (synopsis "Simple plugin system for Python applications")
+    (description "@code{Yapsy}, or Yet Another Plugin SYstem, is a small library
+implementing the core mechanisms needed to build a plugin system into a wider
+application.
+
+The main purpose is to depend only on Python's standard libraries and to
+implement only the basic functionalities needed to detect, load and keep track
+of several plugins.")
+    (license license:bsd-3)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sun, 02 Jan 2022 22:01:03 GMT) Full text and rfc822 format available.

Message #14 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 52966 <at> debbugs.gnu.org
Subject: [PATCH 4/6] gnu: Add python-doit.
Date: Sun,  2 Jan 2022 23:00:41 +0100
* gnu/packages/python-xyz.scm (python-doit): New variable.
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 01ae4cf96a..5047d05d6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27928,3 +27928,37 @@ The main purpose is to depend only on Python's standard libraries and to
 implement only the basic functionalities needed to detect, load and keep track
 of several plugins.")
     (license license:bsd-3)))
+
+(define-public python-doit
+  (package
+    (name "python-doit")
+    (version "0.34.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "doit" version))
+        (sha256
+          (base32 "0bf0m9n0hyjvjpv051zd26725j8jr23gyvc37v3kkadwbh8dxwcf"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      (list python-cloudpickle python-pyinotify))
+    (native-inputs
+      (list python-pytest))
+    (home-page "https://pydoit.org")
+    (synopsis "Automation tool to execute any kind of task in a build-tools
+fashion")
+    (description "@code{doit} is an automation tool that brings the power of
+build-tools to execute any kind of task.
+
+A task describes some computation to be done (actions), and contains some
+extra meta-data.  The actions can be external programs or Python functions.  A
+single task may define more than one action.  @code{doit} uses the task’s
+meta-data to:
+
+@itemize
+@item cache task results
+@item correct execution order
+@item parallel execution
+@item powerful dependency system
+@end itemize")
+    (license license:expat)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sun, 02 Jan 2022 22:01:03 GMT) Full text and rfc822 format available.

Message #17 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 52966 <at> debbugs.gnu.org
Subject: [PATCH 5/6] gnu: Add python-phpserialize.
Date: Sun,  2 Jan 2022 23:00:42 +0100
* gnu/packages/python-xyz.scm (python-phpserialize): New variable.
---
 gnu/packages/python-xyz.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5047d05d6c..ede70c5fb9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27962,3 +27962,24 @@ meta-data to:
 @item powerful dependency system
 @end itemize")
     (license license:expat)))
+
+(define-public python-phpserialize
+  (package
+    (name "python-phpserialize")
+    (version "1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "phpserialize" version))
+       (sha256
+        (base32 "19qgkb9z4zjbjxlpwh2w6pxkz2j3iymnydi69jl0jg905lqjsrxz"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      ;; tests missing in pypi archive, anhow they are quite simple and not worth any hassle
+      #:tests? #f))
+    (home-page "http://github.com/mitsuhiko/phpserialize")
+    (synopsis "Python port of the serialize and unserialize functions of PHP")
+    (description
+     "This package provides a port of the serialize and unserialize functions of PHP for Python")
+    (license license:bsd-3)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sun, 02 Jan 2022 22:02:02 GMT) Full text and rfc822 format available.

Message #20 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 52966 <at> debbugs.gnu.org
Subject: [PATCH 6/6] gnu: Add nikola.
Date: Sun,  2 Jan 2022 23:00:43 +0100
* gnu/packages/python-xyz.scm (nikola): New variable.
---
 gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ede70c5fb9..70de72425d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27983,3 +27983,58 @@ meta-data to:
     (description
      "This package provides a port of the serialize and unserialize functions of PHP for Python")
     (license license:bsd-3)))
+
+(define-public nikola
+  (package
+    (name "nikola")
+    (version "8.1.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "Nikola" version))
+        (sha256
+          (base32 "1vspzvi4039zgjc93bspqjb384r6c9ksvmidbp8csws2pdbc7sh5"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      (list python-babel
+            python-blinker
+            python-dateutil
+            python-docutils
+            python-doit
+            python-jinja2        ;; for themes
+            python-lxml
+            python-mako
+            python-markdown
+            python-natsort
+            python-notebook      ;; for ipynb
+            python-phpserialize  ;; for wordpress import
+            python-piexif
+            python-pillow
+            python-pygments
+            python-pyrss2gen
+            python-requests
+            python-ruamel.yaml   ;; for YAML metadata
+            python-unidecode
+            python-yapsy))
+    (native-inputs
+      (list python-coverage
+            python-flake8
+            python-freezegun
+            python-pytest
+            python-pytest-cov))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;;(add-installed-pythonpath inputs outputs)
+                (invoke "pytest" "tests" "--no-cov"
+                        "-k" "not test_compiling_markdown[hilite]")))))))
+    (home-page "https://getnikola.com/")
+    (synopsis "Modular, fast and simple static website and blog generator")
+    (description "@code{Nikola} generated static websites and blogs.  Out of the
+box, it supports reStructuredText, Markdown, IPython (Jupyter) Notebooks and
+HTML, and has plugins for many other formats.")
+    (license license:expat)))
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sat, 08 Jan 2022 22:02:01 GMT) Full text and rfc822 format available.

Message #23 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 52966 <at> debbugs.gnu.org
Subject: Re: bug#52966: [PATCH 1/6] gnu: Add python-piexif.
Date: Sat, 08 Jan 2022 23:01:17 +0100
Hi Hartmut,

Hartmut Goebel <h.goebel <at> crazy-compilers.com> skribis:

> * gnu/packages/python-xyz.scm (python-piexif): New variable.
> * gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch: New file.
> * gnu/packages/python-xyz.scm (dist_patch_DATA): Add it.

[...]

> +++ b/gnu/packages/patches/python-piexif-fix-tests-with-pillow-7.2.patch
> @@ -0,0 +1,44 @@
> +From 5209b53e9689ce28dcd045f384633378d619718f Mon Sep 17 00:00:00 2001

Please use Unix line endings for this file.

Apart from that, this and the other patches LGTM, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#52966; Package guix-patches. (Sat, 08 Jan 2022 22:04:01 GMT) Full text and rfc822 format available.

Message #26 received at 52966 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 52966 <at> debbugs.gnu.org
Subject: Re: bug#52966: [PATCH 1/6] gnu: Add python-piexif.
Date: Sat, 08 Jan 2022 23:02:53 +0100
Hartmut Goebel <h.goebel <at> crazy-compilers.com> skribis:

> +    (description "@code{Piexif} simplifies interacting with EXIF data in
> +Python.  It includes the tools necessary for extracting, creating,
> +manipulating, converting and writing EXIF data to JPEG, WebP and TIFF files.")
> +    (license license:expat)))

[...]

> +    (description "@code{Nikola} generated static websites and blogs.  Out of the
> +box, it supports reStructuredText, Markdown, IPython (Jupyter) Notebooks and
> +HTML, and has plugins for many other formats.")
> +    (license license:expat)))

BTW, there’s no reason to use @code for proper nouns; you can probably
just remove it in these two cases (@code is used for code snippets,
rendered using a fixed-width font.)

Ludo’.




Reply sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
You have taken responsibility. (Sat, 15 Jan 2022 20:38:02 GMT) Full text and rfc822 format available.

Notification sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
bug acknowledged by developer. (Sat, 15 Jan 2022 20:38:02 GMT) Full text and rfc822 format available.

Message #31 received at 52966-close <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 52966-close <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#52966: [PATCH 1/6] gnu: Add python-piexif.
Date: Sat, 15 Jan 2022 21:37:38 +0100
Hi Ludo,

Thanks for the review. I changed what you requested and pushed as 
f542ef076a2238c36d5e9ed65836558375d3dd27

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Feb 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.