about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyodbc/default.nix
blob: 5e224805d14dd6c340bc9f6334ad6ed027fc37e5 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  isPyPy,
  pythonOlder,
  unixODBC,
}:

buildPythonPackage rec {
  pname = "pyodbc";
  version = "5.1.0";
  format = "setuptools";

  disabled = pythonOlder "3.7" || isPyPy; # use pypypdbc instead

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-OX/u5EVhplgL4IztvphkNoWVY/S7N49IIkZVyOmH6mA=";
  };

  nativeBuildInputs = [
    unixODBC # for odbc_config
  ];

  buildInputs = [ unixODBC ];

  # Tests require a database server
  doCheck = false;

  pythonImportsCheck = [ "pyodbc" ];

  meta = with lib; {
    description = "Python ODBC module to connect to almost any database";
    homepage = "https://github.com/mkleehammer/pyodbc";
    changelog = "https://github.com/mkleehammer/pyodbc/releases/tag/${version}";
    license = licenses.mit;
    platforms = platforms.unix;
    maintainers = with maintainers; [ bjornfor ];
  };
}