about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorambrop7@gmail.com <Ambroz Bizjak>2014-08-20 22:03:28 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2014-08-22 21:57:14 +0200
commit85164955608e23d931ddb731e00391741db7ecf3 (patch)
tree11cf459d2489586f6ce08c1ea6fc5cdf2ea1796e /pkgs
parent896ef91242afbad24c9885c97e3916d35b4fe932 (diff)
downloadnixlib-85164955608e23d931ddb731e00391741db7ecf3.tar
nixlib-85164955608e23d931ddb731e00391741db7ecf3.tar.gz
nixlib-85164955608e23d931ddb731e00391741db7ecf3.tar.bz2
nixlib-85164955608e23d931ddb731e00391741db7ecf3.tar.lz
nixlib-85164955608e23d931ddb731e00391741db7ecf3.tar.xz
nixlib-85164955608e23d931ddb731e00391741db7ecf3.tar.zst
nixlib-85164955608e23d931ddb731e00391741db7ecf3.zip
python-pyuv: new package
Pyuv is a Python interface to libuv, a cross-platform asychronous I/O
library.

The setup.py is tweaked to that the system version of libuv is used,
instead of tying to fetch one with git.

[Bjørn: change commit message]
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pyuv-external-libuv.patch27
-rw-r--r--pkgs/top-level/python-packages.nix20
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyuv-external-libuv.patch b/pkgs/development/python-modules/pyuv-external-libuv.patch
new file mode 100644
index 000000000000..33539d9b4b2c
--- /dev/null
+++ b/pkgs/development/python-modules/pyuv-external-libuv.patch
@@ -0,0 +1,27 @@
+diff --git a/setup.py b/setup.py
+index ec0caac..2c1fdb6 100644
+--- a/setup.py
++++ b/setup.py
+@@ -6,7 +6,6 @@ try:
+     from setuptools import setup, Extension
+ except ImportError:
+     from distutils.core import setup, Extension
+-from setup_libuv import libuv_build_ext, libuv_sdist
+ 
+ 
+ __version__ = "0.11.5"
+@@ -32,12 +31,11 @@ setup(name             = "pyuv",
+           "Programming Language :: Python :: 3.3",
+           "Programming Language :: Python :: 3.4"
+       ],
+-      cmdclass     = {'build_ext': libuv_build_ext,
+-                      'sdist'    : libuv_sdist},
+       ext_modules  = [Extension('pyuv',
+                                 sources = ['src/pyuv.c'],
++                                libraries = ['uv'],
+                                 define_macros=[('MODULE_VERSION', __version__),
+-                                               ('LIBUV_REVISION', libuv_build_ext.libuv_revision)]
++                                               ('LIBUV_REVISION', 'unknown')]
+                      )]
+      )
+ 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d42897857c1a..f7e3bf3c2ca9 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -8248,6 +8248,26 @@ rec {
     };
   });
 
+  pyuv = buildPythonPackage rec {
+    name = "pyuv-0.11.5";
+
+    src = fetchurl {
+      url = "https://github.com/saghul/pyuv/archive/${name}.tar.gz";
+      sha256 = "c251952cb4e54c92ab0e871decd13cf73d11ca5dba9f92962de51d12e3a310a9";
+    };
+
+    patches = [ ../development/python-modules/pyuv-external-libuv.patch ];
+
+    buildInputs = [ pkgs.libuvVersions.v0_11_29 ];
+
+    meta = {
+      description = "Python interface for libuv";
+      homepage = https://github.com/saghul/pyuv;
+      repositories.git = git://github.com/saghul/pyuv.git;
+      license = licenses.mit;
+    };
+  };
+
   virtualenv = buildPythonPackage rec {
     name = "virtualenv-1.11.6";
     src = fetchurl {