1{
2 lib,
3 arrow,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pint,
7 pydantic,
8 pythonOlder,
9 pytz,
10 requests,
11 responses,
12 setuptools,
13 setuptools-scm,
14}:
15
16buildPythonPackage rec {
17 pname = "stravalib";
18 version = "2.4";
19 pyproject = true;
20
21 disabled = pythonOlder "3.10";
22
23 src = fetchFromGitHub {
24 owner = "stravalib";
25 repo = "stravalib";
26 tag = "v${version}";
27 hash = "sha256-RMvahoUOy4RnSu0O7dBpYylaQ8nPfMiivx8k1XBeEGA=";
28 };
29
30 build-system = [
31 setuptools
32 setuptools-scm
33 ];
34
35 dependencies = [
36 arrow
37 pint
38 pydantic
39 pytz
40 requests
41 responses
42 ];
43
44 # Tests require network access, testing strava API
45 doCheck = false;
46
47 pythonImportsCheck = [ "stravalib" ];
48
49 meta = {
50 description = "Python library for interacting with Strava v3 REST API";
51 homepage = "https://github.com/stravalib/stravalib";
52 changelog = "https://github.com/stravalib/stravalib/releases/tag/${src.tag}";
53 license = lib.licenses.asl20;
54 maintainers = with lib.maintainers; [ sikmir ];
55 };
56}