nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python310Packages.fire: switch to pytestCheckHook

- disable on unsupported Python release
- add pythonImportsCheck

authored by

Fabian Affolter and committed by
Frederik Rietdijk
16ddcfeb 4e60551c

+19 -11
+19 -11
pkgs/development/python-modules/fire/default.nix
··· 5 5 , hypothesis 6 6 , mock 7 7 , python-Levenshtein 8 - , pytest 8 + , pytestCheckHook 9 9 , termcolor 10 - , isPy27 11 - , enum34 10 + , pythonOlder 12 11 }: 13 12 14 13 buildPythonPackage rec { 15 14 pname = "fire"; 16 15 version = "0.5.0"; 16 + format = "setuptools"; 17 + 18 + disabled = pythonOlder "3.7"; 17 19 18 20 src = fetchFromGitHub { 19 21 owner = "google"; ··· 24 22 hash = "sha256-cwY1RRNtpAn6LnBASQLTNf4XXSPnfhOa1WgglGEM2/s="; 25 23 }; 26 24 27 - propagatedBuildInputs = [ six termcolor ] ++ lib.optional isPy27 enum34; 25 + propagatedBuildInputs = [ 26 + six 27 + termcolor 28 + ]; 28 29 29 - checkInputs = [ hypothesis mock python-Levenshtein pytest ]; 30 + checkInputs = [ 31 + hypothesis 32 + mock 33 + python-Levenshtein 34 + pytestCheckHook 35 + ]; 30 36 31 - # ignore test which asserts exact usage statement, default behavior 32 - # changed in python3.8. This can likely be remove >=0.3.1 33 - checkPhase = '' 34 - py.test -k 'not testInitRequiresFlag' 35 - ''; 37 + pythonImportsCheck = [ 38 + "fire" 39 + ]; 36 40 37 41 meta = with lib; { 38 42 description = "A library for automatically generating command line interfaces"; ··· 60 52 REPL with the modules and variables you'll need already imported 61 53 and created. 62 54 ''; 63 - homepage "https://github.com/google/python-fire"; 55 + homepage = "https://github.com/google/python-fire"; 64 56 changelog = "https://github.com/google/python-fire/releases/tag/v${version}"; 65 57 license = licenses.asl20; 66 58 maintainers = with maintainers; [ leenaars ];