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