2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, betamax
|
|
|
|
, buildPythonPackage
|
|
|
|
, cachetools
|
|
|
|
, coloredlogs
|
|
|
|
, emoji
|
|
|
|
, fetchPypi
|
|
|
|
, nose
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "locationsharinglib";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "4.1.8";
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-69NzKSWpuU0Riwlj6cFC4h/shc/83e1mpq++zxDqftY=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
coloredlogs
|
|
|
|
requests
|
|
|
|
cachetools
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
betamax
|
|
|
|
emoji
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Tests requirements want to pull in multiple modules which we don't need
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "tests_require=test_requirements" "tests_require=[]"
|
2021-08-18 13:19:15 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "coloredlogs>=15.0.1" "coloredlogs"
|
2021-05-20 23:08:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
# Only coverage no real unit tests
|
|
|
|
${python.interpreter} setup.py nosetests
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "locationsharinglib" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package to retrieve coordinates from a Google account";
|
|
|
|
homepage = "https://locationsharinglib.readthedocs.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|