[PATCH] gnu: Add python-shapely and python2-shapely.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 7 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20180115013117.31644-1-kkebreau@posteo.net
* gnu/packages/python.scm (python-shapely, python2-shapely): New variables.
---
gnu/packages/python.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)

Toggle diff (77 lines)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0b582e6b7..17422673f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -41,7 +41,7 @@
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
@@ -76,6 +76,7 @@
#:use-module (gnu packages file)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
+ #:use-module (gnu packages geo)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -470,6 +471,53 @@ pidof, tty, taskset, pmap.")
(define-public python2-psutil
(package-with-python2 python-psutil))
+(define-public python-shapely
+ (package
+ (name "python-shapely")
+ (version "1.6.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Shapely" version))
+ (sha256
+ (base32
+ "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-pyqt" ,python-pyqt)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (inputs
+ `(("geos" ,geos)))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-geos-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((geos (assoc-ref inputs "geos"))
+ (glibc (assoc-ref inputs ,(if (%current-target-system)
+ "cross-libc" "libc"))))
+ (substitute* "shapely/geos.py"
+ (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
+ (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
+ geos "/lib/libgeos_c.so'])"))
+ (("free = load_dll\\('c'\\)\\.free")
+ (string-append "free = load_dll('c', fallbacks=['"
+ glibc "/lib/libc.so.6']).free"))))
+ #t)))))
+ (home-page
+ "https://github.com/Toblerity/Shapely")
+ (synopsis "Library for the manipulation and analysis of geometric objects")
+ (description "Geometric objects, predicates, and operations")
+ (license license:bsd-3)))
+
+(define-public python2-shapely
+ (package-with-python2 python-shapely))
+
(define-public python-clyent
(package
(name "python-clyent")
--
2.15.1
Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 30117@debbugs.gnu.org)
87y3kx50li.fsf@gnu.org
Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/python.scm (python-shapely, python2-shapely): New variables.

[...]

Toggle quote (5 lines)
> + (home-page
> + "https://github.com/Toblerity/Shapely")
> + (synopsis "Library for the manipulation and analysis of geometric objects")
> + (description "Geometric objects, predicates, and operations")

Please make it a full sentence. :-)

Otherwise LGTM, thanks!

Ludo’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 30117-done@debbugs.gnu.org)
878tcxwdh5.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (18 lines)
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> * gnu/packages/python.scm (python-shapely, python2-shapely): New variables.
>
> [...]
>
>> + (home-page
>> + "https://github.com/Toblerity/Shapely")
>> + (synopsis "Library for the manipulation and analysis of geometric
>> objects")
>> + (description "Geometric objects, predicates, and operations")
>
> Please make it a full sentence. :-)
>
> Otherwise LGTM, thanks!
>
> Ludo’.

Pushed to master with appropriate changes. Thanks for reviewing!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlpelMYACgkQ5qXuPBlG
eg3nxxAAuAm2qo1uqnc+TIfQNmGz8UDyaBsqDOSGD4xW1rzI/Y/9QP8/xpDvnzmP
9BlqSzWRWh3KAH/gdSNfEKv+oq/pXJfsA7tKvOjwQCFAW2UQc+dzsvipbfWGF6St
jaCU9kvALuW3K/1iz7i9OKmuxg5Wb9i7buAUVZ4xDyPEV21BhoLfYlbmp4bedkj1
m3i/2GKk7nAi/aXYa6xkWi8kald9OLuAaParcDYfm3MWqo2VeUghWhK6lyV9lTU8
8O+2HwNApw5EWdqJE3zUf2sf1hhAICnL/8zD933SWbhSg8Ch/V0ndMzpXZNGGoAU
5LFOIXMhDpQIWR5CGYG+Ww73ZEWXoxsztd2aDhfSFzHI6bYWW5eLMfqBS6fikAFF
+fWGSl0G4O2G23949myU4laKUCSSrd4WstpG8wHMM9V3R6wrsk9jbSB3dOWNBdbD
M2R8bVV+nEKqFIbXdCXFGhhjyVbuU3vDY/lQpPURzHPh0mhh+sujihqtDiu9CtUW
aKdgFik28ocAw9iFPaY3s04sOmMG5dteTmf021IYXqqO4uACkuX2QE7p6Hkf3Ofr
uf0zRUNhaLsa4CmKYBeyBwKjkJ/TPjE5m4WZB3YawzTHQha38zqT4OFUByeWA2fo
tGkb4ydOQWj+U0sBptleTto9Ay3HpeFlsU/RqB6d0HyNTBF96FY=
=AYri
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 30117@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 30117
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help