Compare commits

..

No commits in common. "rawhide" and "f20" have entirely different histories.

5 changed files with 68 additions and 315 deletions

6
.gitignore vendored
View file

@ -13,9 +13,3 @@ clog
/mysql-connector-python-1.1.4.tar.gz /mysql-connector-python-1.1.4.tar.gz
/mysql-connector-python-1.1.5.tar.gz /mysql-connector-python-1.1.5.tar.gz
/mysql-connector-python-1.1.6.tar.gz /mysql-connector-python-1.1.6.tar.gz
/mysql-connector-python-8.0.16.tar.gz
/mysql-connector-python-8.0.19.tar.gz
/mysql-connector-python-8.0.20.tar.gz
/mysql-connector-python-8.0.21.tar.gz
/mysql-connector-python-8.0.33-src.tar.gz
/mysql-connector-python-8.0.33-src-without-fonts.tar.gz

View file

@ -1,49 +0,0 @@
#!/bin/bash
#################################
# downloads the sources of
# mysql-connector-python
# extracts them, removes the
# fonts since they have problematic
# copyright and packs the result
# under a new name
#################################
set -ex
NAME="mysql-connector-python"
# gets the version of the package from the spec file
VERSION=$( rpmspec -q --srpm --qf '%{VERSION}' "${NAME}.spec" )
# the source url of the mysql upstream tarball of the package
SOURCE_URL="http://dev.mysql.com/get/Downloads/Connector-python/8.0/${NAME}-${VERSION}-src.tar.gz"
# original archive name
OLD_ARCHIVE_NAME="${NAME}-${VERSION}-src"
# new tarball name, chnaged to able to differentiate between
# the original and the changed tarball
NEW_ARCHIVE_NAME="${OLD_ARCHIVE_NAME}-without-fonts"
# removes the old tarball, new tarball and the unpacked tarball
# if they are present in the current directory
rm -rf "./${OLD_ARCHIVE_NAME}.tar.gz" "./${OLD_ARCHIVE_NAME}/" "./${NEW_ARCHIVE_NAME}.tar.gz"
# downloads the source tarball from the url
# specified above
wget "${SOURCE_URL}"
#unpacks the original tarball
tar -xzf "${OLD_ARCHIVE_NAME}.tar.gz"
# removes the problematic font files
rm "./${OLD_ARCHIVE_NAME}/docs/mysqlx/_themes/sphinx_rtd_theme/static/css/fonts/"*
# compresses the modified sources under a new name
tar -czf "${NEW_ARCHIVE_NAME}.tar.gz" "${OLD_ARCHIVE_NAME}"
# removes the unpacked sources
rm -r "${OLD_ARCHIVE_NAME}"
# removes the original tarball so it isn't used
# by mistake
rm -f "${OLD_ARCHIVE_NAME}.tar.gz"

View file

@ -1,13 +0,0 @@
diff -Naur mysql-connector-python-8.0.33-src/cpydist/__init__.py mysql-connector-python_patched/cpydist/__init__.py
--- mysql-connector-python-8.0.33-src/cpydist/__init__.py 2023-03-30 12:58:04.000000000 +0200
+++ mysql-connector-python_patched/cpydist/__init__.py 2025-07-21 09:21:19.084953101 +0200
@@ -722,9 +722,6 @@
# Add extra link args
if self.extra_link_args:
ext.extra_link_args.extend(self.extra_link_args.split())
- # Add -rpath if the platform is Linux
- if platform.system() == "Linux" and not self.skip_vendor:
- ext.extra_link_args.extend(["-Wl,-rpath,$ORIGIN/mysql/vendor"])
# Add include dirs
if self.with_openssl_include_dir:
ext.include_dirs.append(self.with_openssl_include_dir)

View file

