python311Packages.flufl-i18n: refactor

This commit is contained in:
natsukium 2023-11-03 19:24:19 +09:00 committed by Felix Buehler
parent 97e79119f2
commit 4eea3ae9b0

View file

@ -1,21 +1,19 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, atpublic
, pdm-pep517
, pytestCheckHook
, sybil
}:
buildPythonPackage rec {
pname = "flufl-i18n";
version = "4.1.1";
format = "pyproject";
pyproject = true;
nativeBuildInputs = [ pdm-pep517 ];
propagatedBuildInputs = [ atpublic ];
doCheck = false;
pythonImportsCheck = [ "flufl.i18n" ];
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "flufl.i18n";
@ -23,6 +21,26 @@ buildPythonPackage rec {
hash = "sha256-wKz6aggkJ9YBJ+o75XjC4Ddnn+Zi9hlYDnliwTc7DNs=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=flufl --cov-report=term --cov-report=xml" ""
'';
nativeBuildInputs = [ pdm-pep517 ];
propagatedBuildInputs = [ atpublic ];
pythonImportsCheck = [ "flufl.i18n" ];
nativeCheckInputs = [
pytestCheckHook
sybil
];
pythonNamespaces = [
"flufl"
];
meta = with lib; {
description = "A high level API for internationalizing Python libraries and applications";
homepage = "https://gitlab.com/warsaw/flufl.i18n";