diff options
Diffstat (limited to 'pkgs/development/python-modules/pyairvisual/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyairvisual/default.nix | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/pyairvisual/default.nix b/pkgs/development/python-modules/pyairvisual/default.nix index 58eb5f7028a..65f70efb7c5 100644 --- a/pkgs/development/python-modules/pyairvisual/default.nix +++ b/pkgs/development/python-modules/pyairvisual/default.nix @@ -1,30 +1,57 @@ -{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, requests -, requests-mock, pytest +{ lib +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, numpy +, poetry-core +, pysmb +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "pyairvisual"; - version = "1.0.0"; + version = "5.0.8"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "bachya"; repo = pname; - rev = "v${version}"; - sha256 = "0ng6k07n91k5l68zk3hl4fywb33admp84wqdm20qmmw9yc9c64fd"; + rev = version; + sha256 = "sha256-QgMc0O5jk5LgKQg9ZMCZd3dNLv1typm1Rp2u8kSsqYk="; }; - checkInputs = [ pytest requests-mock ]; - propagatedBuildInputs = [ requests ]; + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + aiohttp + numpy + pysmb + ]; + + checkInputs = [ + aresponses + asynctest + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; - checkPhase = '' - py.test tests - ''; + disabledTestPaths = [ "examples/" ]; - disabled = !isPy3k; + pythonImportsCheck = [ "pyairvisual" ]; meta = with lib; { - description = "A thin Python wrapper for the AirVisual API"; - license = licenses.mit; + description = "Python library for interacting with AirVisual"; homepage = "https://github.com/bachya/pyairvisual"; + changelog = "https://github.com/bachya/pyairvisual/releases/tag/${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; }; } |