Drop python2-mysql-connector (#1731660)

This commit is contained in:
Miro Hrončok 2019-07-29 11:39:11 +02:00
commit 9db4e5daf2

View file

@ -6,14 +6,6 @@
#
# 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} >= 13
%global with_python3 1
%else
%global with_python3 0
%endif
# Tests only run on manual build --with tests
# Tests rely on MySQL version 5.6
@ -21,7 +13,7 @@
Name: mysql-connector-python
Version: 8.0.16
Release: 2%{?dist}
Release: 3%{?dist}
Summary: MySQL Connector for Python 2
License: GPLv2 with exceptions
@ -32,10 +24,7 @@ URL: http://dev.mysql.com/doc/connector-python/en/index.html
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel >= 2.6
%if 0%{?with_python3}
BuildRequires: python3-devel >= 3
%endif
%if %{with_tests}
# for unittest
BuildRequires: mysql-server
@ -52,18 +41,9 @@ Documentation: http://dev.mysql.com/doc/connector-python/en/index.html\
%description %_description
%package -n python2-mysql-connector
Summary: %summary
%{?python_provide:%python_provide python2-mysql-connector}
# Remove before F30
Provides: mysql-connector-python%{?_isa} = %{version}-%{release}
Obsoletes: mysql-connector-python < %{version}-%{release}
%description -n python2-mysql-connector %_description
%if 0%{?with_python3}
%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
@ -71,7 +51,6 @@ 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
@ -84,16 +63,8 @@ chmod -x examples/*py
%install
rm -rf %{buildroot}
%if 0%{?with_python3}
# 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
@ -101,10 +72,6 @@ rm -rf build
# known failed tests
# bugs.BugOra14201459.test_error1426
%{__python2} unittests.py \
--with-mysql=%{_prefix} \
--verbosity=1
%{__python3} unittests.py \
--with-mysql=%{_prefix} \
--verbosity=1
@ -113,23 +80,17 @@ rm -rf build
%endif
%files -n python2-mysql-connector
%doc CHANGES.txt README* docs
%doc examples
%license LICENSE.txt
%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n mysql-connector-python3
%doc CHANGES.txt README* docs
%doc examples
%license LICENSE.txt
%{python3_sitelib}/*
%endif
%changelog
* 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