summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-fluent/fluent-runtime.nix
blob: 1a011956ecceee614aef0c534905ed04c625b232 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  pytestCheckHook,
  setuptools,

  # dependencies
  attrs,
  babel,
  fluent-syntax,
  pytz,
  typing-extensions,
}:

let
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "projectfluent";
    repo = "python-fluent";
    rev = "fluent.runtime@${version}";
    hash = "sha256-Crg6ybweOZ4B3WfLMOcD7+TxGEZPTHJUxr8ItLB4G+Y=";
  };
in
buildPythonPackage {
  pname = "fluent-runtime";
  inherit version;
  pyproject = true;

  inherit src;
  sourceRoot = "${src.name}/fluent.runtime";

  build-system = [ setuptools ];

  dependencies = [
    attrs
    babel
    fluent-syntax
    pytz
    typing-extensions
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # https://github.com/projectfluent/python-fluent/pull/203
    "test_timeZone"
  ];

  pythonImportsCheck = [ "fluent.runtime" ];

  meta = {
    changelog = "https://github.com/projectfluent/python-fluent/blob/${src.rev}/fluent.runtime/CHANGELOG.rst";
    description = "Localization library for expressive translations";
    downloadPage = "https://github.com/projectfluent/python-fluent/releases/tag/${src.rev}";
    homepage = "https://projectfluent.org/python-fluent/fluent.runtime/${version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ getpsyched ];
  };
}