depot/third_party/nixpkgs/pkgs/development/python-modules/FormEncode/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

34 lines
883 B
Nix

{ lib, buildPythonPackage, fetchPypi, dnspython, pycountry, nose, setuptools_scm, six, isPy27 }:
buildPythonPackage rec {
pname = "FormEncode";
version = "2.0.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "049pm276140h30xgzwylhpii24xcln1qfdlfmbj69sqpfhlr5szj";
};
postPatch = ''
sed -i 's/setuptools_scm_git_archive//' setup.py
sed -i 's/use_scm_version=.*,/version="${version}",/' setup.py
'';
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ six ];
checkInputs = [ dnspython pycountry nose ];
preCheck = ''
# requires dns resolving
sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py
'';
meta = with lib; {
description = "FormEncode validates and converts nested structures";
homepage = "http://formencode.org";
license = licenses.mit;
};
}