summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-binance
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-05-15 09:52:35 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-05-15 09:52:35 +0200
commit2d2faf37554a15099356ed2a05a2bb60a564e289 (patch)
treec8ac8450d283587ca3a80ef0a52e21b5bf66552a /pkgs/development/python-modules/python-binance
parent0c6717db1d973c5d0d66bba05a20f37352ecca73 (diff)
python3Packages.python-binance: enable tests
Diffstat (limited to 'pkgs/development/python-modules/python-binance')
-rw-r--r--pkgs/development/python-modules/python-binance/default.nix37
1 files changed, 25 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/python-binance/default.nix b/pkgs/development/python-modules/python-binance/default.nix
index de881459043a..cd1e09557ecb 100644
--- a/pkgs/development/python-modules/python-binance/default.nix
+++ b/pkgs/development/python-modules/python-binance/default.nix
@@ -1,23 +1,30 @@
-{ lib, buildPythonPackage, fetchPypi
-, pytest, requests-mock, tox
+{ lib
, aiohttp
+, buildPythonPackage
, dateparser
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
, requests
+, requests-mock
, six
, ujson
, websockets
}:
buildPythonPackage rec {
- version = "1.0.10";
pname = "python-binance";
+ version = "1.0.10";
+ disabled = pythonOlder "3.6";
- src = fetchPypi {
- inherit pname version;
- sha256 = "sha256-5U/xMJ0iPij3Y+6SKuKQHspSiktxJVrDQzHPoJCM4H8=";
+ src = fetchFromGitHub {
+ owner = "sammchardy";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "09pq2blvky1ah4k8yc6zkp2g5nkn3awc52ad3lxvj6m33akfzxiv";
};
- propagatedBuildInputs = [
+ propagatedBuildInputs = [
aiohttp
dateparser
requests
@@ -27,16 +34,22 @@ buildPythonPackage rec {
];
checkInputs = [
- pytest
+ pytestCheckHook
requests-mock
];
- doCheck = false; # Tries to test multiple interpreters with tox
+ disabledTestPaths = [
+ # Tests require network access
+ "tests/test_api_request.py"
+ "tests/test_historical_klines.py"
+ ];
+
+ pythonImportsCheck = [ "binance" ];
- meta = {
+ meta = with lib; {
description = "Binance Exchange API python implementation for automated trading";
homepage = "https://github.com/sammchardy/python-binance";
- license = lib.licenses.mit;
- maintainers = [ lib.maintainers.bhipple ];
+ license = licenses.mit;
+ maintainers = with maintainers; [ bhipple ];
};
}