@ -6,79 +6,45 @@
# #
# Please, preserve the changelog entries # Please, preserve the changelog entries
# #
%{!?__python2: %global __python2 %{__python}}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%if 0%{?fedora} >= 43 %if 0%{?fedora} >= 13
ExcludeArch: %{ix86} %global with_python3 1
%else
%global with_python3 0
%endif %endif
# Tests only run on manual build --with tests # Tests only run on manual build --with tests
# Tests rely on MySQL version 5.6 # Tests rely on MySQL version 5.6
%global with_tests %{?_with_tests:1}%{!?_with_tests:0} %global with_tests %{?_with_tests:1}%{!?_with_tests:0}
# The building of the mysqlxb C extension is
# disabled at the moment as it requires protobuf
# with version 4.25.3 or higher and we only have
# 3.19.6 in fedora at the moment, when protobuf is
# rebased to a sufficient version this condition
# should either be enabled or removed altogether
%global with_mysqlxpb 0
Name: mysql-connector-python Name: mysql-connector-python
Version: 8.0.33 Version: 1.1.6
Release: 7%{?dist} Release: 1%{?dist}
Summary: MySQL Connector for Python 3 Summary: MySQL Connector for Python 2
# Automatically converted from old format: GPLv2 with exceptions - review is highly recommended. Group: Development/Languages
License: (MIT OR GPL-2.0-only) AND GPL-2.0-only AND BSD-2-Clause License: GPLv2 with exceptions
URL: http://dev.mysql.com/doc/connector-python/en/index.html URL: http://dev.mysql.com/doc/connector-python/en/index.html
# You can get the original tarball from: # Upstream has a mirror redirector for downloads, so the URL is hard to
# http://dev.mysql.com/get/Downloads/Connector-python/8.0/%%{name}-%%{version}-src.tar.gz" # represent statically. You can get the tarball by following a link from
# http://dev.mysql.com/downloads/connector/python/
# The tarball has to be modified as the fonts are licensed under a copyright Source0: %{name}-%{version}.tar.gz
# and therefore would clash with the allowed licenses for fonts in fedora if
# they were shipped in the src rpm
# to modify the tarball to the desired form use the
# generate-modified-sources.sh script available in this repo
Source0: %{name}-%{version}-src-without-fonts.tar.gz
Patch0: %{name}-rpath.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python2-devel >= 2.6
%if 0%{?with_python3}
BuildRequires: python3-devel >= 3 BuildRequires: python3-devel >= 3
BuildRequires: gcc-c++ %endif
# for building the extension modules
BuildRequires: mysql-devel
# for building documentation
BuildRequires: python3-sphinx
# for import check (runtime dependency)
BuildRequires: python3-protobuf
%if %{with_tests} %if %{with_tests}
# for unittest # for unittest
BuildRequires: mysql-server BuildRequires: mysql-server
%endif %endif
%if %{with_mysqlxpb}
BuildRequires: protobuf-devel >= 4.25.3
BuildRequires: protobuf-compiler >= 4.25.3
%endif
%generate_buildrequires %description
%pyproject_buildrequires
%global _description\
MySQL Connector/Python is implementing the MySQL Client/Server protocol\
completely in Python. No MySQL libraries are needed, and no compilation\
is necessary to run this Python DB API v2.0 compliant driver.\
\
Documentation: http://dev.mysql.com/doc/connector-python/en/index.html\
%description %_description
%package -n mysql-connector-python3
Summary: MySQL Connector for Python 3
%{?python_provide:%python_provide python3-mysql-connector}
%description -n mysql-connector-python3
MySQL Connector/Python is implementing the MySQL Client/Server protocol MySQL Connector/Python is implementing the MySQL Client/Server protocol
completely in Python. No MySQL libraries are needed, and no compilation completely in Python. No MySQL libraries are needed, and no compilation
is necessary to run this Python DB API v2.0 compliant driver. is necessary to run this Python DB API v2.0 compliant driver.
@ -86,47 +52,50 @@ is necessary to run this Python DB API v2.0 compliant driver.
Documentation: http://dev.mysql.com/doc/connector-python/en/index.html Documentation: http://dev.mysql.com/doc/connector-python/en/index.html
%if 0%{?with_python3}
%package -n mysql-connector-python3
Summary: MySQL Connector for Python 3
%description -n mysql-connector-python3
MySQL Connector/Python is implementing the MySQL Client/Server protocol
completely in Python. No MySQL libraries are needed, and no compilation
is necessary to run this Python DB API v2.0 compliant driver.
Documentation: http://dev.mysql.com/doc/connector-python/en/index.html
%endif
%prep %prep
%setup -q -n %{name}-%{version}-src %setup -q -n %{name}-%{version}
chmod -x examples/*py chmod -x python?/examples/*py
%patch -P0 -p1
%build %build
export MYSQL_CAPI=%{_prefix} # searches for bin/mysql_config in here, enables the extension module # nothing to build
export LDFLAGS="$LDFLAGS -L%{_libdir}/mysql"
%if %{with_mysqlxpb}
export MYSQLXPB_PROTOBUF=%{_prefix}
export MYSQLXPB_PROTOBUF_INCLUDE_DIR=%{_includedir}
export MYSQLXPB_PROTOBUF_LIB_DIR=%{_libdir}
export MYSQLXPB_PROTOC="%{_bindir}/protoc"
%endif
%pyproject_wheel
#building the man pages
cd docs/mysqlx
%{__python3} conf.py
make man BUILDDIR=%{_builddir}
%install %install
%pyproject_install rm -rf %{buildroot}
# create the man dir
mkdir -p %{buildroot}%{_mandir}/man1
# install the man page into the man dir with
# a more fitting name
install -p -m 0644 %{_builddir}/man/mysqlxconnectorpythondevapireference.1 %{buildroot}%{_mandir}/man1/%{name}3.1
# remove the source files the man page was generated from %if 0%{?with_python3}
rm -r docs/mysqlx # Python 3 build
%{__python3} setup.py install --root %{buildroot}
rm -rf build
%endif
# Python 2 build (end with this for tests)
%{__python2} setup.py install --root %{buildroot}
%check %check
%py3_check_import mysql mysqlx
%if %{with_tests} %if %{with_tests}
# known failed tests # known failed tests
# bugs.BugOra14201459.test_error1426 # bugs.BugOra14201459.test_error1426
%{__python2} unittests.py \
--with-mysql=%{_prefix} \
--verbosity=1
%{__python3} unittests.py \ %{__python3} unittests.py \
--with-mysql=%{_prefix} \ --with-mysql=%{_prefix} \
--verbosity=1 --verbosity=1
@ -135,174 +104,26 @@ rm -r docs/mysqlx
%endif %endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING README* docs/README_DOCS.txt
%doc python2/examples
%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n mysql-connector-python3 %files -n mysql-connector-python3
%doc CHANGES.txt README* docs %defattr(-,root,root,-)
%doc examples %doc ChangeLog COPYING README* docs/README_DOCS.txt
%license LICENSE.txt %doc python3/examples
# can't just use %%{python3_sitearch}/* as the packaging %{python3_sitelib}/*
# guidelines dont' allow it
%{python3_sitearch}/mysql/
%{python3_sitearch}/mysqlx/
%{python3_sitearch}/_mysql_connector%{python3_ext_suffix}
%if %{with_mysqlxpb}
%{python3_sitearch}/_mysqlxpb%{python3_ext_suffix}
%endif %endif
%{python3_sitearch}/mysql_connector_python-%{version}.dist-info/
%{_mandir}/man1/%{name}3.1.*
%changelog %changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 8.0.33-7
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 8.0.33-6
- Rebuilt for Python 3.14.0rc2 bytecode
* Tue Jul 29 2025 Michal Schorm <mschorm@redhat.com> - 8.0.33-5
- Rebuild without i686 architecture - MySQL 8.4 no longer supports it
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.33-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jul 21 2025 Michal Schorm <mschorm@redhat.com> - 8.0.33-3
- Bump release for package rebuild
* Tue Jul 15 2025 Michal Schorm <mschorm@redhat.com> - 8.0.33-2
- Bump release for package rebuild
* Wed Jun 18 2025 Pavol Sloboda <psloboda@redhat.com> - 8.0.33-1
- Rebase to 8.0.33
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 8.0.21-17
- Rebuilt for Python 3.14
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Sep 02 2024 Miroslav Suchý <msuchy@redhat.com> - 8.0.21-15
- convert license to SPDX
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 8.0.21-13
- Rebuilt for Python 3.13
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 8.0.21-9
- Rebuilt for Python 3.12
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 8.0.21-6
- Rebuilt for Python 3.11
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 8.0.21-3
- Rebuilt for Python 3.10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Aug 19 2020 Michal Schorm <mschorm@redhat.com> - 8.0.21-1
- Rebase to 8.0.21
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.20-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 8.0.20-2
- Rebuilt for Python 3.9
* Tue May 05 2020 Michal Schorm <mschorm@redhat.com> - 8.0.20-1
- Rebase to 8.0.20
- Upstream stopped to hardcode required protobuf version, patch can be removed
Resolves: #1830662
* Fri Feb 07 2020 Michal Schorm <mschorm@redhat.com> - 8.0.19-3
- Rebuilt for newer protobuf version
Resolves: #1797297
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jan 20 2020 Michal Schorm <mschorm@redhat.com> - 8.0.19-1
- Rebase to 8.0.19
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 8.0.16-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 8.0.16-4
- Rebuilt for Python 3.8
* Mon Jul 29 2019 Miro Hrončok <mhroncok@redhat.com> - 8.0.16-3
- Drop python2-mysql-connector (#1731660)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jul 18 2019 Honza Horak <hhorak@redhat.com> - 8.0.16-1
- Rebase to 8.0.16
Resolves: #1390718
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.6-13
- Rebuilt for Python 3.7
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.6-11
- Python 2 binary package renamed to python2-mysql-connector
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1.6-8
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 1.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Wed Apr 16 2014 Remi Collet <remi@fedoraproject.org> - 1.1.6-1 * Wed Apr 16 2014 Remi Collet <remi@fedoraproject.org> - 1.1.6-1
- version 1.1.6 GA - version 1.1.6 GA
http://dev.mysql.com/doc/relnotes/connector-python/en/news-1-1-6.html http://dev.mysql.com/doc/relnotes/connector-python/en/news-1-1-6.html

View file

@ -1 +1 @@
SHA512 (mysql-connector-python-8.0.33-src-without-fonts.tar.gz) = 81e0d84ab71ed83e6f2f201b1d285507fb2b0d2dae57df97246ac037bc37974477139c500bfce2e348285ef6d7943fdba1bd0fe53c61b451492e9d1b43d0e65a 99e1b5d8bd4d5d4ff4b20683305988d7 mysql-connector-python-1.1.6.tar.gz