mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
Merge pull request #56082 from Ma27/fix-pyopencl
python3Packages.pyopencl: fix build
This commit is contained in:
commit
098cb9f63a
|
@ -1,4 +1,4 @@
|
|||
{ lib, buildPythonPackage, fetchPypi }:
|
||||
{ lib, buildPythonPackage, fetchPypi, fetchpatch }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pybind11";
|
||||
|
@ -9,6 +9,13 @@ buildPythonPackage rec {
|
|||
sha256 = "1kz1z2cg3q901q9spkdhksmcfiskaghzmbb9ivr5mva856yvnak4";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = https://github.com/pybind/pybind11/commit/44a40dd61e5178985cfb1150cf05e6bfcec73042.patch;
|
||||
sha256 = "047nzyfsihswdva96hwchnp4gj2mlbiqvmkdnhxrfi9sji8x31ka";
|
||||
})
|
||||
];
|
||||
|
||||
# Current PyPi version does not include test suite
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
, six
|
||||
, opencl-headers
|
||||
, ocl-icd
|
||||
, pybind11
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -18,7 +19,7 @@ buildPythonPackage rec {
|
|||
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 ];
|
||||
|
||||
|
@ -32,6 +33,10 @@ buildPythonPackage rec {
|
|||
substituteInPlace setup.py --replace "pytest>=2" ""
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
# gcc: error: pygpu_language_opencl.cpp: No such file or directory
|
||||
doCheck = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue