about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pygtfs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pygtfs/default.nix')
-rw-r--r--pkgs/development/python-modules/pygtfs/default.nix45
1 files changed, 18 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/pygtfs/default.nix b/pkgs/development/python-modules/pygtfs/default.nix
index cabb211d484c4..b4a404dc209f8 100644
--- a/pkgs/development/python-modules/pygtfs/default.nix
+++ b/pkgs/development/python-modules/pygtfs/default.nix
@@ -1,51 +1,42 @@
-{ lib
-, buildPythonPackage
-, docopt
-, fetchPypi
-, nose
-, pytz
-, pythonOlder
-, setuptools-scm
-, six
-, sqlalchemy
+{
+  lib,
+  buildPythonPackage,
+  docopt,
+  fetchPypi,
+  pytz,
+  setuptools,
+  setuptools-scm,
+  six,
+  sqlalchemy,
+  pytestCheckHook,
 }:
 
 buildPythonPackage rec {
   pname = "pygtfs";
   version = "0.1.9";
-  format = "setuptools";
-
-  disabled = pythonOlder "3.7";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
     hash = "sha256-J5vu51OOMabWd8h60PpvvBiCnwQlhEnBywNXxy9hOuA=";
   };
 
-  postPatch = ''
-    # https://github.com/jarondl/pygtfs/pull/72
-    substituteInPlace setup.py \
-      --replace "pytz>=2012d" "pytz"
-  '';
-
-  nativeBuildInputs = [
+  build-system = [
+    setuptools
     setuptools-scm
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     docopt
     pytz
     six
     sqlalchemy
   ];
 
-  nativeCheckInputs = [
-    nose
-  ];
+  nativeCheckInputs = [ pytestCheckHook ];
+  pytestFlagsArray = [ "pygtfs/test/test.py" ];
 
-  pythonImportsCheck = [
-    "pygtfs"
-  ];
+  pythonImportsCheck = [ "pygtfs" ];
 
   meta = with lib; {
     description = "Python module for GTFS";