[bug#33451] Add python-pylibmc (and dependencies)

Message ID 871s7foymu.fsf@gmail.com
State Accepted
Headers show
Series [bug#33451] Add python-pylibmc (and dependencies) | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Maxim Cournoyer Nov. 21, 2018, 4:14 a.m. UTC
Hello Guix!

This adds python-pylibmc, and its direct dependency libmemcached. I also
finally found some use for a Bazaar downloader which I had made a long time ago.

Thank you,

Comments

Maxim Cournoyer May 9, 2019, 4:37 a.m. UTC | #1
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello Guix!
>
> This adds python-pylibmc, and its direct dependency libmemcached. I also
> finally found some use for a Bazaar downloader which I had made a long time ago.
>
> Thank you,

I went ahead and merged this long-standing patch series, having rebuilt it
cleanly atop master and after slightly modifying the bzr-fetch builder
to use invoke rather than system*.

Closing.

Maxim

Patch

From a29c83aa95095705a9be7e152601895145a467a8 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 20 Nov 2018 23:12:23 -0500
Subject: [PATCH 3/3] gnu: Add python-pylibmc.

* gnu/packages/databases.scm (python-pylibmc, python2-pylibmc): New variables.
---
 gnu/packages/databases.scm | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 71c267281..07eb871de 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -505,6 +505,45 @@  the API, and provides features such as:
 @end itemize")
     (license license:bsd-3)))
 
+(define-public python-pylibmc
+  (package
+    (name "python-pylibmc")
+    (version "1.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pylibmc" version))
+       (sha256
+        (base32
+         "1n6nvvhl0g52gpzzwdj1my6049xljkfwyxxygnwda9smrbj7pyay"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'start-memcached-daemon
+           ;; The test suite requires a memcached server.
+           (lambda _
+             (invoke "memcached" "-d"))))))
+    (native-inputs
+     `(("memcached" ,memcached)
+       ("python-nose" ,python-nose)))
+    (inputs
+     `(("libmemcached" ,libmemcached)
+       ("zlib" ,zlib)
+       ("cyrus-sasl" ,cyrus-sasl)))
+    (home-page
+     "http://sendapatch.se/projects/pylibmc/")
+    (synopsis
+     "Python client for memcached")
+    (description
+     "@code{pylibmc} is a client in Python for memcached.  It is a wrapper
+around TangentOrg’s libmemcached library, and can be used as a drop-in
+replacement for the code@{python-memcached} library.")
+    (license license:bsd-3)))
+
+(define-public python2-pylibmc
+  (package-with-python2 python-pylibmc))
+
 (define-public mongodb
   (package
     (name "mongodb")
-- 
2.19.0