File python-MySQL-python.spec of Package python-MySQL-python

#
# spec file for package python-MySQL-python
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-MySQL-python
Version:        1.2.5
Release:        0
Summary:        Python interface to MySQL
License:        GPL-2.0+
Group:          Development/Languages/Python
Url:            https://github.com/farcepest/MySQLdb1
Source:         https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-%{version}.zip
Patch0:         MySQL-python-Py_ssize.patch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
#BuildRequires:  mysql-devel
BuildRequires:  libmysqlclient-devel
BuildRequires:  unzip
# Documentation requirements:
BuildRequires:  python-Sphinx
%if 0%{?suse_version}
Recommends:     mariadb
%endif
Provides:       python-mysql = %{version}
Obsoletes:      python-mysql < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
MySQLdb is an interface to the popular MySQL database server for
Python.  The design goals are:

- Compliance with Python database API version 2.0 [PEP-0249]
- Thread-safety
- Thread-friendliness (threads will not block each other)

MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently
supported. Python-3.0 will be supported in a future release.
PyPy is supported.

%prep
%setup -q -n MySQL-python-%{version}
# Fix wrong-file-end-of-line-encoding rpmlint warning:
sed -i 's/\r$//' HISTORY README.md
%patch0 -p1

%build
python setup.py build
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%files
%defattr(-,root,root,-)
%doc GPL-2.0 HISTORY README.md build/sphinx/html
%{python_sitearch}/MySQL_python-%{version}-py%{py_ver}.egg-info
%{python_sitearch}/MySQLdb
%{python_sitearch}/_mysql*

%changelog
openSUSE Build Service is sponsored by