# # spec file for package python-pyodbc # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyodbc Version: 4.0.24 Release: 0 Url: https://github.com/mkleehammer/pyodbc Summary: Python ODBC API License: MIT Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/p/pyodbc/pyodbc-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module devel} BuildRequires: unixODBC-devel BuildRequires: gcc-c++ BuildRequires: python-rpm-macros BuildRequires: sqliteodbc %python_subpackages %description pyodbc is a Python 2.x and 3.x module that allows you to use ODBC to connect to almost any database from Windows, Linux, OS/X, and more. It implements the Python Database API Specification v2.0, but additional features have been added to simplify database programming even more. %prep %setup -q -n pyodbc-%{version} %build %python_build %install %python_install %check python3 tests3/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db" mv build/ _build.python3/ && mv _build.python2/ build/ python2 tests2/sqlitetests.py -v "Driver=SQLITE3;Database=sqlite.db" mv build/ _build.python2/ && mv _build.python3/ build/ %files %python_files %defattr(-,root,root,-) %{python_sitearch}/* %license LICENSE.txt %doc README.md %changelog