python311Packages.palace: fix build, refactor

This commit is contained in:
Martin Weinelt 2024-03-27 03:44:52 +01:00
parent e4156a9b61
commit 86fcd19953
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1,11 +1,19 @@
{ lib, buildPythonPackage, fetchFromSourcehut, pythonOlder { lib
, cmake, cython, alure2, typing-extensions , buildPythonPackage
, fetchFromSourcehut
, pythonOlder
, cmake
, cython_0
, setuptools
, alure2
, typing-extensions
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "palace"; pname = "palace";
version = "0.2.5"; version = "0.2.5";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchFromSourcehut { src = fetchFromSourcehut {
@ -21,15 +29,20 @@ buildPythonPackage rec {
--replace IMPORTED_LOCATION_NOCONFIG IMPORTED_LOCATION_RELEASE --replace IMPORTED_LOCATION_NOCONFIG IMPORTED_LOCATION_RELEASE
''; '';
build-system = [
cmake
cython_0
setuptools
];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
nativeBuildInputs = [ cmake ]; propagatedBuildInputs = [
buildInputs = [ cython ]; alure2
propagatedBuildInputs = [ alure2 ] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
]; ];
doCheck = false; # FIXME: tests need an audio device doCheck = false; # FIXME: tests need an audio device
pythonImportsCheck = [ "palace" ]; pythonImportsCheck = [ "palace" ];
meta = with lib; { meta = with lib; {