1{ lib
2, aiohttp
3, backoff
4, buildPythonPackage
5, fetchFromGitHub
6, pythonOlder
7, setuptools-scm
8, yarl
9}:
10
11buildPythonPackage rec {
12 pname = "geocachingapi";
13 version = "0.2.3";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "Sholofly";
20 repo = "geocachingapi-python";
21 rev = "refs/tags/${version}";
22 sha256 = "sha256-C4nj4KFEwsY5V5f0Q1x+9sD8Ihz5m7b3jg2pOyB/pDg=";
23 };
24
25 nativeBuildInputs = [
26 setuptools-scm
27 ];
28
29 SETUPTOOLS_SCM_PRETEND_VERSION = version;
30
31 propagatedBuildInputs = [
32 aiohttp
33 backoff
34 yarl
35 ];
36
37 # Tests require a token and network access
38 doCheck = false;
39
40 pythonImportsCheck = [
41 "geocachingapi"
42 ];
43
44 meta = with lib; {
45 description = "Python API to control the Geocaching API";
46 homepage = "https://github.com/Sholofly/geocachingapi-python";
47 license = with licenses; [ mit ];
48 maintainers = with maintainers; [ fab ];
49 };
50}