From ea7b4a528767ce9d1dce48de4d56e8e3485c4df0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 3 Jun 2023 21:28:04 +0000 Subject: [PATCH 1/2] python310Packages.pyopencl: 2022.3.1 -> 2023.1 --- pkgs/development/python-modules/pyopencl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index 8a233014155f..ed5d40843e0a 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -22,7 +22,7 @@ let if stdenv.isDarwin then [ mesa_drivers.dev ] else [ ocl-icd ]; in buildPythonPackage rec { pname = "pyopencl"; - version = "2022.3.1"; + version = "2023.1"; nativeCheckInputs = [ pytest ]; buildInputs = [ opencl-headers pybind11 ] ++ os-specific-buildInputs; @@ -40,7 +40,7 @@ in buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-Sj2w/mG1zclSZ1Jt7r1xp+HXlWlNSw/idh8GMLzKNiE="; + hash = "sha256-2d5gcnKRmlB6nCTD3+7q/nLAX3zWyeN7IRno7jxTqJE="; }; # py.test is not needed during runtime, so remove it from `install_requires` From 063696f828b053d053f3add8417b96b76a5fc98f Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 4 Jun 2023 04:20:00 +0000 Subject: [PATCH 2/2] python310Packages.pyopencl: use pyproject format --- .../python-modules/pyopencl/default.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index ed5d40843e0a..03549ea2977d 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -13,7 +13,9 @@ , platformdirs , pybind11 , pytest +, pytestCheckHook , pytools +, setuptools , six }: @@ -24,7 +26,15 @@ in buildPythonPackage rec { pname = "pyopencl"; version = "2023.1"; - nativeCheckInputs = [ pytest ]; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-2d5gcnKRmlB6nCTD3+7q/nLAX3zWyeN7IRno7jxTqJE="; + }; + + nativeBuildInputs = [ setuptools ]; + buildInputs = [ opencl-headers pybind11 ] ++ os-specific-buildInputs; propagatedBuildInputs = [ @@ -38,15 +48,7 @@ in buildPythonPackage rec { six ]; - src = fetchPypi { - inherit pname version; - hash = "sha256-2d5gcnKRmlB6nCTD3+7q/nLAX3zWyeN7IRno7jxTqJE="; - }; - - # py.test is not needed during runtime, so remove it from `install_requires` - postPatch = '' - substituteInPlace setup.py --replace "pytest>=2" "" - ''; + nativeCheckInputs = [ pytestCheckHook ]; preBuild = '' export HOME=$(mktemp -d) @@ -55,6 +57,8 @@ in buildPythonPackage rec { # gcc: error: pygpu_language_opencl.cpp: No such file or directory doCheck = false; + pythonImportsCheck = [ "pyopencl" ]; + meta = with lib; { description = "Python wrapper for OpenCL"; homepage = "https://github.com/pyopencl/pyopencl";