2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2024-01-25 14:12:00 +00:00
|
|
|
, arrow
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-02-22 10:55:15 +00:00
|
|
|
, pint
|
|
|
|
, pydantic
|
2024-01-25 14:12:00 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
2024-01-25 14:12:00 +00:00
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stravalib";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.5";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-OEdMRg3KjUrXt/CgJgsUqa/sVFAE0JONNZg5MBKtxmY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
arrow
|
2023-02-22 10:55:15 +00:00
|
|
|
pint
|
|
|
|
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-01-25 14:12:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"stravalib"
|
|
|
|
];
|
|
|
|
|
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-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
# Support for pydantic > 2, https://github.com/stravalib/stravalib/issues/379
|
|
|
|
broken = versionAtLeast pydantic.version "2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|