about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/titlecase/default.nix
blob: 026a033357fd208cce68606e2e8bde7a82acd05b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ 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";
    homepage = "https://github.com/ppannuto/python-titlecase";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}