]> git.pld-linux.org Git - packages/python-mysqlclient.git/blob - python-mysqlclient.spec
Release 2 (by relup.sh)
[packages/python-mysqlclient.git] / python-mysqlclient.spec
1 # Conditional build:
2 %bcond_without  python2 # CPython 2.x module
3 %bcond_without  python3 # CPython 3.x module
4
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)
8 Name:           python-%{module}
9 Version:        1.3.6
10 Release:        2
11 License:        GPL
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
17 %if %{with python2}
18 BuildRequires:  python-devel >= 1:2.7
19 BuildRequires:  python-setuptools
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-devel >= 1:3.3
23 %endif
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)
29
30 %description
31 mysqlclient is a fork of MySQL-python. It adds Python 3.3 support and
32 merges some pull requests.
33
34 MySQLdb is an interface to the popular MySQL database server for
35 Python.
36
37 %description -l pl.UTF-8
38 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
39 nakłada kilka patchy.
40
41 MySQLdb to pythonowy interfejs do MySQL-a.
42
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
50
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.
54
55 MySQLdb is an interface to the popular MySQL database server for Python
56
57 %description -n python3-%{module} -l pl.UTF-8
58 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
59 nakłada kilka patchy.
60
61 MySQLdb to pythonowy interfejs do MySQL-a.
62
63 %prep
64 %setup -q -n %{module}-%{version}
65
66 %build
67 %if %{with python2}
68 %py_build %{?with_tests:test}
69 %endif
70
71 %if %{with python3}
72 %py3_build %{?with_tests:test}
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %py_install \
80         --optimize 2 \
81         --root=$RPM_BUILD_ROOT
82 %endif
83
84 %if %{with python3}
85 %py3_install \
86         --optimize 2 \
87         --root=$RPM_BUILD_ROOT
88 %endif
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %files
95 %defattr(644,root,root,755)
96 %attr(755,root,root) %{py_sitedir}/*.so
97 %{py_sitedir}/*.py?
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
103 %endif
104
105 %if %{with python3}
106 %files -n python3-%{module}
107 %defattr(644,root,root,755)
108 %attr(755,root,root) %{py3_sitedir}/*.so
109 %{py3_sitedir}/*.py
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
118 %endif
119
This page took 0.083471 seconds and 3 git commands to generate.