diff --git a/.gitignore b/.gitignore index fd80d34..68fb7a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ +*spec~ /mysql-connector-python-0.3.2-devel.tar.gz +/mysql-connector-python-1.0.5.tar.gz +/mysql-connector-python-1.0.6b1-nodocs.tar.bz2 +/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 a711441..ee30d6c 100644 --- a/mysql-connector-python.spec +++ b/mysql-connector-python.spec @@ -6,15 +6,21 @@ %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: 0.3.2 -Release: 3%{?dist} +Version: 1.0.9 +Release: 1%{?versuffix:.%{versuffix}}%{?dist} Summary: MySQL Connector for Python 2 Group: Development/Languages License: GPLv2 with exceptions -URL: https://launchpad.net/myconnpy -Source0: http://launchpad.net/myconnpy/0.3/%{version}/+download/%{name}-%{version}-devel.tar.gz +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 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -44,22 +50,22 @@ is necessary to run this Python DB API v2.0 compliant driver. %prep -%setup -q -n %{name}-%{version}-devel - -%{__chmod} -x python?/examples/*py +%setup -q -n %{name}-%{version}%{?versuffix} +chmod -x python?/examples/*py +mv docs/README.txt README-docs %build -# nothin to build +# nothing to build %install -%{__rm} -rf $RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT %if 0%{?with_python3} # Python 3 build %{__python3} setup.py install --root $RPM_BUILD_ROOT -%{__rm} -rf build +rm -rf build %endif # Python 2 build (end with this for tests) @@ -67,16 +73,22 @@ is necessary to run this Python DB API v2.0 compliant driver. %check -%{__python} unittests.py --mysql-basedir=%{_prefix} +%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 +rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc ChangeLog COPYING EXCEPTIONS-CLIENT README +%doc ChangeLog COPYING README* %doc python2/examples %{python_sitelib}/* @@ -84,12 +96,29 @@ is necessary to run this Python DB API v2.0 compliant driver. %if 0%{?with_python3} %files -n mysql-connector-python3 %defattr(-,root,root,-) -%doc ChangeLog COPYING EXCEPTIONS-CLIENT README +%doc ChangeLog COPYING README* %doc python3/examples %{python3_sitelib}/* %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 + +* Wed Oct 3 2012 Remi Collet - 1.0.7-1 +- version 1.0.7 GA +- remove non GPL documentation +- disable test_network and test_connection on EL-5 +- 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 Jan 13 2012 Fedora Release Engineering - 0.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index ec99825..c20d42a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2ffdfa21c0a870cc7080f9f9a5ee3d87 mysql-connector-python-0.3.2-devel.tar.gz +4dcae4f24576958bfb6f02a1554f1dfe mysql-connector-python-1.0.9-nodocs.tar.bz2 diff --git a/stripdocs.sh b/stripdocs.sh new file mode 100755 index 0000000..b28fb7a --- /dev/null +++ b/stripdocs.sh @@ -0,0 +1,33 @@ +#!/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 +