Skip to content

Commit

Permalink
python311Packages.pyopencl: 2024.2.6 -> 2024.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Aug 23, 2024
1 parent 52ab6fa commit f990b5a
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions pkgs/development/python-modules/pyopencl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,39 @@
nanobind,

# dependencies
appdirs,
cffi,
darwin,
decorator,
mako,
numpy,
ocl-icd,
oldest-supported-numpy,
opencl-headers,
platformdirs,
pybind11,
pytestCheckHook,
pytools,
six,

# tests
pytestCheckHook,
}:

let
os-specific-buildInputs = if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.OpenCL ] else [ ocl-icd ];
in
buildPythonPackage rec {
pname = "pyopencl";
version = "2024.2.6";
format = "pyproject";
version = "2024.2.7";
pyproject = true;

src = fetchFromGitHub {
owner = "inducer";
repo = "pyopencl";
rev = "refs/tags/v${version}";
hash = "sha256-nP7ZAGeRXrjqDRWlc2SDP1hk1fseGeu9Zx0lOp9Pchs=";
fetchSubmodules = true;
hash = "sha256-VeaEDYnGfMYf9/WqMIZ9g4KounD48eWF3Romt79RMEQ=";
};

nativeBuildInputs = [
build-system = [
cmake
nanobind
ninja
numpy
oldest-supported-numpy
pathspec
scikit-build-core
];
Expand All @@ -60,32 +56,36 @@ buildPythonPackage rec {
pybind11
] ++ os-specific-buildInputs;

propagatedBuildInputs = [
appdirs
cffi
decorator
mako
dependencies = [
numpy
platformdirs
pytools
six
];

nativeCheckInputs = [ pytestCheckHook ];

preBuild = ''
preCheck = ''
export HOME=$(mktemp -d)
rm -rf pyopencl
# import from $out
rm -r pyopencl
'';

# gcc: error: pygpu_language_opencl.cpp: No such file or directory
# pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR
doCheck = false;

pythonImportsCheck = [ "pyopencl" ];
pythonImportsCheck = [
"pyopencl"
"pyopencl.array"
"pyopencl.cltypes"
"pyopencl.elementwise"
"pyopencl.tools"
];

meta = with lib; {
changelog = "https://github.com/inducer/pyopencl/releases/tag/v${version}";
description = "Python wrapper for OpenCL";
homepage = "https://github.com/pyopencl/pyopencl";
homepage = "https://github.com/inducer/pyopencl";
license = licenses.mit;
};
}

0 comments on commit f990b5a

Please sign in to comment.