1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "pyituran";
14 version = "0.1.5";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "shmuelzon";
21 repo = "pyituran";
22 tag = version;
23 hash = "sha256-Nil9bxXzDvwMIVTxeaVUOtJwx92zagA6OzQV3LMR8d8=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace-fail 'os.environ["VERSION"]' '"${version}"'
29 '';
30
31 build-system = [ setuptools ];
32
33 dependencies = [ aiohttp ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "pyituran" ];
41
42 meta = {
43 description = "Module to interact with the Ituran web service";
44 homepage = "https://github.com/shmuelzon/pyituran";
45 changelog = "https://github.com/shmuelzon/pyituran/releases/tag/${version}";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ fab ];
48 };
49}