python3Packages.manimpango: disable on older Python releases

This commit is contained in:
Fabian Affolter 2022-03-22 08:55:52 +01:00 committed by GitHub
parent 1ed1d764f6
commit 283acd1229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,37 +1,65 @@
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python, pkg-config, pango, cython, AppKit, pytestCheckHook }: { lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, python
, pkg-config
, pango
, cython
, AppKit
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "manimpango"; pname = "manimpango";
version = "0.4.1"; version = "0.4.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ManimCommunity"; owner = "ManimCommunity";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-ourSUYBAFONdupdsjo/PtwRQpXS7HqLxrHj0Ejr/Wdw="; hash = "sha256-ourSUYBAFONdupdsjo/PtwRQpXS7HqLxrHj0Ejr/Wdw=";
}; };
postPatch = '' nativeBuildInputs = [
substituteInPlace setup.cfg --replace "--cov --no-cov-on-fail" "" pkg-config
''; ];
buildInputs = [
pango
] ++ lib.optionals stdenv.isDarwin [
AppKit
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pango ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
propagatedBuildInputs = [ propagatedBuildInputs = [
cython cython
]; ];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov --no-cov-on-fail" ""
'';
preBuild = '' preBuild = ''
${python.interpreter} setup.py build_ext --inplace ${python.interpreter} setup.py build_ext --inplace
''; '';
checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [
pythonImportsCheck = [ "manimpango" ]; "manimpango"
];
meta = with lib; { meta = with lib; {
description = "Binding for Pango";
homepage = "https://github.com/ManimCommunity/ManimPango"; homepage = "https://github.com/ManimCommunity/ManimPango";
license = licenses.mit; license = licenses.mit;
description = "Binding for Pango"; maintainers = with maintainers; [ emilytrau ];
maintainers = [ maintainers.emilytrau ];
}; };
} }