From 391de01d3c096de5fcde5e30311e7ceb6491a1ab Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Dec 2022 10:01:37 +0100 Subject: [PATCH] python39Packages.coinmetrics-api-client: use optional-dependencies for test deps --- .../coinmetrics-api-client/default.nix | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/coinmetrics-api-client/default.nix b/pkgs/development/python-modules/coinmetrics-api-client/default.nix index babe6614fcb7..ca6d28f83dc1 100644 --- a/pkgs/development/python-modules/coinmetrics-api-client/default.nix +++ b/pkgs/development/python-modules/coinmetrics-api-client/default.nix @@ -1,11 +1,23 @@ -{ buildPythonPackage, fetchPypi, lib, orjson, pandas, poetry-core -, pytestCheckHook, pytest-mock, pythonOlder, python-dateutil, requests, typer -, websocket-client }: +{ lib +, buildPythonPackage +, fetchPypi +, orjson +, pandas +, poetry-core +, pytestCheckHook +, pytest-mock +, pythonOlder +, python-dateutil +, requests +, typer +, websocket-client +}: buildPythonPackage rec { pname = "coinmetrics-api-client"; version = "2022.11.14.16"; format = "pyproject"; + disabled = pythonOlder "3.7"; src = fetchPypi { @@ -13,19 +25,26 @@ buildPythonPackage rec { hash = "sha256-2x8S9Jj/1bBnhXS/x0lQ8YUQkCvfpgGcDSQU2dGbAn0="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; propagatedBuildInputs = [ - orjson python-dateutil requests typer websocket-client + orjson + python-dateutil + requests + typer + websocket-client ]; checkInputs = [ - pandas pytestCheckHook pytest-mock - ]; + ] ++ passthru.optional-dependencies.pandas; - pythonImportsCheck = [ "coinmetrics.api_client" ]; + pythonImportsCheck = [ + "coinmetrics.api_client" + ]; passthru = { optional-dependencies = { @@ -34,8 +53,8 @@ buildPythonPackage rec { }; meta = with lib; { + description = "Coin Metrics API v4 client library"; homepage = "https://coinmetrics.github.io/api-client-python/site/index.html"; - description = "Coin Metrics API v4 client library (Python)"; license = licenses.mit; maintainers = with maintainers; [ centromere ]; };