a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
52 lines
955 B
Nix
52 lines
955 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, regex
|
|
, setuptools-scm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "titlecase";
|
|
version = "2.3";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ppannuto";
|
|
repo = "python-titlecase";
|
|
rev = "v${version}";
|
|
sha256 = "169ywzn5wfzwyknqavspkdpwbx31nycxsxkl7iywwk71gs1lskkw";
|
|
};
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
regex
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"titlecase/tests.py"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"titlecase"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library to capitalize strings as specified by the New York Times";
|
|
homepage = "https://github.com/ppannuto/python-titlecase";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|