1{ lib
2, buildPythonPackage
3, isPy27
4, fetchPypi
5, setuptools-scm
6, six
7, dnspython
8, pycountry
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "FormEncode";
14 version = "2.0.1";
15
16 disabled = isPy27;
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "8f2974112c2557839d5bae8b76490104c03830785d923abbdef148bf3f710035";
21 };
22
23 postPatch = ''
24 sed -i '/setuptools_scm_git_archive/d' setup.py
25 '';
26
27 nativeBuildInputs = [ setuptools-scm ];
28
29 propagatedBuildInputs = [ six ];
30
31 checkInputs = [
32 dnspython
33 pycountry
34 pytestCheckHook
35 ];
36
37 disabledTests = [
38 # requires network for DNS resolution
39 "test_doctests"
40 "test_unicode_ascii_subgroup"
41 ];
42
43 meta = with lib; {
44 description = "FormEncode validates and converts nested structures";
45 homepage = "http://formencode.org";
46 license = licenses.mit;
47 maintainers = with maintainers; [ ];
48 };
49}