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
24 BuildRequires: rpm-pythonprov
25 %pyrequires_eq python-modules
26 Requires: python-modules
27 Provides: python-MySQLdb
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 mysqlclient is a fork of MySQL-python. It adds Python 3.3 support and
32 merges some pull requests.
34 MySQLdb is an interface to the popular MySQL database server for
37 %description -l pl.UTF-8
38 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
41 MySQLdb to pythonowy interfejs do MySQL-a.
43 %package -n python3-%{module}
44 Summary: A Python interface to MySQL (MySQLdb compatible)
45 Summary(pl.UTF-8): Interfejs Pythona do MySQL (kompatybilny z MySQLdb)
46 Group: Libraries/Python
47 %pyrequires_eq python3
48 Requires: python3-modules
49 Provides: python3-MySQLdb
51 %description -n python3-%{module}
52 mysqlclient is a fork of MySQL-python. It adds Python 3.3 support and
53 merges some pull requests.
55 MySQLdb is an interface to the popular MySQL database server for Python
57 %description -n python3-%{module} -l pl.UTF-8
58 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
61 MySQLdb to pythonowy interfejs do MySQL-a.
64 %setup -q -n %{module}-%{version}
68 %py_build %{?with_tests:test}
72 %py3_build %{?with_tests:test}
76 rm -rf $RPM_BUILD_ROOT
81 --root=$RPM_BUILD_ROOT
87 --root=$RPM_BUILD_ROOT
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %attr(755,root,root) %{py_sitedir}/*.so
98 %dir %{py_sitedir}/MySQLdb
99 %{py_sitedir}/MySQLdb/*.py?
100 %dir %{py_sitedir}/MySQLdb/constants
101 %{py_sitedir}/MySQLdb/constants/*.py?
102 %{py_sitedir}/*.egg-info
106 %files -n python3-%{module}
107 %defattr(644,root,root,755)
108 %attr(755,root,root) %{py3_sitedir}/*.so
110 %{py3_sitedir}/__pycache__
111 %dir %{py3_sitedir}/MySQLdb
112 %{py3_sitedir}/MySQLdb/*.py
113 %{py3_sitedir}/MySQLdb/__pycache__
114 %dir %{py3_sitedir}/MySQLdb/constants
115 %{py3_sitedir}/MySQLdb/constants/*.py
116 %{py3_sitedir}/MySQLdb/constants/__pycache__
117 %{py3_sitedir}/*.egg-info