summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/typogrify/default.nix
blob: 52bed72e106c8cb8265f43262136c4d633083198 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  smartypants,
  hatchling,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "typogrify";
  version = "2.1.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-8KoATpgDKm5r5MnaZefrcVDjbKO/UIrbzagrTQA+Ye4=";
  };

  build-system = [ hatchling ];

  dependencies = [ smartypants ];

  pythonImportsCheck = [ "typogrify.filters" ];

  pytestFlags = [
    "--doctest-modules"
  ];

  enabledTestPaths = [
    "typogrify/filters.py"
    "typogrify/packages/titlecase/tests.py"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    description = "Filters to enhance web typography, including support for Django & Jinja templates";
    homepage = "https://github.com/justinmayer/typogrify";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}