14 buildPythonPackage rec {
15 pname = "spyse-python";
19 disabled = pythonOlder "3.8";
21 src = fetchFromGitHub {
23 repo = "spyse-python";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-c7BAJOplWNcd9v7FrEZuMHHdMpqtHljF7YpbdQYAMxA=";
29 # Update limiter import and rate limit, https://github.com/spyse-com/spyse-python/pull/11
31 name = "support-later-limiter.patch";
32 url = "https://github.com/spyse-com/spyse-python/commit/ff68164c514dfb28ab77d8690b3a5153962dbe8c.patch";
33 hash = "sha256-PoWPJCK/Scsh4P7lr97u4JpVHXNlY0C9rJgY4TDYmv0=";
37 pythonRemoveDeps = [ "dataclasses" ];
40 substituteInPlace setup.py \
41 --replace-fail "dataclasses-json~=0.5.4" "dataclasses-json>=0.5.4" \
42 --replace-fail "responses~=0.13.3" "responses>=0.13.3" \
43 --replace-fail "limiter~=0.1.2" "limiter>=0.1.2" \
44 --replace-fail "requests~=2.26.0" "requests>=2.26.0"
47 build-system = [ setuptools ];
56 # Tests requires an API token
59 pythonImportsCheck = [ "spyse" ];
62 description = "Python module for spyse.com API";
63 homepage = "https://github.com/spyse-com/spyse-python";
64 changelog = "https://github.com/spyse-com/spyse-python/releases/tag/v${version}";
65 license = with licenses; [ mit ];
66 maintainers = with maintainers; [ fab ];