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