File: mysql-connector-python.spec

package info (click to toggle)
mysql-connector-python 9.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,768 kB
  • sloc: python: 83,598; sql: 47,030; ansic: 3,494; cpp: 860; sh: 394; makefile: 208; javascript: 2
file content (336 lines) | stat: -rw-r--r-- 12,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# Copyright (c) 2015, 2025, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0, as
# published by the Free Software Foundation.
#
# This program is designed to work with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an
# additional permission to link the program and your derivative works
# with the separately licensed software that they have either included with
# the program or referenced in the documentation.
#
# Without limiting anything contained in the foregoing, this file,
# which is part of MySQL Connector/Python, is also subject to the
# Universal FOSS Exception, version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA

%global wants_py_dnspython_version 2.6.1

%undefine _package_note_file
%define current_year %(date +%Y)

%if 0%{?rhel} == 8
%{!?__python3: %global __python3 /usr/bin/python3.9}
%{!?python3_pkgversion: %global python3_pkgversion 39}
%endif

%{?protobuf_include_dir: %global with_protobuf_include_dir %{protobuf_include_dir}}
%{?protobuf_lib_dir: %global with_protobuf_lib_dir %{protobuf_lib_dir}}
%{?protoc: %global with_protoc %{protoc}}
%{?extra_compile_args: %global extra_compile_args %{extra_compile_args}}
%{?extra_link_args: %global extra_link_args %{extra_link_args}}

# set version if not defined through 'rpmbuild'
%{!?version: %global version 9.4.0}


# if true set byte_code_only to --byte_code_only
%if 0%{?byte_code_only}
%global byte_code_only --byte-code-only
%endif

# set lic_type to GPLv2 if not defined through 'rpmbuild'
%{!?lic_type: %global lic_type GPLv2}

# if label is defined, set product_suffix to '-{label}'
%if 0%{?label:1}
%global product_suffix -%{label}
%endif

# ======================================================================
# Main section
# ======================================================================

Summary:       Standardized MySQL database driver for Python
Name:          mysqlx-connector-python%{?product_suffix}
Version:       %{version}
Release:       1%{?version_extra:.%{version_extra}}%{?byte_code_only:.1}%{?dist}
License:       Copyright (c) 2015, %{current_year}, Oracle and/or its affiliates. Under %{?lic_type} license as shown in the Description field.
URL:           https://dev.mysql.com/downloads/connector/python/
Source0:       https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python%{?product_suffix}-%{version}-src.tar.gz

%if 0%{?rhel} == 8
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-rpm-macros
%endif

%description
MySQL Connector/Python enables Python programs to access MySQL
databases, using an API that is compliant with the Python DB API
version 2.0. It is written in pure Python and does not have any
dependencies except for the Python Standard Library.
The MySQL software has Dual Licensing, which means you can use the

MySQL software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from Oracle and/or its affiliates if you do not wish to be
bound by the terms of the GPL. See the chapter "Licensing and Support"
in the manual for further info.

