2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPyPy,
|
|
|
|
pythonOlder,
|
|
|
|
unixODBC,
|
2022-12-02 08:20:57 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyodbc";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.1.0";
|
2022-12-02 08:20:57 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7" || isPyPy; # use pypypdbc instead
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-OX/u5EVhplgL4IztvphkNoWVY/S7N49IIkZVyOmH6mA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = [
|
2024-06-05 15:53:02 +00:00
|
|
|
unixODBC # for odbc_config
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ unixODBC ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
# Tests require a database server
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pyodbc" ];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python ODBC module to connect to almost any database";
|
|
|
|
homepage = "https://github.com/mkleehammer/pyodbc";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/mkleehammer/pyodbc/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
|
|
};
|
|
|
|
}
|