about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-binance/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-binance/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-binance/default.nix56
1 files changed, 43 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-binance/default.nix b/nixpkgs/pkgs/development/python-modules/python-binance/default.nix
index aea47c7b9e72..cd1e09557ecb 100644
--- a/nixpkgs/pkgs/development/python-modules/python-binance/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/python-binance/default.nix
@@ -1,25 +1,55 @@
-{ lib, buildPythonPackage, fetchPypi
-, pytest, requests-mock, tox
-, autobahn, certifi, chardet, cryptography, dateparser, pyopenssl, requests, service-identity, twisted }:
+{ lib
+, aiohttp
+, buildPythonPackage
+, dateparser
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+, requests
+, requests-mock
+, six
+, ujson
+, websockets
+}:
 
 buildPythonPackage rec {
-  version = "0.7.9";
   pname = "python-binance";
+  version = "1.0.10";
+  disabled = pythonOlder "3.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "476459d91f6cfe0a37ccac38911643ea6cca632499ad8682e0957a075f73d239";
+  src = fetchFromGitHub {
+    owner = "sammchardy";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "09pq2blvky1ah4k8yc6zkp2g5nkn3awc52ad3lxvj6m33akfzxiv";
   };
 
-  doCheck = false;  # Tries to test multiple interpreters with tox
-  checkInputs = [ pytest requests-mock tox ];
+  propagatedBuildInputs = [
+    aiohttp
+    dateparser
+    requests
+    six
+    ujson
+    websockets
+  ];
 
-  propagatedBuildInputs = [ autobahn certifi chardet cryptography dateparser pyopenssl requests service-identity twisted ];
+  checkInputs = [
+    pytestCheckHook
+    requests-mock
+  ];
 
-  meta = {
+  disabledTestPaths = [
+    # Tests require network access
+    "tests/test_api_request.py"
+    "tests/test_historical_klines.py"
+  ];
+
+  pythonImportsCheck = [ "binance" ];
+
+  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 ];
   };
 }