From d6d6dd1a68c53f61775b149100983bc00f24b7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 11 Oct 2020 02:33:01 +0200 Subject: [PATCH] FormEncode: 1.3.1 -> 2.0.0 --- .../python-modules/FormEncode/default.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/FormEncode/default.nix b/pkgs/development/python-modules/FormEncode/default.nix index f79e76b52c4..d91bef07d2a 100644 --- a/pkgs/development/python-modules/FormEncode/default.nix +++ b/pkgs/development/python-modules/FormEncode/default.nix @@ -1,24 +1,28 @@ -{ stdenv, buildPythonPackage, fetchPypi, dnspython, pycountry, nose }: +{ stdenv, buildPythonPackage, fetchPypi, dnspython, pycountry, nose, setuptools_scm, six, isPy27 }: buildPythonPackage rec { pname = "FormEncode"; - version = "1.3.1"; + version = "2.0.0"; + + disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "1xm77h2mds2prlaz0z4nzkx13g61rx5c2v3vpgjq9d5ij8bzb8md"; + sha256 = "049pm276140h30xgzwylhpii24xcln1qfdlfmbj69sqpfhlr5szj"; }; - buildInputs = [ dnspython pycountry nose ]; - - patchPhase = '' - # dnspython3 has been superseded, see its PyPI page - substituteInPlace setup.py --replace dnspython3 dnspython + 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 = '' - # two tests require dns resolving - sed -i 's/test_cyrillic_email/noop/' formencode/tests/test_email.py + # requires dns resolving sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py '';