From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: Add python-pyxdg. Date: Tue, 14 Apr 2015 08:56:35 +0200 Message-ID: <871tjn42qk.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhum7-00061h-GV for guix-devel@gnu.org; Tue, 14 Apr 2015 02:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yhum3-0008JT-CN for guix-devel@gnu.org; Tue, 14 Apr 2015 02:56:47 -0400 Received: from sender1.zohomail.com ([74.201.84.162]:52774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhum3-0008JF-3u for guix-devel@gnu.org; Tue, 14 Apr 2015 02:56:43 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-python-pyxdg.patch Content-Transfer-Encoding: 8bit >From e9ba9a6bee8ff6d503e1c3f87b407e872afda193 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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 ;;; Copyright © 2015 Sou Bunnbu +;;; Copyright © 2015 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,10 +19,13 @@ ;;; along with GNU Guix. If not, see . (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 --=-=-=--