2 %bcond_without python2 # CPython 2.x module
3 %bcond_without python3 # CPython 3.x module
5 %define module mysqlclient
6 Summary: A Python interface to MySQL (MySQLdb compatible)
7 Summary(pl.UTF-8): Interfejs Pythona do MySQL (kompatybilny z MySQLdb)
12 Group: Libraries/Python
13 Source0: https://pypi.python.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz
14 # Source0-md5: 58d7c9c617a4286a88db290e7857d3aa
15 URL: https://pypi.python.org/pypi/mysqlclient
16 BuildRequires: rpmbuild(macros) >= 1.710
18 BuildRequires: python-devel >= 1:2.7
19 BuildRequires: python-setuptools
22 BuildRequires: python3-devel >= 1:3.3
23 BuildRequires: python3-distribute
25 BuildRequires: rpm-pythonprov
26 %pyrequires_eq python-modules
27 Requires: python-modules
28 Provides: python-MySQLdb
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 mysqlclient is a fork of MySQL-python. It adds Python 3.3 support and
33 merges some pull requests.
35 MySQLdb is an interface to the popular MySQL database server for
38 %description -l pl.UTF-8
39 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
42 MySQLdb to pythonowy interfejs do MySQL-a.
44 %package -n python3-%{module}
45 Summary: A Python interface to MySQL (MySQLdb compatible)
46 Summary(pl.UTF-8): Interfejs Pythona do MySQL (kompatybilny z MySQLdb)
47 Group: Libraries/Python
48 %pyrequires_eq python3
49 Requires: python3-modules
50 Provides: python3-MySQLdb
52 %description -n python3-%{module}
53 mysqlclient is a fork of MySQL-python. It adds Python 3.3 support and
54 merges some pull requests.
56 MySQLdb is an interface to the popular MySQL database server for Python
58 %description -n python3-%{module} -l pl.UTF-8
59 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
62 MySQLdb to pythonowy interfejs do MySQL-a.
65 %setup -q -n %{module}-%{version}
69 %py_build %{?with_tests:test}
73 %py3_build %{?with_tests:test}
77 rm -rf $RPM_BUILD_ROOT
82 --root=$RPM_BUILD_ROOT
88 --root=$RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %attr(755,root,root) %{py_sitedir}/*.so
99 %dir %{py_sitedir}/MySQLdb
100 %{py_sitedir}/MySQLdb/*.py?
101 %dir %{py_sitedir}/MySQLdb/constants
102 %{py_sitedir}/MySQLdb/constants/*.py?
103 %{py_sitedir}/*.egg-info
107 %files -n python3-%{module}
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{py3_sitedir}/*.so
111 %{py3_sitedir}/__pycache__
112 %dir %{py3_sitedir}/MySQLdb
113 %{py3_sitedir}/MySQLdb/*.py
114 %{py3_sitedir}/MySQLdb/__pycache__
115 %dir %{py3_sitedir}/MySQLdb/constants
116 %{py3_sitedir}/MySQLdb/constants/*.py
117 %{py3_sitedir}/MySQLdb/constants/__pycache__
118 %{py3_sitedir}/*.egg-info