From 8acbbecaac3bdf4e7bd4876b03fa82145bf99e7f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 15:56:17 +0100 Subject: [PATCH] python3Packages.pyiqvia: init 0.3.1 --- .../python-modules/pyiqvia/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/pyiqvia/default.nix diff --git a/pkgs/development/python-modules/pyiqvia/default.nix b/pkgs/development/python-modules/pyiqvia/default.nix new file mode 100644 index 00000000000..762e39fe4b1 --- /dev/null +++ b/pkgs/development/python-modules/pyiqvia/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, aiohttp +, aresponses +, fetchFromGitHub +, poetry +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyiqvia"; + version = "0.3.1"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1yjsbq4p040a35n8g2l0wgnv83wkjirv4rj73s2mjzn3cxf395bz"; + }; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ + aresponses + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + # Ignore the examples as they are prefixed with test_ + pytestFlagsArray = [ "--ignore examples/" ]; + pythonImportsCheck = [ "pyiqvia" ]; + + meta = with lib; { + description = "Python3 API for IQVIA data"; + longDescription = '' + pyiqvia is an async-focused Python library for allergen, asthma, and + disease data from the IQVIA family of websites (such as https://pollen.com, + https://flustar.com and more). + ''; + homepage = "https://github.com/bachya/pyiqvia"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad775f0712b..ac4b1e3f36f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5317,6 +5317,8 @@ in { pyipp = callPackage ../development/python-modules/pyipp { }; + pyiqvia = callPackage ../development/python-modules/pyiqvia { }; + pyjet = callPackage ../development/python-modules/pyjet { }; pyjks = callPackage ../development/python-modules/pyjks { };