about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pygtfs/default.nix
blob: aeb65d92556d2af83a0e74ceb7a182e3d931cbdc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, buildPythonPackage
, docopt
, fetchPypi
, nose
, pytz
, pythonOlder
, setuptools-scm
, six
, sqlalchemy
}:

buildPythonPackage rec {
  pname = "pygtfs";
  version = "0.1.9";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-J5vu51OOMabWd8h60PpvvBiCnwQlhEnBywNXxy9hOuA=";
  };

  postPatch = ''
    # https://github.com/jarondl/pygtfs/pull/72
    substituteInPlace setup.py \
      --replace "pytz>=2012d" "pytz"
  '';

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    docopt
    pytz
    six
    sqlalchemy
  ];

  nativeCheckInputs = [
    nose
  ];

  pythonImportsCheck = [
    "pygtfs"
  ];

  meta = with lib; {
    description = "Python module for GTFS";
    homepage = "https://github.com/jarondl/pygtfs";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}