1{ lib
2, buildPythonPackage
3, docopt
4, fetchPypi
5, nose
6, pytz
7, pythonOlder
8, setuptools-scm
9, six
10, sqlalchemy
11}:
12
13buildPythonPackage rec {
14 pname = "pygtfs";
15 version = "0.1.9";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-J5vu51OOMabWd8h60PpvvBiCnwQlhEnBywNXxy9hOuA=";
23 };
24
25 postPatch = ''
26 # https://github.com/jarondl/pygtfs/pull/72
27 substituteInPlace setup.py \
28 --replace "pytz>=2012d" "pytz"
29 '';
30
31 nativeBuildInputs = [
32 setuptools-scm
33 ];
34
35 propagatedBuildInputs = [
36 docopt
37 pytz
38 six
39 sqlalchemy
40 ];
41
42 nativeCheckInputs = [
43 nose
44 ];
45
46 pythonImportsCheck = [
47 "pygtfs"
48 ];
49
50 meta = with lib; {
51 description = "Python module for GTFS";
52 homepage = "https://github.com/jarondl/pygtfs";
53 license = with licenses; [ mit ];
54 maintainers = with maintainers; [ fab ];
55 };
56}