2021-06-03 11:09:11 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, dnspython, pycountry, nose, setuptools-scm, six, isPy27 }:
|
2017-07-09 01:01:12 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "FormEncode";
|
2020-10-11 01:33:01 +01:00
|
|
|
version = "2.0.0";
|
|
|
|
|
|
|
|
disabled = isPy27;
|
2017-07-09 01:01:12 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-11 01:33:01 +01:00
|
|
|
sha256 = "049pm276140h30xgzwylhpii24xcln1qfdlfmbj69sqpfhlr5szj";
|
2017-07-09 01:01:12 +01:00
|
|
|
};
|
|
|
|
|
2020-10-11 01:33:01 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/setuptools_scm_git_archive//' setup.py
|
|
|
|
sed -i 's/use_scm_version=.*,/version="${version}",/' setup.py
|
2017-07-09 01:01:12 +01:00
|
|
|
'';
|
|
|
|
|
2021-06-03 11:09:11 +01:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-10-11 01:33:01 +01:00
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
|
|
|
|
checkInputs = [ dnspython pycountry nose ];
|
|
|
|
|
2017-07-09 01:01:12 +01:00
|
|
|
preCheck = ''
|
2020-10-11 01:33:01 +01:00
|
|
|
# requires dns resolving
|
2017-07-09 01:01:12 +01:00
|
|
|
sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-09 01:01:12 +01:00
|
|
|
description = "FormEncode validates and converts nested structures";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://formencode.org";
|
2017-07-09 01:01:12 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|