2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
regex,
|
|
|
|
setuptools-scm,
|
2021-10-17 02:12:59 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "titlecase";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "2.4";
|
2021-10-17 02:12:59 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ppannuto";
|
|
|
|
repo = "python-titlecase";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-aJbbfNnQvmmYPXVOO+xx7ADetsxE+jnVQOVDzV5jUp8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ regex ];
|
2021-10-17 02:12:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "titlecase/tests.py" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "titlecase" ];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-10-17 02:12:59 +00:00
|
|
|
description = "Python library to capitalize strings as specified by the New York Times";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "titlecase";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ppannuto/python-titlecase";
|
2021-08-27 14:25:00 +00:00
|
|
|
license = licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|