summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mwxml/default.nix
blob: e48f938344d62242b59f0867c22aa5992cf42d6e (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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchPypi,

  # build-system
  setuptools,

  # dependencies
  jsonschema,
  mwcli,
  mwtypes,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "mwxml";
  version = "0.3.6";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-WlMYHTAhUq0D7FE/8Yaongx+H8xQx4MwRSoIcsqmOTU=";
  };

  build-system = [ setuptools ];

  dependencies = [
    jsonschema
    mwcli
    mwtypes
  ];

  pythonImportsCheck = [ "mwxml" ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # AttributeError: Can't get local object 'map.<locals>.process_path'
    "test_complex_error_handler"
  ];

  meta = {
    description = "Set of utilities for processing MediaWiki XML dump data";
    mainProgram = "mwxml";
    homepage = "https://github.com/mediawiki-utilities/python-mwxml";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}