Subject: bug#37839: closed (Re: [bug#37839] [PATCH] gnu: Add pdfarranger.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 21 Oct 2019 21:27:01 +0000

Your bug report

#37839: [PATCH] gnu: Add pdfarranger.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
37839: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37839
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#37839] [PATCH] gnu: Add pdfarranger.
From: Ludovic Courtès <[email-masked]>
To: Ben Sturmfels <[email-masked]>
Cc: [email-masked]
Date: Mon, 21 Oct 2019 23:25:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Ben,

Ben Sturmfels <[email-masked]> skribis:

> * gnu/packages/pdf.scm (pdfarranger): New public variable.

Applied!

I’ve followed up with a patch that sets ‘GI_TYPELIB_PATH’ to address
this error:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/9r9yzb15rpxl1nzzrm9a96assrffqyij-pdfarranger-1.3.1/bin/pdfarranger --help
Traceback (most recent call last):
  File "/gnu/store/9r9yzb15rpxl1nzzrm9a96assrffqyij-pdfarranger-1.3.1/bin/.pdfarranger-real", line 11, in <module>
    load_entry_point('pdfarranger==1.3.1', 'console_scripts', 'pdfarranger')()
  File "/gnu/store/608bvypsh90c58apvd2cgg3m9l2pwjqn-python-3.7.4/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/gnu/store/608bvypsh90c58apvd2cgg3m9l2pwjqn-python-3.7.4/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/gnu/store/608bvypsh90c58apvd2cgg3m9l2pwjqn-python-3.7.4/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/gnu/store/608bvypsh90c58apvd2cgg3m9l2pwjqn-python-3.7.4/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/gnu/store/9r9yzb15rpxl1nzzrm9a96assrffqyij-pdfarranger-1.3.1/lib/python3.7/site-packages/pdfarranger/pdfarranger.py", line 74, in <module>
    gi.require_version('Gtk', '3.0')
  File "/gnu/store/z5fdc5aa9hs4c3p79ajzgxhazv7702y8-python-pygobject-3.28.3/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.

Subject: [PATCH] gnu: Add pdfarranger.
From: Ben Sturmfels <[email-masked]>
To: [email-masked]
Cc: Ben Sturmfels <[email-masked]>
Date: Mon, 21 Oct 2019 09:54:44 +1100
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/pdf.scm (pdfarranger): New public variable.
---
 gnu/packages/pdf.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 003b5a9548..e3d0645f49 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2017, 2018 Rene Saavedra <[email-masked]>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2019 Alex Griffin <[email-masked]>
+;;; Copyright © 2019 Ben Sturmfels <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -978,6 +979,41 @@ Note: This module isn't maintained anymore.  For new projects please use
 python-pypdf2 instead.")
     (license license:bsd-3)))
 
+(define-public pdfarranger
+  (package
+    (name "pdfarranger")
+    (version "1.3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jeromerobert/pdfarranger.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1f8m8r81322i97wkqpmf7a4kiwnq244n6cnbldh03jc49vwq2kxx"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f))  ; no tests
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("python-distutils-extra" ,python-distutils-extra)))
+    (propagated-inputs
+     `(("gtk+" ,gtk+)
+       ("poppler" ,poppler)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pygobject" ,python-pygobject)
+       ("python-pypdf2" ,python-pypdf2)))
+    (home-page "https://github.com/jeromerobert/pdfarranger")
+    (synopsis "Merge, split and re-arrange pages from PDF documents")
+    (description
+     "PDF Arranger is a small application which allows one to merge or split
+PDF documents and rotate, crop and rearrange their pages using an interactive
+and intuitive graphical interface.
+
+PDF Arranger was formerly known as PDF-Shuffler.")
+    (license license:gpl3+)))
+
 (define-public pdfposter
   (package
     (name "pdfposter")
-- 
2.23.0