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