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