nixpkgs/pkgs/development/python-modules/FormEncode/default.nix

35 lines
883 B
Nix
Raw Normal View History

{ 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
'';
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
'';
meta = with lib; {
2017-07-09 02:01:12 +02:00
description = "FormEncode validates and converts nested structures";
homepage = "http://formencode.org";
2017-07-09 02:01:12 +02:00
license = licenses.mit;
};
}