1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pytestCheckHook,
7 mock,
8 six,
9 isPyPy,
10}:
11
12buildPythonPackage rec {
13 pname = "sure";
14 version = "2.0.1";
15 pyproject = true;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-yPxvq8Dn9phO6ruUJUDkVkblvvC7mf5Z4C2mNOTUuco=";
20 };
21
22 postPatch = ''
23 substituteInPlace setup.cfg \
24 --replace "rednose = 1" "" \
25 --replace-fail "--cov=sure" ""
26 '';
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 mock
32 six
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 mock
38 ];
39
40 disabledTestPaths = [
41 "tests/test_old_api.py" # require nose
42 ];
43
44 disabledTests = lib.optionals (isPyPy) [
45 # test extension of 'dict' object is broken
46 "test_should_compare_dict_with_non_orderable_key_types"
47 "test_should_compare_dict_with_enum_keys"
48 ];
49
50 pythonImportsCheck = [ "sure" ];
51
52 meta = {
53 description = "Utility belt for automated testing";
54 mainProgram = "sure";
55 homepage = "https://sure.readthedocs.io/";
56 changelog = "https://github.com/gabrielfalcao/sure/blob/v${version}/CHANGELOG.md";
57 license = lib.licenses.gpl3Plus;
58 maintainers = with lib.maintainers; [ sigmanificient ];
59 };
60}