lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

python3Packages.pyowm: enable tests

+15 -14
+15 -14
pkgs/development/python-modules/pyowm/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 - , fetchPypi 3 + , fetchFromGitHub 4 + , geojson 5 + , pysocks 4 6 , pythonOlder 5 7 , requests 6 - , geojson 7 - , pysocks 8 + , pytestCheckHook 8 9 }: 9 10 10 11 buildPythonPackage rec { ··· 12 13 version = "3.2.0"; 13 14 disabled = pythonOlder "3.7"; 14 15 15 - src = fetchPypi { 16 - inherit pname version; 17 - sha256 = "sha256-o9QL2KtZdRa/uFq+tq8LDm5jRovNuma96qOSDK/hqN4="; 16 + src = fetchFromGitHub { 17 + owner = "csparpa"; 18 + repo = pname; 19 + rev = version; 20 + sha256 = "0sq8rxcgdiayl5gy4qhkvvsdq1d93sbzn0nfg8f1vr8qxh8qkfq4"; 18 21 }; 19 22 20 23 propagatedBuildInputs = [ ··· 23 26 requests 24 27 ]; 25 28 26 - # This may actually break the package. 27 - postPatch = '' 28 - substituteInPlace setup.py \ 29 - --replace "requests>=2.18.2,<2.19" "requests" 30 - ''; 29 + checkInputs = [ pytestCheckHook ]; 31 30 32 - # No tests in archive 33 - doCheck = false; 34 - pythonImportsCheck = [ "" ]; 31 + # Run only tests which don't require network access 32 + pytestFlagsArray = [ "tests/unit" ]; 33 + 34 + pythonImportsCheck = [ "pyowm" ]; 35 35 36 36 meta = with lib; { 37 37 description = "Python wrapper around the OpenWeatherMap web API"; 38 38 homepage = "https://pyowm.readthedocs.io/"; 39 39 license = licenses.mit; 40 + maintainers = with maintainers; [ fab ]; 40 41 }; 41 42 }