From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em05L-0004Pl-FN for guix-patches@gnu.org; Wed, 14 Feb 2018 11:39:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1em05G-0002tu-Ib for guix-patches@gnu.org; Wed, 14 Feb 2018 11:39:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1em05G-0002t9-Cy for guix-patches@gnu.org; Wed, 14 Feb 2018 11:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1em05G-0001R4-43 for guix-patches@gnu.org; Wed, 14 Feb 2018 11:39:02 -0500 Subject: [bug#30456] [PATCH 2/2] gnu: Add python2-mapnik. References: <20180214162903.23995-1-arunisaac@systemreboot.net> In-Reply-To: <20180214162903.23995-1-arunisaac@systemreboot.net> Resent-Message-ID: From: Arun Isaac Date: Wed, 14 Feb 2018 22:08:30 +0530 Message-Id: <20180214163830.24474-1-arunisaac@systemreboot.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30456@debbugs.gnu.org * gnu/packages/geo.scm (python2-mapnik): New variable. --- gnu/packages/geo.scm | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index b37320e8b..cc6af8ce6 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -24,12 +24,14 @@ (define-module (gnu packages geo) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix build-system scons) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages boost) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages glib) @@ -291,3 +293,73 @@ to any server environment. It is intended to play fair in a multi-threaded environment and is aimed primarily, but not exclusively, at web-based development.") (license license:lgpl2.1+))) + +(define-public python2-mapnik + (package + (name "python2-mapnik") + (version "3.0.16") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/mapnik/python-mapnik/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0w7wg72gnwmbjani9sqk42p2jwqkrl9hsdkawahni5m05xsifcb4")))) + (build-system python-build-system) + (inputs + `(("boost" ,boost) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("mapnik" ,mapnik) + ("proj.4" ,proj.4) + ("python2-pycairo" ,python2-pycairo))) + (native-inputs + `(("python2-nose" ,python2-nose) + ;; Test data is released as separate tarballs + ("test-data" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/mapnik/test-data/archive/v" + version ".tar.gz")) + (file-name (string-append "python2-mapnik-test-data-" version ".tar.gz")) + (sha256 (base32 "0wlkq7ywczh229kb608cnnccyvcly90krkq93ja9ggjhdq3ddn2y")))) + ("test-data-visual" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/mapnik/test-data-visual/archive/v" + version ".tar.gz")) + (file-name (string-append "python2-mapnik-test-data-visual-" + version ".tar.gz")) + (sha256 (base32 "0l9wmkjbghr48vk06s0rzh4gps5zg3b0sz5j5ivkb9wiy014i6zm")))))) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + ;; Unpack test data into the source tree + (add-after 'unpack 'unpack-submodules + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (invoke "tar" "xvf" (assoc-ref inputs source) + "--strip-components=1"))))) + (unpack "test-data" "test/data") + (unpack "test-data-visual" "test/data-visual")))) + ;; Skip failing tests + (add-after 'unpack 'skip-tests + (lambda _ + (let ((skipped-tests (list "test_vrt_referring_to_missing_files" + "test_proj_antimeridian_bbox" + "test_render_with_scale_factor"))) + (substitute* "setup.cfg" + (("\\[nosetests\\]" all) + (string-append all "\nexclude=^(" + (string-join skipped-tests "|") ")$"))))))))) + (home-page "https://github.com/mapnik/python-mapnik") + (synopsis "Python bindings for Mapnik") + (description "This package provides Python bindings for Mapnik.") + (license license:lgpl2.1+))) -- 2.15.1