Merge pull request #310594 from TomaSajt/setuptools-gettext

python311Packages.setuptools-gettext: use pyproject, clean up, adopt
This commit is contained in:
Fabian Affolter 2024-05-11 09:45:12 +02:00 committed by GitHub
commit 1ebf08aaba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,16 +1,22 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
pythonAtLeast,
setuptools,
tomli,
pytestCheckHook,
gettext,
}:
buildPythonPackage rec {
pname = "setuptools-gettext";
version = "0.1.11";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
# >=3.12 doesn't work because the package depends on `distutils`
disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
src = fetchFromGitHub {
owner = "breezy-team";
@ -19,19 +25,22 @@ buildPythonPackage rec {
hash = "sha256-yLKn4wwGgRdlsISAT71lD2vkIefsTJRB+OEA030adZY=";
};
propagatedBuildInputs = [
setuptools
build-system = [ setuptools ];
dependencies = [ setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
pythonImportsCheck = [ "setuptools_gettext" ];
nativeCheckInputs = [
pytestCheckHook
gettext
];
pythonImportsCheck = [
"setuptools_gettext"
];
meta = with lib; {
meta = {
changelog = "https://github.com/breezy-team/setuptools-gettext/releases/tag/v${version}";
description = "setuptools plugin for building mo files";
homepage = "https://github.com/breezy-team/setuptools-gettext";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ tomasajt ];
};
}