python310Packages.fairscale: remove ninja ref

This commit is contained in:
happysalada 2023-07-17 07:45:37 +09:00 committed by Yt
parent 79d1725759
commit d8b8bf09f9

View file

@ -2,6 +2,7 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonOlder , pythonOlder
, setuptools
# build inputs # build inputs
, torch , torch
, numpy , numpy
@ -19,7 +20,7 @@ let
in in
buildPythonPackage { buildPythonPackage {
inherit pname version; inherit pname version;
format = "setuptools"; format = "pyproject";
disabled = pythonOlder "3.10"; disabled = pythonOlder "3.10";
@ -30,10 +31,16 @@ buildPythonPackage {
hash = "sha256-L2Rl/qL6l0OLAofygzJBGQdp/2ZrgDFarwZRjyAR3dw="; hash = "sha256-L2Rl/qL6l0OLAofygzJBGQdp/2ZrgDFarwZRjyAR3dw=";
}; };
nativeBuildInputs = [ ninja ]; # setup.py depends on ninja python dependency, but we have the binary in nixpkgs
dontUseNinjaBuild = true; postPatch = ''
dontUseNinjaInstall = true; substituteInPlace setup.py \
dontUseNinjaCheck = true; --replace 'setup_requires=["ninja"]' 'setup_requires=[]'
'';
nativeBuildInputs = [
ninja
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
torch torch