2017-12-10 03:15:45 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, dnspython, pycountry, nose }:
|
2017-07-09 02:01:12 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "FormEncode";
|
2017-07-25 23:49:54 +02:00
|
|
|
version = "1.3.1";
|
2017-07-09 02:01:12 +02:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-07-25 23:49:54 +02:00
|
|
|
sha256 = "1xm77h2mds2prlaz0z4nzkx13g61rx5c2v3vpgjq9d5ij8bzb8md";
|
2017-07-09 02:01:12 +02:00
|
|
|
};
|
|
|
|
|
2017-12-10 03:15:45 +01:00
|
|
|
buildInputs = [ dnspython pycountry nose ];
|
2017-07-09 02:01:12 +02:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
# dnspython3 has been superseded, see its PyPI page
|
|
|
|
substituteInPlace setup.py --replace dnspython3 dnspython
|
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# two tests require dns resolving
|
|
|
|
sed -i 's/test_cyrillic_email/noop/' formencode/tests/test_email.py
|
|
|
|
sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "FormEncode validates and converts nested structures";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://formencode.org;
|
2017-07-09 02:01:12 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|