deepwave: 0.0.11 -> 0.0.12 (#182024)
This commit is contained in:
parent
280928ea7d
commit
e96b070d89
1 changed files with 15 additions and 5 deletions
|
@ -10,29 +10,40 @@
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
linePatch = ''
|
||||||
|
import os
|
||||||
|
os.environ['PATH'] = os.environ['PATH'] + ':${ninja}/bin'
|
||||||
|
'';
|
||||||
|
in
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "deepwave";
|
pname = "deepwave";
|
||||||
version = "0.0.11";
|
version = "0.0.12";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ar4";
|
owner = "ar4";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-d4EahmzHACHaeKoNZy63OKwWZdlHbUydrbr4fD43X8s=";
|
sha256 = "sha256-WWu0LyHlOwWMVPUy+LAszKF3VlgcqlcMlDi4oon4Dl8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# unable to find ninja although it is available, most likely because it looks for its pip version
|
# unable to find ninja although it is available, most likely because it looks for its pip version
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.cfg --replace "ninja" ""
|
substituteInPlace setup.cfg --replace "ninja" ""
|
||||||
|
|
||||||
|
# Adding ninja to the path forcibly
|
||||||
|
mv src/deepwave/__init__.py tmp
|
||||||
|
echo "${linePatch}" > src/deepwave/__init__.py
|
||||||
|
cat tmp >> src/deepwave/__init__.py
|
||||||
|
rm tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The source files are compiled at runtime and cached at the
|
# The source files are compiled at runtime and cached at the
|
||||||
# $HOME/.cache folder, so for the check phase it is needed to
|
# $HOME/.cache folder, so for the check phase it is needed to
|
||||||
# have a temporary home. This is also the reason ninja is not
|
# have a temporary home. This is also the reason ninja is not
|
||||||
# needed at the nativeBuildInputs, since it will only be used
|
# needed at the nativeBuildInputs, since it will only be used
|
||||||
# at runtime. The user will have to add it to its nix-shell
|
# at runtime.
|
||||||
# along with deepwave
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
'';
|
'';
|
||||||
|
@ -40,7 +51,6 @@ buildPythonPackage rec {
|
||||||
propagatedBuildInputs = [ pytorch pybind11 ];
|
propagatedBuildInputs = [ pytorch pybind11 ];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
ninja
|
|
||||||
which
|
which
|
||||||
scipy
|
scipy
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
|
|
Loading…
Reference in a new issue