python3Packages.FormEncode: fix tests, refactor
This commit is contained in:
parent
6f565484b2
commit
fd2d5dd339
@ -1,4 +1,14 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, dnspython, pycountry, nose, setuptools-scm, six, isPy27 }:
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, isPy27
|
||||||
|
, fetchPypi
|
||||||
|
, nose
|
||||||
|
, setuptools-scm
|
||||||
|
, six
|
||||||
|
, dnspython
|
||||||
|
, pycountry
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "FormEncode";
|
pname = "FormEncode";
|
||||||
@ -12,23 +22,29 @@ buildPythonPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i 's/setuptools_scm_git_archive//' setup.py
|
sed -i '/setuptools_scm_git_archive/d' setup.py
|
||||||
sed -i 's/use_scm_version=.*,/version="${version}",/' setup.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools-scm ];
|
nativeBuildInputs = [ setuptools-scm ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ six ];
|
propagatedBuildInputs = [ six ];
|
||||||
|
|
||||||
checkInputs = [ dnspython pycountry nose ];
|
checkInputs = [
|
||||||
|
dnspython
|
||||||
|
pycountry
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
preCheck = ''
|
disabledTests = [
|
||||||
# requires dns resolving
|
# requires network for DNS resolution
|
||||||
sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py
|
"test_doctests"
|
||||||
'';
|
"test_unicode_ascii_subgroup"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "FormEncode validates and converts nested structures";
|
description = "FormEncode validates and converts nested structures";
|
||||||
homepage = "http://formencode.org";
|
homepage = "http://formencode.org";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user