python3Packages.androguard: drop nose dependency
This commit is contained in:
parent
5612d94418
commit
5b2c9211a3
@ -15,8 +15,7 @@
|
|||||||
ipython,
|
ipython,
|
||||||
pyqt5,
|
pyqt5,
|
||||||
pyperclip,
|
pyperclip,
|
||||||
nose,
|
pytestCheckHook,
|
||||||
nose-timer,
|
|
||||||
mock,
|
mock,
|
||||||
python-magic,
|
python-magic,
|
||||||
codecov,
|
codecov,
|
||||||
@ -25,11 +24,12 @@
|
|||||||
# This is usually used as a library, and it'd be a shame to force the GUI
|
# This is usually used as a library, and it'd be a shame to force the GUI
|
||||||
# libraries to the closure if GUI is not desired.
|
# libraries to the closure if GUI is not desired.
|
||||||
withGui ? false,
|
withGui ? false,
|
||||||
# Tests take a very long time, and currently fail, but next release' tests
|
# Deprecated in 24.11.
|
||||||
# shouldn't fail
|
doCheck ? true,
|
||||||
doCheck ? false,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert lib.warnIf (!doCheck) "python3Packages.androguard: doCheck is deprecated" true;
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "androguard";
|
pname = "androguard";
|
||||||
version = "3.4.0a1";
|
version = "3.4.0a1";
|
||||||
@ -42,7 +42,10 @@ buildPythonPackage rec {
|
|||||||
sha256 = "1aparxiq11y0hbvkayp92w684nyxyyx7mi0n1x6x51g5z6c58vmy";
|
sha256 = "1aparxiq11y0hbvkayp92w684nyxyyx7mi0n1x6x51g5z6c58vmy";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./drop-removed-networkx-formats.patch ];
|
patches = [
|
||||||
|
./drop-removed-networkx-formats.patch
|
||||||
|
./fix-tests.patch
|
||||||
|
];
|
||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
@ -69,23 +72,17 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
codecov
|
codecov
|
||||||
coverage
|
coverage
|
||||||
mock
|
mock
|
||||||
nose
|
|
||||||
nose-timer
|
|
||||||
pyperclip
|
pyperclip
|
||||||
pyqt5
|
pyqt5
|
||||||
python-magic
|
python-magic
|
||||||
];
|
];
|
||||||
inherit doCheck;
|
|
||||||
|
|
||||||
# If it won't be verbose, you'll see nothing going on for a long time.
|
# If it won't be verbose, you'll see nothing going on for a long time.
|
||||||
checkPhase = ''
|
pytestFlagsArray = [ "--verbose" ];
|
||||||
runHook preCheck
|
|
||||||
nosetests --verbosity=3
|
|
||||||
runHook postCheck
|
|
||||||
'';
|
|
||||||
|
|
||||||
preFixup = lib.optionalString withGui ''
|
preFixup = lib.optionalString withGui ''
|
||||||
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
||||||
|
13
pkgs/development/python-modules/androguard/fix-tests.patch
Normal file
13
pkgs/development/python-modules/androguard/fix-tests.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/tests/test_types.py b/tests/test_types.py
|
||||||
|
index 127dfc20eb..f1c89f0712 100644
|
||||||
|
--- a/tests/test_types.py
|
||||||
|
+++ b/tests/test_types.py
|
||||||
|
@@ -182,7 +182,7 @@
|
||||||
|
for i in filter(lambda x: 'const' in x.get_name(), method.get_instructions()):
|
||||||
|
i.show(0)
|
||||||
|
# ins should only have one literal
|
||||||
|
- self.assertEquals(len(i.get_literals()), 1)
|
||||||
|
+ self.assertEqual(len(i.get_literals()), 1)
|
||||||
|
|
||||||
|
fmt, value = VALUES[method.full_name].pop(0)
|
||||||
|
converted = format_value(i.get_literals()[0], i, fmt)
|
Loading…
Reference in New Issue
Block a user