2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, betamax
|
|
|
|
, buildPythonPackage
|
|
|
|
, cachetools
|
|
|
|
, coloredlogs
|
|
|
|
, emoji
|
|
|
|
, fetchPypi
|
|
|
|
, nose
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "locationsharinglib";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "5.0.1";
|
2023-02-22 10:55:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-KT/q1UIJ/DzGqz8T08MXG9UCstAcpDydM4Tkn33pruI=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
coloredlogs
|
|
|
|
requests
|
|
|
|
cachetools
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
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=[]"
|
2023-05-24 13:37:59 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "coloredlogs>=15.0.1" "coloredlogs" \
|
|
|
|
--replace "pytz>=2023.3" "pytz"
|
2021-05-20 23:08:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
# Only coverage no real unit tests
|
2022-02-10 20:34:41 +00:00
|
|
|
nosetests
|
2021-05-20 23:08:51 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"locationsharinglib"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package to retrieve coordinates from a Google account";
|
|
|
|
homepage = "https://locationsharinglib.readthedocs.io/";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/costastf/locationsharinglib/blob/${version}/HISTORY.rst";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|