about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dynd/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/python-modules/dynd/default.nix
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dynd/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/dynd/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dynd/default.nix b/nixpkgs/pkgs/development/python-modules/dynd/default.nix
new file mode 100644
index 000000000000..8d8fbf7a7cef
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/dynd/default.nix
@@ -0,0 +1,43 @@
+{ stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, isPyPy
+, isPy3k
+, cython
+, numpy
+, pkgs
+}:
+
+buildPythonPackage rec {
+  version = "0.7.2";
+  pname = "dynd";
+  disabled = isPyPy || !isPy3k; # tests fail on python2, 2018-04-11
+
+  src = pkgs.fetchFromGitHub {
+    owner = "libdynd";
+    repo = "dynd-python";
+    rev = "v${version}";
+    sha256 = "19igd6ibf9araqhq9bxmzbzdz05vp089zxvddkiik3b5gb7l17nh";
+  };
+
+  # setup.py invokes git on build but we're fetching a tarball, so
+  # can't retrieve git version. We hardcode:
+  preConfigure = ''
+    substituteInPlace setup.py --replace "ver = check_output(['git', 'describe', '--dirty'," "ver = '${version}'"
+    substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" ""
+  '';
+
+  # Python 3 works but has a broken import test that I couldn't
+  # figure out.
+  doCheck = !isPy3k;
+  buildInputs = [ pkgs.cmake pkgs.libdynd.dev cython ];
+  propagatedBuildInputs = [ numpy pkgs.libdynd ];
+
+  meta = with stdenv.lib; {
+    homepage = http://libdynd.org;
+    license = licenses.bsd2;
+    description = "Python exposure of dynd";
+    maintainers = with maintainers; [ teh ];
+  };
+
+}