From 6e4f17b5e65dbfa95a5245259f64ce46156261ca Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 25 Aug 2021 09:13:31 +0200 Subject: [PATCH 1/2] python3Packages.codecov: 2.1.11 -> 2.1.12 --- .../python-modules/codecov/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/codecov/default.nix b/pkgs/development/python-modules/codecov/default.nix index 2e8cbf29220c..3b7ca324fd2c 100644 --- a/pkgs/development/python-modules/codecov/default.nix +++ b/pkgs/development/python-modules/codecov/default.nix @@ -1,17 +1,26 @@ -{ lib, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }: +{ lib +, buildPythonPackage +, fetchPypi +, requests +, coverage +, unittest2 +}: buildPythonPackage rec { pname = "codecov"; - version = "2.1.11"; + version = "2.1.12"; src = fetchPypi { inherit pname version; - sha256 = "6cde272454009d27355f9434f4e49f238c0273b216beda8472a65dc4957f473b"; + sha256 = "sha256-oNpGu1AlQm2ola+Qk43vjuEtN/y8u7wVttxkz368UcE="; }; - checkInputs = [ unittest2 ]; # Tests only + propagatedBuildInputs = [ + requests + coverage + ]; - propagatedBuildInputs = [ requests coverage ]; + checkInputs = [ unittest2 ]; postPatch = '' sed -i 's/, "argparse"//' setup.py @@ -24,5 +33,6 @@ buildPythonPackage rec { description = "Python report uploader for Codecov"; homepage = "https://codecov.io/"; license = licenses.asl20; + maintainers = with maintainers; [ fab ]; }; } From 5a877797cac56da66cb828ad444ecb788e43cbd9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 25 Aug 2021 09:24:59 +0200 Subject: [PATCH 2/2] python3Packages.codecov: enable tests --- .../python-modules/codecov/default.nix | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/codecov/default.nix b/pkgs/development/python-modules/codecov/default.nix index 3b7ca324fd2c..20c80872fd0f 100644 --- a/pkgs/development/python-modules/codecov/default.nix +++ b/pkgs/development/python-modules/codecov/default.nix @@ -1,18 +1,22 @@ { lib , buildPythonPackage -, fetchPypi -, requests , coverage -, unittest2 +, ddt +, fetchFromGitHub +, mock +, pytestCheckHook +, requests }: buildPythonPackage rec { pname = "codecov"; version = "2.1.12"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-oNpGu1AlQm2ola+Qk43vjuEtN/y8u7wVttxkz368UcE="; + src = fetchFromGitHub { + owner = "codecov"; + repo = "codecov-python"; + rev = "v${version}"; + sha256 = "0bdk1cp3hxydpx9knqfv88ywwzw7yqhywi0inxjd6x53qh75prqy"; }; propagatedBuildInputs = [ @@ -20,14 +24,22 @@ buildPythonPackage rec { coverage ]; - checkInputs = [ unittest2 ]; + checkInputs = [ + ddt + mock + pytestCheckHook + ]; - postPatch = '' - sed -i 's/, "argparse"//' setup.py - ''; + pytestFlagsArray = [ "tests/test.py" ]; - # No tests in archive - doCheck = false; + disabledTests = [ + # No git repo available and network + "test_bowerrc_none" + "test_prefix" + "test_send" + ]; + + pythonImportsCheck = [ "codecov" ]; meta = with lib; { description = "Python report uploader for Codecov";