From 34d36bd0d3b3af782dea2dd87f255840a272cea8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 27 Feb 2013 09:03:53 +0100 Subject: [PATCH 1/3] version 1.0.9 GA, disable test suite in mock --- .gitignore | 1 + mysql-connector-python.spec | 28 ++++++++++++++-------------- sources | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index a3bae76..68fb7a6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /mysql-connector-python-1.0.6b2-nodocs.tar.bz2 /mysql-connector-python-1.0.7-nodocs.tar.bz2 /mysql-connector-python-1.0.8-nodocs.tar.bz2 +/mysql-connector-python-1.0.9-nodocs.tar.bz2 diff --git a/mysql-connector-python.spec b/mysql-connector-python.spec index 2f927ef..1f79366 100644 --- a/mysql-connector-python.spec +++ b/mysql-connector-python.spec @@ -5,10 +5,13 @@ %else %global with_python3 0 %endif -#global versuffix b2 + +# 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: 1.0.8 +Version: 1.0.9 Release: 1%{?versuffix:.%{versuffix}}%{?dist} Summary: MySQL Connector for Python 2 @@ -70,21 +73,14 @@ rm -rf build %check -ver=$(mysql_config --version 2>/dev/null || echo 0) -if [ "$ver" \< "5.5" ] -then - ## Test 809033 fails with mysql 5.1 - sed -e '/test_bugs/d' \ - -i python2/tests/__init__.py -fi -%if 0%{?rhel} == 5 - sed -e '/test_network/d' \ - -e '/test_connection/d' \ - -i python2/tests/__init__.py -%endif +%if %{with_tests} %{__python} unittests.py \ --mysql-basedir=%{_prefix} \ --verbosity=1 +%else +: echo test suite disabled, need '--with tests' option +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -106,6 +102,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Feb 27 2013 Remi Collet - 1.0.9-1 +- version 1.0.9 GA +- disable test suite in mock, fix FTBFS #914203 + * Sat Dec 29 2012 Remi Collet - 1.0.8-1 - version 1.0.8 GA diff --git a/sources b/sources index 2041f84..c20d42a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -38655dade1b06d18ba1085ac6f00018f mysql-connector-python-1.0.8-nodocs.tar.bz2 +4dcae4f24576958bfb6f02a1554f1dfe mysql-connector-python-1.0.9-nodocs.tar.bz2 From a93fe5a79ed3c455cbfbfd9ae5de7f258a835099 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 8 May 2013 15:29:53 +0200 Subject: [PATCH 2/3] update to 1.0.10 --- .gitignore | 1 + mysql-connector-python.spec | 32 ++++++++++++++++++-------------- sources | 2 +- stripdocs.sh | 33 --------------------------------- 4 files changed, 20 insertions(+), 48 deletions(-) delete mode 100755 stripdocs.sh diff --git a/.gitignore b/.gitignore index 68fb7a6..4f1db38 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /mysql-connector-python-1.0.7-nodocs.tar.bz2 /mysql-connector-python-1.0.8-nodocs.tar.bz2 /mysql-connector-python-1.0.9-nodocs.tar.bz2 +/mysql-connector-python-1.0.10.tar.gz diff --git a/mysql-connector-python.spec b/mysql-connector-python.spec index 1f79366..635068e 100644 --- a/mysql-connector-python.spec +++ b/mysql-connector-python.spec @@ -11,16 +11,17 @@ %global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: mysql-connector-python -Version: 1.0.9 -Release: 1%{?versuffix:.%{versuffix}}%{?dist} +Version: 1.0.10 +Release: 1%{?dist} Summary: MySQL Connector for Python 2 Group: Development/Languages License: GPLv2 with exceptions -URL: http://dev.mysql.com/usingmysql/python/ -# Launch stripdocs.sh to remove non GPL documentation -Source0: %{name}-%{version}%{?versuffix}-nodocs.tar.bz2 -Source1: stripdocs.sh +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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -50,9 +51,8 @@ is necessary to run this Python DB API v2.0 compliant driver. %prep -%setup -q -n %{name}-%{version}%{?versuffix} +%setup -q -n %{name}-%{version} chmod -x python?/examples/*py -mv docs/README.txt README-docs %build @@ -60,16 +60,16 @@ mv docs/README.txt README-docs %install -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %if 0%{?with_python3} # Python 3 build -%{__python3} setup.py install --root $RPM_BUILD_ROOT +%{__python3} setup.py install --root %{buildroot} rm -rf build %endif # Python 2 build (end with this for tests) -%{__python} setup.py install --root $RPM_BUILD_ROOT +%{__python} setup.py install --root %{buildroot} %check @@ -83,12 +83,12 @@ rm -rf build %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc ChangeLog COPYING README* +%doc ChangeLog COPYING README* docs/README_DOCS.txt %doc python2/examples %{python_sitelib}/* @@ -96,12 +96,16 @@ rm -rf $RPM_BUILD_ROOT %if 0%{?with_python3} %files -n mysql-connector-python3 %defattr(-,root,root,-) -%doc ChangeLog COPYING README* +%doc ChangeLog COPYING README* docs/README_DOCS.txt %doc python3/examples %{python3_sitelib}/* %endif %changelog +* 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 diff --git a/sources b/sources index c20d42a..3cfc38c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4dcae4f24576958bfb6f02a1554f1dfe mysql-connector-python-1.0.9-nodocs.tar.bz2 +439c769f9121d4cf24f4f8590c5a9c00 mysql-connector-python-1.0.10.tar.gz diff --git a/stripdocs.sh b/stripdocs.sh deleted file mode 100755 index b28fb7a..0000000 --- a/stripdocs.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -if [ "$1" = "" ]; then - echo usage $0 version - exit 1 -fi - -if [ ! -f mysql-connector-python-$1.tar.gz ]; then - echo please download mysql-connector-python-$1.tar.gz - echo http://dev.mysql.com/downloads/connector/python/ - exit 1 -fi - -tdir=`mktemp -d tmpXXXXXX` -pushd $tdir - -echo -n "unpacking..." -tar xzf ../mysql-connector-python-$1.tar.gz && echo " done" -rm -rf mysql-connector-python-$1/docs/my* -echo -n "packing..." -tar cjf ../mysql-connector-python-$1-nodocs.tar.bz2 mysql-connector-python-$1 && echo " done" - -echo -n "diffing..." -tar tzf ../mysql-connector-python-$1.tar.gz | sort >before -echo -n "..." -tar tjf ../mysql-connector-python-$1-nodocs.tar.bz2 | sort >after - -diff before after - -popd -echo "cleaning..." -rm -rf $tdir - From 22f13e5bb66dcc94c7f43fc5837f909c37400b8e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 26 Aug 2013 18:17:46 +0200 Subject: [PATCH 3/3] update to 1.0.12 (GA) --- .gitignore | 2 ++ mysql-connector-python.spec | 29 +++++++++++++++++++++-------- sources | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 4f1db38..949e6f7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ /mysql-connector-python-1.0.8-nodocs.tar.bz2 /mysql-connector-python-1.0.9-nodocs.tar.bz2 /mysql-connector-python-1.0.10.tar.gz +/mysql-connector-python-1.0.11.tar.gz +/mysql-connector-python-1.0.12.tar.gz diff --git a/mysql-connector-python.spec b/mysql-connector-python.spec index 635068e..f3ab7a9 100644 --- a/mysql-connector-python.spec +++ b/mysql-connector-python.spec @@ -1,4 +1,13 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +# spec file for mysql-connector-python +# +# Copyright (c) 2011-2013 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 @@ -11,7 +20,7 @@ %global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: mysql-connector-python -Version: 1.0.10 +Version: 1.0.12 Release: 1%{?dist} Summary: MySQL Connector for Python 2 @@ -25,12 +34,14 @@ Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: python-devel +BuildRequires: python2-devel %if 0%{?with_python3} BuildRequires: python3-devel %endif +%if %{with_tests} # for unittest BuildRequires: mysql-server +%endif %description @@ -40,8 +51,7 @@ is necessary to run this Python DB API v2.0 compliant driver. %if 0%{?with_python3} %package -n mysql-connector-python3 - -Summary: MySQL Connector for Python 3 +Summary: MySQL Connector for Python 3 %description -n mysql-connector-python3 MySQL Connector/Python is implementing the MySQL Client/Server protocol @@ -69,12 +79,12 @@ rm -rf build %endif # Python 2 build (end with this for tests) -%{__python} setup.py install --root %{buildroot} +%{__python2} setup.py install --root %{buildroot} %check %if %{with_tests} -%{__python} unittests.py \ +%{__python2} unittests.py \ --mysql-basedir=%{_prefix} \ --verbosity=1 %else @@ -90,7 +100,7 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %doc ChangeLog COPYING README* docs/README_DOCS.txt %doc python2/examples -%{python_sitelib}/* +%{python2_sitelib}/* %if 0%{?with_python3} @@ -102,6 +112,9 @@ rm -rf %{buildroot} %endif %changelog +* Mon Aug 26 2013 Remi Collet - 1.0.12-1 +- version 1.0.12 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) diff --git a/sources b/sources index 3cfc38c..e0ae4d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -439c769f9121d4cf24f4f8590c5a9c00 mysql-connector-python-1.0.10.tar.gz +caac07dc8fa08d1f55ad0c51491d2ba7 mysql-connector-python-1.0.12.tar.gz