From: Arun Isaac <arunisaac@systemreboot.net>
To: 30456@debbugs.gnu.org
Subject: [bug#30456] [PATCH 2/2] gnu: Add python2-mapnik.
Date: Fri, 16 Feb 2018 03:57:34 +0530 [thread overview]
Message-ID: <20180215222734.5490-3-arunisaac@systemreboot.net> (raw)
In-Reply-To: <20180215222734.5490-1-arunisaac@systemreboot.net>
* 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 360e188b5..6943fd1f1 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 databases)
#:use-module (gnu packages fontutils)
@@ -305,3 +307,73 @@ development.")
;; deps/agg
(license:non-copyleft "file://deps/agg/copying")))))
+(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)
+ ("libwebp" ,libwebp)
+ ("mapnik" ,mapnik)
+ ("proj.4" ,proj.4)
+ ("python2-pycairo" ,python2-pycairo)))
+ (native-inputs
+ (let ((test-data-input
+ (lambda (repository version hash)
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mapnik/" repository
+ "/archive/v" version ".tar.gz"))
+ (file-name (string-append "python-mapnik-" repository
+ "-" version ".tar.gz"))
+ (sha256 (base32 hash))))))
+ `(("python2-nose" ,python2-nose)
+ ;; Test data is released as separate tarballs
+ ("test-data"
+ ,(test-data-input "test-data" "3.0.18"
+ "10cvgn5gxn8ldrszj24zr1vzm5w76kqk4s7bl2zzp5yvkhh8lj1n"))
+ ("test-data-visual"
+ ,(test-data-input "test-data-visual" "3.0.18"
+ "1cb9ghy8sis0w5fkp0dvwxdqqx44rhs9a9w8g9r9i7md1c40r80i")))))
+ (arguments
+ `(#:python ,python-2 ; Python 3 support is incomplete, and the build fails
+ #: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
next prev parent reply other threads:[~2018-02-15 22:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 16:29 [bug#30456] [PATCH 1/2] gnu: Add mapnik Arun Isaac
2018-02-14 16:38 ` [bug#30456] [PATCH 2/2] gnu: Add python2-mapnik Arun Isaac
2018-02-14 21:12 ` Leo Famulari
2018-02-14 21:11 ` [bug#30456] [PATCH 1/2] gnu: Add mapnik Leo Famulari
2018-02-14 22:50 ` Björn Höfling
2018-02-14 23:12 ` Leo Famulari
2018-02-15 22:27 ` [bug#30456] [PATCH 0/2] Mapnik Arun Isaac
2018-02-15 22:27 ` [bug#30456] [PATCH 1/2] gnu: Add mapnik Arun Isaac
2018-02-15 22:27 ` Arun Isaac [this message]
2018-02-16 12:46 ` [bug#30456] [PATCH 0/2] Mapnik Björn Höfling
2018-02-18 12:51 ` bug#30456: " Arun Isaac
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180215222734.5490-3-arunisaac@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=30456@debbugs.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.