From fcd53ad43a7ae2477e47ec141b8727e0b2651157 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 21:02:03 +0100 Subject: [PATCH] python3Packages.pyversasense: init at 0.0.6 --- .../python-modules/pyversasense/default.nix | 57 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/python-modules/pyversasense/default.nix diff --git a/pkgs/development/python-modules/pyversasense/default.nix b/pkgs/development/python-modules/pyversasense/default.nix new file mode 100644 index 000000000000..f462deedd48c --- /dev/null +++ b/pkgs/development/python-modules/pyversasense/default.nix @@ -0,0 +1,57 @@ +{ lib +, aiohttp +, asynctest +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyversasense"; + version = "0.0.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "imstevenxyz"; + repo = pname; + rev = "v${version}"; + sha256 = "vTaDEwImWDMInwti0Jj+j+RFEtXOOKtiH5wOMD6ZmJk="; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + asynctest + pytest-asyncio + pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests/test.py" + ]; + + disabledTests = [ + # Tests are not properly mocking network requests + "test_device_mac" + "test_peripheral_id" + "test_peripheral_measurements" + "test_samples" + ]; + + pythonImportsCheck = [ + "pyversasense" + ]; + + meta = with lib; { + description = "Python library to communicate with the VersaSense API"; + homepage = "https://github.com/imstevenxyz/pyversasense"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..c12687b3fab4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7839,6 +7839,8 @@ in { pyverilog = callPackage ../development/python-modules/pyverilog { }; + pyversasense = callPackage ../development/python-modules/pyversasense { }; + pyvesync = callPackage ../development/python-modules/pyvesync { }; pyvex = callPackage ../development/python-modules/pyvex { };