1{ lib 2, aiohttp 3, asynctest 4, buildPythonPackage 5, fetchFromGitHub 6, pytest-asyncio 7, pytestCheckHook 8, pythonOlder 9}: 10 11buildPythonPackage rec { 12 pname = "pyversasense"; 13 version = "0.0.6"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "imstevenxyz"; 20 repo = pname; 21 rev = "v${version}"; 22 sha256 = "vTaDEwImWDMInwti0Jj+j+RFEtXOOKtiH5wOMD6ZmJk="; 23 }; 24 25 propagatedBuildInputs = [ 26 aiohttp 27 ]; 28 29 doCheck = pythonOlder "3.11"; # asynctest unsupported on python3.11 30 31 nativeCheckInputs = [ 32 asynctest 33 pytest-asyncio 34 pytestCheckHook 35 ]; 36 37 pytestFlagsArray = [ 38 "tests/test.py" 39 ]; 40 41 disabledTests = [ 42 # Tests are not properly mocking network requests 43 "test_device_mac" 44 "test_peripheral_id" 45 "test_peripheral_measurements" 46 "test_samples" 47 ]; 48 49 pythonImportsCheck = [ 50 "pyversasense" 51 ]; 52 53 meta = with lib; { 54 description = "Python library to communicate with the VersaSense API"; 55 homepage = "https://github.com/imstevenxyz/pyversasense"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}