Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.pyopencl: Fix build #56847

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/development/libraries/pybind11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};

nativeBuildInputs = [ cmake ];
checkInputs = with python.pkgs; [ catch eigen pytest numpy scipy ];
checkInputs = with python.pkgs; [ catch eigen pytest_3 numpy scipy ];

# Disable test_cmake_build test, as it fails in sandbox
# https://github.com/pybind/pybind11/issues/1355
Expand Down
13 changes: 9 additions & 4 deletions pkgs/development/python-modules/pyopencl/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv
, python
, fetchPypi
, buildPythonPackage
, Mako
Expand All @@ -11,14 +12,15 @@
, six
, opencl-headers
, ocl-icd
, pybind11
}:

buildPythonPackage rec {
pname = "pyopencl";
version = "2018.2.3";

checkInputs = [ pytest ];
buildInputs = [ opencl-headers ocl-icd ];
buildInputs = [ opencl-headers ocl-icd pybind11 ];

propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];

Expand All @@ -27,11 +29,14 @@ buildPythonPackage rec {
sha256 = "ebefe9505cad970dfb4c8024630ef5a546c68d22943dbb3e5677943a6d006ac6";
};

# py.test is not needed during runtime, so remove it from `install_requires`
postPatch = ''
substituteInPlace setup.py --replace "pytest>=2" ""
preBuild = ''
export HOME=$(pwd)
'';

NIX_CFLAGS_COMPILE = [
"-I${pybind11}/include/${python.libPrefix}/"
];

# gcc: error: pygpu_language_opencl.cpp: No such file or directory
doCheck = false;

Expand Down