summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mwparserfromhell/default.nix
blob: c34d10d1a880d67399640b4973015231da362f12 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  setuptools,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "mwparserfromhell";
  version = "0.7.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "earwig";
    repo = "mwparserfromhell";
    tag = "v${version}";
    hash = "sha256-yPj272bMh/pLapc7lDgP4+AnDBpE2FrDICRUxizIcSA=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace '"pytest-runner"' ""
  '';

  build-system = [
    setuptools
    setuptools-scm
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "mwparserfromhell" ];

  meta = {
    description = "Parser for MediaWiki wikicode";
    homepage = "https://mwparserfromhell.readthedocs.io/";
    changelog = "https://github.com/earwig/mwparserfromhell/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}