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

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

View File

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

View File

@ -2786,6 +2786,8 @@ in {
xdis = callPackage ../development/python-modules/xdis { };
xnd = callPackage ../development/python-modules/xnd { };
uncompyle6 = callPackage ../development/python-modules/uncompyle6 { };
lsi = callPackage ../development/python-modules/lsi { };