1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 setuptools,
7 requests,
8 pytestCheckHook,
9 httpretty,
10}:
11
12buildPythonPackage rec {
13 pname = "pygeocodio";
14 version = "2.0.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "bennylope";
19 repo = "pygeocodio";
20 tag = "v${version}";
21 hash = "sha256-4jT/PX+jvJx81eaSXTsb/vLNbv4dNNVgeYrE7QwGlL8=";
22 };
23
24 build-system = [
25 setuptools
26 ];
27
28 dependencies = [
29 requests
30 httpretty
31 ];
32
33 pythonImportsCheck = [ "geocodio" ];
34
35 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
36 "test_timeout"
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 ];
42
43 meta = {
44 description = "Python wrapper for the Geocodio geolocation service API";
45 downloadPage = "https://github.com/bennylope/pygeocodio/tree/master";
46 changelog = "https://github.com/bennylope/pygeocodio/blob/${src.tag}/HISTORY.rst";
47 homepage = "https://www.geocod.io/docs/#introduction";
48 license = with lib.licenses; [ bsd3 ];
49 maintainers = with lib.maintainers; [ ethancedwards8 ];
50 };
51}