# spec file for mysql-connector-python # # Copyright (c) 2011-2014 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/3.0/ # # 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 %global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: mysql-connector-python Version: 8.0.16 Release: 0%{?dist} Summary: MySQL Connector for Python 2 License: GPLv2 with exceptions URL: http://dev.mysql.com/doc/connector-python/en/index.html # Upstream has a mirror redirector for downloads, so the URL is hard to # represent statically. You can get the tarball by following a link from # http://dev.mysql.com/downloads/connector/python/ 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 %endif %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 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 %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 %setup -q -n %{name}-%{version} chmod -x examples/*py %build # nothing to build %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 %if %{with_tests} # known failed tests # bugs.BugOra14201459.test_error1426 %{__python2} unittests.py \ --with-mysql=%{_prefix} \ --verbosity=1 %{__python3} unittests.py \ --with-mysql=%{_prefix} \ --verbosity=1 %else : echo test suite disabled, need '--with tests' option %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 * Fri Feb 01 2019 Fedora Release Engineering - 1.1.6-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 1.1.6-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 1.1.6-13 - Rebuilt for Python 3.7 * Thu Feb 08 2018 Fedora Release Engineering - 1.1.6-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 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 - 1.1.6-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 1.1.6-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.1.6-8 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 1.1.6-7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.1.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 1.1.6-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Wed Jun 17 2015 Fedora Release Engineering - 1.1.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.1.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue May 27 2014 Kalev Lember - 1.1.6-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Wed Apr 16 2014 Remi Collet - 1.1.6-1 - version 1.1.6 GA http://dev.mysql.com/doc/relnotes/connector-python/en/news-1-1-6.html * Tue Feb 4 2014 Remi Collet - 1.1.5-1 - version 1.1.5 GA http://dev.mysql.com/doc/relnotes/connector-python/en/news-1-1-5.html * Tue Dec 17 2013 Remi Collet - 1.1.4-1 - version 1.1.4 GA http://dev.mysql.com/doc/relnotes/connector-python/en/news-1-1.html - add link to documentation in package description - raise dependency on python 2.6 * Mon Aug 26 2013 Remi Collet - 1.0.12-1 - version 1.0.12 GA * Sat Aug 03 2013 Fedora Release Engineering - 1.0.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jul 3 2013 Remi Collet - 1.0.11-1 - version 1.0.11 GA * Wed May 8 2013 Remi Collet - 1.0.10-1 - version 1.0.10 GA - archive is now free (no more doc to strip) * Wed Feb 27 2013 Remi Collet - 1.0.9-1 - version 1.0.9 GA - disable test suite in mock, fix FTBFS #914203 * Thu Feb 14 2013 Fedora Release Engineering - 1.0.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Dec 29 2012 Remi Collet - 1.0.8-1 - version 1.0.8 GA * Wed Oct 3 2012 Remi Collet - 1.0.7-1 - version 1.0.7 GA * Sat Sep 15 2012 Remi Collet - 1.0.6-2.b2 - version 1.0.6b2 * Fri Sep 7 2012 Remi Collet - 1.0.6-1.b1 - version 1.0.6 (beta) - remove non GPL documentation - disable test_network and test_connection on EL-5 * Fri Aug 10 2012 Remi Collet - 1.0.5-2 - disable test_bugs with MySQL 5.1 (EL-6) * Wed Aug 8 2012 Remi Collet - 1.0.5-1 - version 1.0.5 (beta) - move from launchpad (devel) to dev.mysql.com * Fri Aug 03 2012 David Malcolm - 0.3.2-5 - rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 * Fri Jul 20 2012 Fedora Release Engineering - 0.3.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 13 2012 Fedora Release Engineering - 0.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sun Mar 20 2011 Remi Collet 0.3.2-2 - run unittest during %%check - fix License - add python3 sub package * Wed Mar 09 2011 Remi Collet 0.3.2-1 - first RPM