From 9372199ffb25b256683dd088c6ee292af8b1cb99 Mon Sep 17 00:00:00 2001
From: Fabian Affolter <fabian@affolter-engineering.ch>
Date: Thu, 20 Jan 2022 09:16:53 +0100
Subject: [PATCH] python3Packages.pyathena:: add pythonImportsCheck

---
 .../python-modules/pyathena/default.nix        | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/pkgs/development/python-modules/pyathena/default.nix b/pkgs/development/python-modules/pyathena/default.nix
index 2611c53f5396..c24bcefec167 100644
--- a/pkgs/development/python-modules/pyathena/default.nix
+++ b/pkgs/development/python-modules/pyathena/default.nix
@@ -5,11 +5,15 @@
 , botocore
 , pandas
 , tenacity
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "pyathena";
   version = "2.4.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "PyAthena";
@@ -17,11 +21,6 @@ buildPythonPackage rec {
     sha256 = "9d42b4e2cdbd8c48f8157692b50681b08569aa3cac3a9694e671ec9aa40f969b";
   };
 
-  # Nearly all tests depend on a working AWS Athena instance,
-  # therefore deactivating them.
-  # https://github.com/laughingman7743/PyAthena/#testing
-  doCheck = false;
-
   propagatedBuildInputs = [
     boto3
     botocore
@@ -29,6 +28,15 @@ buildPythonPackage rec {
     tenacity
   ];
 
+  # Nearly all tests depend on a working AWS Athena instance,
+  # therefore deactivating them.
+  # https://github.com/laughingman7743/PyAthena/#testing
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "pyathena"
+  ];
+
   meta = with lib; {
     homepage = "https://github.com/laughingman7743/PyAthena/";
     license = licenses.mit;