3
0
Fork 0
forked from mirrors/nixpkgs

pythonPackages.ndtypes: init at unstable-2018-11-27

This commit is contained in:
Chris Ostrouchov 2018-11-27 17:42:00 -05:00
parent 7b093af342
commit 8f0ef92ab2
No known key found for this signature in database
GPG key ID: 9ED59B0AB1EAF573
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, libndtypes
, isPy27
}:
buildPythonPackage {
pname = "ndtypes";
disabled = isPy27;
inherit (libndtypes) version src meta;
propagatedBuildInputs = [ numpy ];
postPatch = ''
substituteInPlace setup.py \
--replace 'include_dirs = ["libndtypes"]' \
'include_dirs = ["${libndtypes}/include"]' \
--replace 'library_dirs = ["libndtypes"]' \
'library_dirs = ["${libndtypes}/lib"]' \
--replace 'runtime_library_dirs = ["$ORIGIN"]' \
'runtime_library_dirs = ["${libndtypes}/lib"]'
'';
postInstall = ''
mkdir $out/include
cp python/ndtypes/*.h $out/include
'';
}

View file

@ -496,6 +496,8 @@ in {
nbval = callPackage ../development/python-modules/nbval { };
ndtypes = callPackage ../development/python-modules/ndtypes { };
nest-asyncio = callPackage ../development/python-modules/nest-asyncio { };
neuron = pkgs.neuron.override {