11{
22 lib ,
33 aiohttp ,
4+ aioresponses ,
45 buildPythonPackage ,
56 dateparser ,
67 fetchFromGitHub ,
7- fetchpatch ,
88 pycryptodome ,
9+ pytest-asyncio ,
910 pytestCheckHook ,
1011 pythonOlder ,
11- requests ,
1212 requests-mock ,
13+ requests ,
1314 six ,
1415 ujson ,
16+ setuptools ,
1517 websockets ,
1618} :
1719
1820buildPythonPackage rec {
1921 pname = "python-binance" ;
2022 version = "1.0.27" ;
21- format = "setuptools" ;
23+ pyproject = true ;
2224
23- disabled = pythonOlder "3.6 " ;
25+ disabled = pythonOlder "3.11 " ;
2426
2527 src = fetchFromGitHub {
2628 owner = "sammchardy" ;
27- repo = pname ;
29+ repo = "python-binance" ;
2830 tag = "v${ version } " ;
2931 hash = "sha256-nsJuHxPXhMBRY4BUDDLj5sHK/GuJA0pBU3RGUDxVm50=" ;
3032 } ;
3133
32- patches = [
33- ( fetchpatch {
34- name = "fix-unable-to-determine-version-error.patch" ;
35- url = "https://github.com/sammchardy/python-binance/commit/1b9dd4853cafccf6cdacc13bb64a18632a79a6f1.patch" ;
36- hash = "sha256-6KRHm2cZRcdD6qMdRAwlea4qLZ1/1YFzZAQ7Ph4XMCs=" ;
37- } )
38- ] ;
34+ build-system = [ setuptools ] ;
3935
40- propagatedBuildInputs = [
36+ dependencies = [
4137 aiohttp
4238 dateparser
4339 requests
@@ -48,14 +44,39 @@ buildPythonPackage rec {
4844 ] ;
4945
5046 nativeCheckInputs = [
47+ aioresponses
48+ pytest-asyncio
5149 pytestCheckHook
5250 requests-mock
5351 ] ;
5452
5553 disabledTestPaths = [
5654 # Tests require network access
5755 "tests/test_api_request.py"
58- "tests/test_historical_klines.py"
56+ "tests/test_async_client.py"
57+ "tests/test_async_client_futures.py"
58+ "tests/test_async_client_margin.py"
59+ "tests/test_async_client_options.py"
60+ "tests/test_async_client_portfolio.py"
61+ "tests/test_async_client_ws_api.py"
62+ "tests/test_async_client_ws_futures_requests.py"
63+ "tests/test_client.py"
64+ "tests/test_client_futures.py"
65+ "tests/test_client_gift_card.py"
66+ "tests/test_client_margin.py"
67+ "tests/test_client_options.py"
68+ "tests/test_client_portfolio.py"
69+ "tests/test_client_ws_api.py"
70+ "tests/test_client_ws_futures_requests.py"
71+ "tests/test_depth_cache.py"
72+ "tests/test_get_order_book.py"
73+ "tests/test_ping.py"
74+ "tests/test_reconnecting_websocket.py"
75+ "tests/test_socket_manager.py"
76+ "tests/test_streams.py"
77+ "tests/test_threaded_socket_manager.py"
78+ "tests/test_threaded_stream.py"
79+ "tests/test_ws_api.py"
5980 ] ;
6081
6182 pythonImportsCheck = [ "binance" ] ;
0 commit comments