]> git.pld-linux.org Git - SPECS.git/blob - python-mysqlclient.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.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:        1
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 BuildRequires:  python3-distribute
24 %endif
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)
30
31 %description
32 mysqlclient is a fork of MySQL-python. It adds Python 3.3 support and
33 merges some pull requests.
34
35 MySQLdb is an interface to the popular MySQL database server for
36 Python.
37
38 %description -l pl.UTF-8
39 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
40 nakłada kilka patchy.
41
42 MySQLdb to pythonowy interfejs do MySQL-a.
43
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
51
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.
55
56 MySQLdb is an interface to the popular MySQL database server for Python
57
58 %description -n python3-%{module} -l pl.UTF-8
59 mysqlclient to fork MySQL-python. Dodaje obsługę Pythona 3.3 oraz
60 nakłada kilka patchy.
61
62 MySQLdb to pythonowy interfejs do MySQL-a.
63
64 %prep
65 %setup -q -n %{module}-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build %{?with_tests:test}
70 %endif
71
72 %if %{with python3}
73 %py3_build %{?with_tests:test}
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %py_install \
81         --optimize 2 \
82         --root=$RPM_BUILD_ROOT
83 %endif
84
85 %if %{with python3}
86 %py3_install \
87         --optimize 2 \
88         --root=$RPM_BUILD_ROOT
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
96 %defattr(644,root,root,755)
97 %attr(755,root,root) %{py_sitedir}/*.so
98 %{py_sitedir}/*.py?
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
104 %endif
105
106 %if %{with python3}
107 %files -n python3-%{module}
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{py3_sitedir}/*.so
110 %{py3_sitedir}/*.py
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
119 %endif
120
This page took 2.518544 seconds and 3 git commands to generate.