summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-07-23 10:37:54 +0200
committerGitHub <noreply@github.com>2024-07-23 10:37:54 +0200
commit636822c343e872b3bd61e3d0d131a1debf0b4265 (patch)
treee8e99c6df63c66ea0dbec8be11d65284f8b94295
parentMerge pull request #329166 from fabaff/uiprotect-bump (diff)
parentpython312Packages.alpha-vantage: 2.3.1 -> 3.0.0 (diff)
downloadnixpkgs-636822c343e872b3bd61e3d0d131a1debf0b4265.tar.gz
Merge pull request #329149 from fabaff/alpha-vantage-bump
python312Packages.alpha-vantage: 2.3.1 -> 3.0.0
-rw-r--r--pkgs/development/python-modules/alpha-vantage/default.nix23
1 files changed, 17 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/alpha-vantage/default.nix b/pkgs/development/python-modules/alpha-vantage/default.nix
index b68fc39bc137..3e39efa7d384 100644
--- a/pkgs/development/python-modules/alpha-vantage/default.nix
+++ b/pkgs/development/python-modules/alpha-vantage/default.nix
@@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "alpha-vantage";
- version = "2.3.1";
+ version = "3.0.0";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -22,10 +22,16 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "RomelTorres";
repo = "alpha_vantage";
- rev = "refs/tags/${version}";
- hash = "sha256-DWnaLjnbAHhpe8aGUN7JaXEYC0ivWlizOSAfdvg33DM=";
+ rev = "refs/tags/v${version}";
+ hash = "sha256-Ae9WqEsAjJcD62NZOPh6a49g1wY4KMswzixDAZEtWkw=";
};
+ postPatch = ''
+ # Files are only linked
+ rm alpha_vantage/async_support/*
+ cp alpha_vantage/{cryptocurrencies.py,foreignexchange.py,techindicators.py,timeseries.py} alpha_vantage/async_support/
+ '';
+
build-system = [ setuptools ];
dependencies = [
@@ -33,14 +39,19 @@ buildPythonPackage rec {
requests
];
+ passthru.optional-dependencies = {
+ pandas = [
+ pandas
+ ];
+ };
+
nativeCheckInputs = [
aioresponses
requests-mock
- pandas
pytestCheckHook
- ];
+ ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
- # https://github.com/RomelTorres/alpha_vantage/issues/344
+ # Starting with 3.0.0 most tests require an API key
doCheck = false;
pythonImportsCheck = [ "alpha_vantage" ];