depot/third_party/nixpkgs/pkgs/development/python-modules/titlecase/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

42 lines
909 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
regex,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "titlecase";
version = "2.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ppannuto";
repo = "python-titlecase";
rev = "refs/tags/v${version}";
hash = "sha256-aJbbfNnQvmmYPXVOO+xx7ADetsxE+jnVQOVDzV5jUp8=";
};
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";
mainProgram = "titlecase";
homepage = "https://github.com/ppannuto/python-titlecase";
license = licenses.mit;
maintainers = [ ];
};
}