summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/formencode/default.nix
blob: 71625b5d7ba349d89f1753ed6726e2baeb3f7c62 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools-scm,
  six,
  dnspython,
  legacy-cgi,
  pycountry,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "formencode";
  version = "2.1.1";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-4X8WGZ0jLlT2eRIATzrTM827uBoaGhAjis8JurmfkZk=";
  };

  postPatch = ''
    sed -i '/setuptools_scm_git_archive/d' setup.py
  '';

  build-system = [ setuptools-scm ];

  dependencies = [
    six
    legacy-cgi
  ];

  nativeCheckInputs = [
    dnspython
    pycountry
    pytestCheckHook
  ];

  disabledTests = [
    # requires network for DNS resolution
    "test_doctests"
    "test_unicode_ascii_subgroup"
  ];

  meta = {
    description = "FormEncode validates and converts nested structures";
    homepage = "http://formencode.org";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}