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
1 changed files with 20 additions and 7 deletions

View File

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