Sophie

Sophie

distrib > Mageia > 2 > i586 > media > core-release-src > by-pkgid > 62cbc38b122c2c911865f0fdf779762c > files > 2

mysql-connector-python-0.3.2-4.mga2.src.rpm

%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define python3 0

%if %python3
%global with_python3 1
%else
%global with_python3 0
%endif

Name:           mysql-connector-python
Version:        0.3.2
Release:        %mkrel 4
Summary:        MySQL Connector for Python 2
Group:          Development/Python
License:        GPLv2 with exceptions
URL:            https://launchpad.net/myconnpy
Source0:        http://launchpad.net/myconnpy/0.3/%{version}/+download/%{name}-%{version}-devel.tar.gz
BuildArch:      noarch
BuildRequires:  python-devel
%if %python3
BuildRequires:  python3-devel
%endif
# for unittest
BuildRequires:  mysql

%description
MySQL Connector/Python is implementing the MySQL Client/Server protocol
completely in Python. No MySQL libraries are needed, and no compilation
is necessary to run this Python DB API v2.0 compliant driver.

%if %python3
%package -n mysql-connector-python3

Summary:        MySQL Connector for Python 3

%description -n mysql-connector-python3
MySQL Connector/Python is implementing the MySQL Client/Server protocol
completely in Python. No MySQL libraries are needed, and no compilation
is necessary to run this Python DB API v2.0 compliant driver.
%endif


%prep
%setup -q -n %{name}-%{version}-devel

%{__chmod} -x python?/examples/*py


%build
# nothin to build


%install
%{__rm} -rf %buildroot

%if %python3
# Python 3 build
%{__python3} setup.py install --root %buildroot
%{__rm} -rf build
%endif

# Python 2 build (end with this for tests)
%{__python} setup.py install --root %buildroot


%check
%{__python} unittests.py --mysql-basedir=%{_prefix}


%clean
%{__rm} -rf %buildroot


%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING EXCEPTIONS-CLIENT README
%doc python2/examples
%{python_sitelib}/*


%if %python3
%files -n mysql-connector-python3
%defattr(-,root,root,-)
%doc ChangeLog COPYING EXCEPTIONS-CLIENT README
%doc python3/examples
%{python3_sitelib}/*
%endif



%changelog

* Wed Nov 02 2011 dmorgan <dmorgan> 0.3.2-4.mga2
+ Revision: 161892
- Disable python3 port
- Fix buildrequires => s/mysqlserver/mysql
  Enable python3 build

* Sun May 22 2011 dmorgan <dmorgan> 0.3.2-2.mga1
+ Revision: 100122
- imported package mysql-connector-python