depot/third_party/nixpkgs/pkgs/development/python-modules/locationsharinglib/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

60 lines
1.2 KiB
Nix

{ lib
, betamax
, buildPythonPackage
, cachetools
, coloredlogs
, emoji
, fetchPypi
, nose
, pythonOlder
, pytz
, requests
}:
buildPythonPackage rec {
pname = "locationsharinglib";
version = "4.1.8";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-69NzKSWpuU0Riwlj6cFC4h/shc/83e1mpq++zxDqftY=";
};
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=[]"
substituteInPlace requirements.txt \
--replace "coloredlogs>=15.0.1" "coloredlogs"
'';
checkPhase = ''
runHook preCheck
# Only coverage no real unit tests
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 ];
};
}