2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
arrow,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pint,
|
|
|
|
pydantic,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
requests,
|
|
|
|
responses,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stravalib";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stravalib";
|
|
|
|
repo = "stravalib";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-uF29fK+ZSSO688zKYYiSEygBUJZ6NBcvdgGgz3I1I6Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
2020-04-24 23:36:52 +00:00
|
|
|
arrow
|
2023-02-22 10:55:15 +00:00
|
|
|
pint
|
2024-02-29 20:09:43 +00:00
|
|
|
pydantic
|
2020-04-24 23:36:52 +00:00
|
|
|
pytz
|
2024-01-25 14:12:00 +00:00
|
|
|
requests
|
|
|
|
responses
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# Tests require network access, testing strava API
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "stravalib" ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for interacting with Strava v3 REST API";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://github.com/stravalib/stravalib";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/stravalib/stravalib/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2024-02-07 01:22:34 +00:00
|
|
|
maintainers = with maintainers; [ sikmir ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|