1{
2 lib,
3 aiohttp,
4 async-timeout,
5 buildPythonPackage,
6 fetchPypi,
7 pythonOlder,
8 pytz,
9}:
10
11buildPythonPackage rec {
12 pname = "pydelijn";
13 version = "1.1.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-xyBq2h3ipUarkjCXq9GIbY7bhsf9729aQwHde3o5K6g=";
21 };
22
23 propagatedBuildInputs = [
24 aiohttp
25 async-timeout
26 pytz
27 ];
28
29 postPatch = ''
30 # Remove with next release
31 substituteInPlace setup.py \
32 --replace "async_timeout>=3.0.1,<4.0" "async_timeout>=3.0.1"
33 # https://github.com/bollewolle/pydelijn/pull/11
34 substituteInPlace pydelijn/common.py \
35 --replace ", loop=self.loop" ""
36 '';
37
38 # Project has no tests
39 doCheck = false;
40
41 pythonImportsCheck = [ "pydelijn" ];
42
43 meta = with lib; {
44 description = "Python package to retrieve realtime data of passages at stops of De Lijn";
45 homepage = "https://github.com/bollewolle/pydelijn";
46 license = licenses.mit;
47 maintainers = with maintainers; [ fab ];
48 };
49}