1{ lib
2, betamax
3, buildPythonPackage
4, cachetools
5, coloredlogs
6, emoji
7, fetchPypi
8, nose
9, python
10, pythonOlder
11, pytz
12, requests
13}:
14
15buildPythonPackage rec {
16 pname = "locationsharinglib";
17 version = "4.1.8";
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "sha256-69NzKSWpuU0Riwlj6cFC4h/shc/83e1mpq++zxDqftY=";
23 };
24
25 propagatedBuildInputs = [
26 coloredlogs
27 requests
28 cachetools
29 pytz
30 ];
31
32 checkInputs = [
33 betamax
34 emoji
35 nose
36 ];
37
38 postPatch = ''
39 # Tests requirements want to pull in multiple modules which we don't need
40 substituteInPlace setup.py \
41 --replace "tests_require=test_requirements" "tests_require=[]"
42 substituteInPlace requirements.txt \
43 --replace "coloredlogs>=15.0.1" "coloredlogs"
44 '';
45
46 checkPhase = ''
47 runHook preCheck
48 # Only coverage no real unit tests
49 ${python.interpreter} setup.py nosetests
50 runHook postCheck
51 '';
52
53 pythonImportsCheck = [ "locationsharinglib" ];
54
55 meta = with lib; {
56 description = "Python package to retrieve coordinates from a Google account";
57 homepage = "https://locationsharinglib.readthedocs.io/";
58 license = licenses.mit;
59 maintainers = with maintainers; [ fab ];
60 };
61}