mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
python3Packages.getmac: switch to pytestCheckHook and fix build
This commit is contained in:
parent
8b166bcee0
commit
53b2a693f7
1 changed files with 26 additions and 8 deletions
|
@ -1,5 +1,10 @@
|
||||||
{ lib, buildPythonPackage, fetchFromGitHub
|
{ lib
|
||||||
, pytest, pytest-benchmark, pytest-mock }:
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pytest-benchmark
|
||||||
|
, pytest-mock
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "getmac";
|
pname = "getmac";
|
||||||
|
@ -7,19 +12,32 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "GhostofGoes";
|
owner = "GhostofGoes";
|
||||||
repo = "getmac";
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2";
|
sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-benchmark pytest-mock ];
|
checkInputs = [
|
||||||
checkPhase = ''
|
pytestCheckHook
|
||||||
pytest --ignore tests/test_cli.py
|
pytest-benchmark
|
||||||
'';
|
pytest-mock
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
# Disable CLI tests
|
||||||
|
"test_cli_main_basic"
|
||||||
|
"test_cli_main_verbose"
|
||||||
|
"test_cli_main_debug"
|
||||||
|
"test_cli_multiple_debug_levels"
|
||||||
|
# Disable test that require network access
|
||||||
|
"test_uuid_lanscan_iface"
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "getmac" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
description = "Python package to get the MAC address of network interfaces and hosts on the local network";
|
||||||
homepage = "https://github.com/GhostofGoes/getmac";
|
homepage = "https://github.com/GhostofGoes/getmac";
|
||||||
description = "Pure-Python package to get the MAC address of network interfaces and hosts on the local network.";
|
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ colemickens ];
|
maintainers = with maintainers; [ colemickens ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue