forked from mirrors/nixpkgs
pythonPackages.mxnet: refactor move to python-modules
This commit is contained in:
parent
f6a29fbb69
commit
f379425159
37
pkgs/development/python-modules/mxnet/default.nix
Normal file
37
pkgs/development/python-modules/mxnet/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, pkgs
|
||||
, requests
|
||||
, numpy
|
||||
, graphviz
|
||||
, python
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
inherit (pkgs.mxnet) name version src meta;
|
||||
|
||||
buildInputs = [ pkgs.mxnet ];
|
||||
propagatedBuildInputs = [ requests numpy graphviz ];
|
||||
|
||||
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ pkgs.mxnet ];
|
||||
|
||||
doCheck = !isPy3k;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace python/setup.py \
|
||||
--replace "graphviz<0.9.0" "graphviz<0.10.0" \
|
||||
--replace "numpy<=1.15.0" "numpy<1.16.0" \
|
||||
--replace "requests<2.19.0" "requests<2.20.0"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd python
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -rf $out/mxnet
|
||||
ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
|
||||
'';
|
||||
|
||||
}
|
|
@ -1439,32 +1439,7 @@ in {
|
|||
|
||||
mpyq = callPackage ../development/python-modules/mpyq { };
|
||||
|
||||
mxnet = buildPythonPackage rec {
|
||||
inherit (pkgs.mxnet) name version src meta;
|
||||
|
||||
buildInputs = [ pkgs.mxnet ];
|
||||
propagatedBuildInputs = with self; [ requests numpy graphviz ];
|
||||
|
||||
LD_LIBRARY_PATH = makeLibraryPath [ pkgs.mxnet ];
|
||||
|
||||
doCheck = !isPy3k;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace python/setup.py \
|
||||
--replace "graphviz<0.9.0" "graphviz<0.10.0" \
|
||||
--replace "numpy<=1.15.0" "numpy<1.16.0" \
|
||||
--replace "requests<2.19.0" "requests<2.20.0"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd python
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -rf $out/mxnet
|
||||
ln -s ${pkgs.mxnet}/lib/libmxnet.so $out/${python.sitePackages}/mxnet
|
||||
'';
|
||||
};
|
||||
mxnet = callPackage ../development/python-modules/mxnet { };
|
||||
|
||||
parsy = callPackage ../development/python-modules/parsy { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue