depot/third_party/nixpkgs/pkgs/development/python-modules/FormEncode/default.nix
Default email 5a8b500490 Project import generated by Copybara.
GitOrigin-RevId: 1ca6b0a0cc38dbba0441202535c92841dd39d1ae
2021-06-04 10:07:49 +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;
};
}