File python-mysql.spec of Package python-mysql

#
# spec file for package python-mysql (Version 1.2.3)
#
# Copyright (c) 2010 SUSE LINUX Products 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/
#

# norootforbuild


Name:           python-mysql
BuildRequires:  mysql-devel python-devel python-setuptools
License:        GPLv2+
Group:          Development/Libraries/Python
AutoReqProv:    on
Version:        1.2.3
Release:        2
Source0:        MySQL-python-%{version}.tar.bz2
Patch0:         MySQL-python-1.2.2-ssize.patch
Url:            http://sourceforge.net/projects/mysql-python
Summary:        An Interface to the Popular MySQL Database Server for Python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{py_requires}

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

-     Compliance with the Python database API version 2.0

-     Thread-safety

-     Thread-friendliness (threads will not block each other)

-     Compatibility with MySQL-3.23 and later

This module should be mostly compatible with an older interface written
by Joe Skinner and others. However, the older version is a) not
thread-friendly, b) written for MySQL 3.21, and c) apparently not
actively maintained. No code from that version is used in MySQLdb.
MySQLdb is free software.

%prep
%setup -n MySQL-python-%{version}
%patch0

%build
export CFLAGS="$RPM_OPT_FLAGS" 
export mysqlversion="$(mysql_config --version)"
export mysqlclient="mysqlclient_r"
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES

%files -f INSTALLED_FILES 
%defattr(-, root, root)
%doc doc/* README 

%changelog
openSUSE Build Service is sponsored by