biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / spyse-python / default.nix
blobfc96952be47a5419b097fcaa67d69a7b496028c6
2   lib,
3   buildPythonPackage,
4   dataclasses-json,
5   fetchFromGitHub,
6   fetchpatch,
7   limiter,
8   pythonOlder,
9   requests,
10   responses,
11   setuptools,
14 buildPythonPackage rec {
15   pname = "spyse-python";
16   version = "2.2.3";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "spyse-com";
23     repo = "spyse-python";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-c7BAJOplWNcd9v7FrEZuMHHdMpqtHljF7YpbdQYAMxA=";
26   };
28   patches = [
29     # Update limiter import and rate limit, https://github.com/spyse-com/spyse-python/pull/11
30     (fetchpatch {
31       name = "support-later-limiter.patch";
32       url = "https://github.com/spyse-com/spyse-python/commit/ff68164c514dfb28ab77d8690b3a5153962dbe8c.patch";
33       hash = "sha256-PoWPJCK/Scsh4P7lr97u4JpVHXNlY0C9rJgY4TDYmv0=";
34     })
35   ];
37   pythonRemoveDeps = [ "dataclasses" ];
39   postPatch = ''
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"
45   '';
47   build-system = [ setuptools ];
49   dependencies = [
50     requests
51     dataclasses-json
52     responses
53     limiter
54   ];
56   # Tests requires an API token
57   doCheck = false;
59   pythonImportsCheck = [ "spyse" ];
61   meta = with lib; {
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 ];
67   };