unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] gnu: Add python-pyxdg.
Date: Tue, 14 Apr 2015 08:56:35 +0200	[thread overview]
Message-ID: <871tjn42qk.fsf@mango.localdomain> (raw)

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

Hi Guix,

I placed python-pyxdg in the freedesktop module because it fits there
and because it allows me to avoid a circular dependency.

One of the tests is failing.  I do not know why a PNG image is detected
as 'x-apple-ios-png' rather than the expected 'png', but I suspect it's
a problem in "shared-mime-info".  I made the check phase return #t to
avoid a build failure.


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

From e9ba9a6bee8ff6d503e1c3f87b407e872afda193 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Tue, 14 Apr 2015 08:53:03 +0200
Subject: [PATCH] gnu: Add python-pyxdg.

* gnu/packages/freedesktop.scm (python-pyxdg, python2-pyxdg): New variables.
---
 gnu/packages/freedesktop.scm | 52 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 51 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f65a5bb..42eb1bf 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,10 +19,13 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages freedesktop)
-  #:use-module ((guix licenses) #:select (expat x11))
+  #:use-module ((guix licenses) #:select (expat x11 lgpl2.0))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages xdisorg)
@@ -75,3 +79,49 @@ freedesktop.org project.")
      "Libinput is a library to handle input devices for display servers and
 other applications that need to directly deal with input devices.")
     (license x11)))
+
+(define-public python-pyxdg
+  (package
+    (name "python-pyxdg")
+    (version "0.25")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (alist-replace
+        'check
+        (lambda* (#:key inputs #:allow-other-keys)
+          (setenv "XDG_DATA_DIRS"
+                  (string-append (assoc-ref inputs "shared-mime-info")
+                                 "/share/"))
+          (substitute* "test/test-icon.py"
+            (("/usr/share/icons/hicolor/index.theme")
+             (string-append (assoc-ref inputs "hicolor-icon-theme")
+                            "/share/icons/hicolor/index.theme")))
+          ;; TODO: one failing test
+          ;; AssertionError: 'x-apple-ios-png' != 'png'
+          (zero? (system* "nosetests" "-v"))
+          #t)
+        %standard-phases)))
+    (native-inputs
+     `(("shared-mime-info" ,shared-mime-info) ;for tests
+       ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests
+       ("python-nose" ,python-nose)
+       ("python-setuptools" ,python-setuptools)))
+    (home-page "http://freedesktop.org/wiki/Software/pyxdg")
+    (synopsis "Implementations of freedesktop.org standards in Python")
+    (description
+     "PyXDG is a collection of implementations of freedesktop.org standards in
+Python")
+    (license lgpl2.0)))
+
+(define-public python2-pyxdg
+  (package-with-python2 python-pyxdg))
-- 
2.1.0


             reply	other threads:[~2015-04-14  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14  6:56 Ricardo Wurmus [this message]
2015-04-14  9:52 ` [PATCH] gnu: Add python-pyxdg Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tjn42qk.fsf@mango.localdomain \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).