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 = "1.6";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "stravalib";
25 repo = "stravalib";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-U+QlSrijvT77/m+yjhFxbcVTQe51J+PR4Kc8N+qG+wI=";
28 };
29
30 nativeBuildInputs = [
31 setuptools
32 setuptools-scm
33 ];
34
35 propagatedBuildInputs = [
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 = with lib; {
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/v${version}";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ sikmir ];
55 broken = lib.versionAtLeast pydantic.version "2";
56 };
57}