The MySQL web site (http://www.mysql.com/) provides the latest news
and information about the MySQL software. Also please see the
documentation and the manual for more information.

%package    -n mysqlx-connector-python3%{?product_suffix}
Summary:       Standardized MySQL database driver for Python 3

Obsoletes:   mysqlx-connector-python3%{?product_suffix}-cext < %{version}-%{release}
Provides:    mysqlx-connector-python3%{?product_suffix}-cext = %{version}-%{release}

%if 0%{?byte_code_only:1}
Obsoletes:     mysqlx-connector-python3 < %{version}-%{release}
Provides:      mysqlx-connector-python3 = %{version}-%{release}
Obsoletes:     mysqlx-connector-python3-cext < %{version}-%{release}
Provides:      mysqlx-connector-python3-cext = %{version}-%{release}
%endif

%if 0%{?rhel} == 8
Requires:      python39
%endif


%description -n mysqlx-connector-python3%{?product_suffix}
MySQL Connector/Python enables Python programs to access MySQL
databases, using an API that is compliant with the Python DB API
version 2.0. It is written in pure Python and does not have any
dependencies except for the Python Standard Library.

This is the Python 3 version of the driver.

The MySQL software has Dual Licensing, which means you can use the
MySQL software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from Oracle and/or its affiliates if you do not wish to be
bound by the terms of the GPL. See the chapter "Licensing and Support"
in the manual for further info.

The MySQL web site (http://www.mysql.com/) provides the latest news
and information about the MySQL software. Also please see the
documentation and the manual for more information.

%prep
%setup -q -n mysql-connector-python%{?product_suffix}-%{version}-src

%install
%{?scl:scl enable %{scl} - << \EOF}
set -ex
COMMON_INSTALL_ARGS="\
    install \
    --prefix=%{_prefix} \
    --root=%{buildroot} \
    --with-protobuf-include-dir=%{with_protobuf_include_dir} \
    --with-protobuf-lib-dir=%{with_protobuf_lib_dir} \
    --with-protoc=%{with_protoc}
"

%if 0%{?extra_compile_args:1}
EXTRA_COMPILE_ARGS="%{extra_compile_args}"
%else
EXTRA_COMPILE_ARGS=""
%endif

%if 0%{?extra_link_args:1}
EXTRA_LINK_ARGS="%{extra_link_args}"
%else
EXTRA_LINK_ARGS=""
%endif

rm -rf %{buildroot}

cd mysqlx-connector-python
%{__python3} setup.py ${COMMON_INSTALL_ARGS} \
    --extra-compile-args="${EXTRA_COMPILE_ARGS}" \
    --extra-link-args="${EXTRA_LINK_ARGS}" %{?byte_code_only}
%{?scl:EOF}

sed -i -e '/protobuf/d' %{buildroot}%{python3_sitearch}/mysqlx_connector_python-*.egg-info/requires.txt
%if 0%{?rhel} == 10
sed -i -e '/Requires-Dist: protobuf/d' %{buildroot}%{python3_sitearch}/mysqlx_connector_python-*.egg-info/PKG-INFO
%endif

%files -n mysqlx-connector-python3%{?product_suffix}
%doc LICENSE.txt CHANGES.txt README.txt README.rst CONTRIBUTING.md SECURITY.md mysqlx-connector-python/docs/INFO_SRC mysqlx-connector-python/docs/INFO_BIN
%{python3_sitearch}/mysqlx
%{python3_sitearch}/mysqlx_connector_python-*.egg-info
%{python3_sitearch}/_mysqlxpb.cpython*.so

%changelog
* Mon Jun 9 2025 Oscar Pacheco <oscar.p.pacheco@oracle.com> - 9.4.0-1
- Updated for 9.4.0

* Fri May 30 2025 Souma Kanti Ghosh <souma.kanti.ghosh@oracle.com> - 9.4.0-1
- Fixed missing license type in license metadata
- Added current year macro to be used in license metadata

* Mon Mar 17 2025 Souma Kanti Ghosh <souma.kanti.ghosh@oracle.com> - 9.3.0-1
- Updated for 9.3.0

* Mon Oct 28 2024 Souma Kanti Ghosh <souma.kanti.ghosh@oracle.com> - 9.2.0-1
- Updated for 9.2.0

* Wed Sep 11 2024 Oscar Pacheco <oscar.p.pacheco@oracle.com> - 9.1.0-1
- Updated for 9.1.0

* Mon Aug 5 2024 Souma Kanti Ghosh <souma.kanti.ghosh@oracle.com> - 9.1.0-1
- Removed rules for Fedora, openSUSE and EL7 platforms
- Removed Python 3.8 support
- Updated copyright year from 2021 to 2024

* Fri May 31 2024 Oscar Pacheco <oscar.p.pacheco@oracle.com> - 9.0.0-1
- Updated for 9.0.0

* Wed Feb 28 2024 Oscar Pacheco <oscar.p.pacheco@oracle.com> - 8.4.0-1
- Updated for 8.4.0

* Wed Dec 6 2023  Oscar Pacheco <oscar.p.pacheco@oracle.com> - 8.3.0-1
- Updated Python version for openSUSE 15 from 3.9 to 3.11

* Fri Dec 1 2023  Oscar Pacheco <oscar.p.pacheco@oracle.com> - 8.3.0-1
- Updated for 8.3.0

* Mon May 22 2023  Nuno Mariz <nuno.mariz@oracle.com> - 8.1.0-1
- Updated for 8.1.0

* Wed Jan 25 2023  Oscar Pacheco <oscar.p.pacheco@oracle.com> - 8.0.33-1
- Updated for 8.0.33

* Sun Oct 23 2022  Kent Boortz <kent.boortz@oracle.com> - 8.0.32-1
- Updated for 8.0.32

* Fri Jul 22 2022  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.31-1
- Updated for 8.0.31

* Mon Apr 18 2022  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.30-1
- Updated for 8.0.30

* Tue Jan 18 2022  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.29-1
- Updated for 8.0.29

* Fri Oct 8 2021  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.28-1
- Updated for 8.0.28

* Tue Jul 20 2021  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.27-1
- Updated for 8.0.27

* Fri Apr 23 2021  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.26-1
- Updated for 8.0.26

* Thu Apr 15 2021  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.25-1
- Updated for 8.0.25

* Mon Feb 1 2021 Sreedhar Sreedhargadda <sreedhar.sreedhargadda@oracle.com> - 8.0.24-2
- Updated for 8.0.24
- Fix for el8 pkgver_lite

* Wed Dec 9 2020 Prashant Tekriwal <prashant.tekriwal@oracle.com> - 8.0.24-1
- Updated for 8.0.24
- Removed python2 support
- Follow updated package guidelines and style

* Mon Nov 16 2020  Prashant Tekriwal <prashant.tekriwal@oracle.com> - 8.0.23-1
- Updated for 8.0.23
- Removed dependency on the Server "client-plugin" RPM

* Mon Sep 07 2020  Kent Boortz <kent.boortz@oracle.com> - 8.0.22-1
- Updated for 8.0.22
- Still provide "mysql-connector-python-cext"
- Removed dependency on "mysql-connector-python3-cext"
- Disabled the bundling of "authentication_ldap_sasl_client.so"
  and added dependency on the Server "client-plugin" RPM

* Thu May 28 2020  Prashant Tekriwal <Prashant.Tekriwal@oracle.com> - 8.0.21-2
- Combined cext package and pure python package to single pkg.
- Added 'lic_type' variable: sets license type. Default is GPLv2
- Removed commercial references.
- Added 'label' variable: can use to add suffix to package name
- Added 'byte_code_only' variable: instructs to generate and keep only .pyc files

* Mon Mar 30 2020  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.21-1
- Updated for 8.0.21

* Mon Jan 13 2020  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.20-1
- Updated for 8.0.20

* Tue Nov 26 2019  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.19-1
- Updated for 8.0.19

* Fri Aug 23 2019  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.18-1
- Updated for 8.0.18

* Mon May 27 2019  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.17-1
- Updated for 8.0.17

* Tue Feb 5 2019  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.16-1
- Updated for 8.0.16

* Fri Jan 25 2019  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.15-1
- Updated for 8.0.15

* Wed Nov 28 2018  Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com> - 8.0.14-2
- Updated copyright year from 2018 to 2019

* Wed Nov 28 2018  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.14-1
- Updated for 8.0.14

* Fri Sep 14 2018  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.13-1
- Updated for 8.0.13

* Sat Sep 1 2018  Israel Gomez <israel.gomez@oracle.com> - 8.0.12-2
- Updated rpm pakage name of open SUSE from sles15 to sl15

* Fri Jun 8 2018  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.12-1
- Updated for 8.0.12

* Fri Mar 16 2018  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.11-1
- Updated for 8.0.11

* Mon Dec 11 2017  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.6-1
- Updated for 8.0.6

* Mon Aug 21 2017  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.5-1
- Updated for 8.0.5

* Mon May 22 2017  Nuno Mariz <nuno.mariz@oracle.com> - 8.0.4-1
- Updated for 8.0.4

* Tue Mar 7 2017  Nuno Mariz <nuno.mariz@oracle.com> - 2.2.3-1
- Updated for 2.2.3

* Tue Oct 4 2016  Nuno Mariz <nuno.mariz@oracle.com> - 2.2.2-1
- Updated for 2.2.2

* Fri Aug 12 2016  Nuno Mariz <nuno.mariz@oracle.com> - 2.2.1-1
- Updated for 2.2.1

* Tue May 24 2016  Nuno Mariz <nuno.mariz@oracle.com> - 2.2.0-1
- Updated for 2.2.0

* Wed Feb 10 2016  Geert Vanderkelen <geert.vanderkelen@oracle.com> - 2.1.4-1
- Updated for 2.1.4

* Fri Jul 31 2015 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 2.1.3-1
- New spec file with support for cext, license options and Python 3 support