Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b1417b5f2 | ||
|
|
b2048d3335 |
4 changed files with 80 additions and 16 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1 +1,6 @@
|
||||||
|
*spec~
|
||||||
/mysql-connector-python-0.3.2-devel.tar.gz
|
/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
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,19 @@
|
||||||
%else
|
%else
|
||||||
%global with_python3 0
|
%global with_python3 0
|
||||||
%endif
|
%endif
|
||||||
|
#global versuffix b2
|
||||||
|
|
||||||
Name: mysql-connector-python
|
Name: mysql-connector-python
|
||||||
Version: 0.3.2
|
Version: 1.0.7
|
||||||
Release: 2%{?dist}
|
Release: 1%{?versuffix:.%{versuffix}}%{?dist}
|
||||||
Summary: MySQL Connector for Python 2
|
Summary: MySQL Connector for Python 2
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: GPLv2 with exceptions
|
License: GPLv2 with exceptions
|
||||||
URL: https://launchpad.net/myconnpy
|
URL: http://dev.mysql.com/usingmysql/python/
|
||||||
Source0: http://launchpad.net/myconnpy/0.3/%{version}/+download/%{name}-%{version}-devel.tar.gz
|
# Launch stripdocs.sh to remove non GPL documentation
|
||||||
|
Source0: %{name}-%{version}%{?versuffix}-nodocs.tar.bz2
|
||||||
|
Source1: stripdocs.sh
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
@ -44,22 +47,22 @@ is necessary to run this Python DB API v2.0 compliant driver.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}-devel
|
%setup -q -n %{name}-%{version}%{?versuffix}
|
||||||
|
chmod -x python?/examples/*py
|
||||||
%{__chmod} -x python?/examples/*py
|
mv docs/README.txt README-docs
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# nothin to build
|
# nothing to build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
# Python 3 build
|
# Python 3 build
|
||||||
%{__python3} setup.py install --root $RPM_BUILD_ROOT
|
%{__python3} setup.py install --root $RPM_BUILD_ROOT
|
||||||
%{__rm} -rf build
|
rm -rf build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Python 2 build (end with this for tests)
|
# Python 2 build (end with this for tests)
|
||||||
|
|
@ -67,16 +70,29 @@ is necessary to run this Python DB API v2.0 compliant driver.
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python} unittests.py --mysql-basedir=%{_prefix}
|
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
|
||||||
|
%{__python} unittests.py \
|
||||||
|
--mysql-basedir=%{_prefix} \
|
||||||
|
--verbosity=1
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc ChangeLog COPYING EXCEPTIONS-CLIENT README
|
%doc ChangeLog COPYING README*
|
||||||
%doc python2/examples
|
%doc python2/examples
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
|
|
@ -84,12 +100,22 @@ is necessary to run this Python DB API v2.0 compliant driver.
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n mysql-connector-python3
|
%files -n mysql-connector-python3
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc ChangeLog COPYING EXCEPTIONS-CLIENT README
|
%doc ChangeLog COPYING README*
|
||||||
%doc python3/examples
|
%doc python3/examples
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 3 2012 Remi Collet <remi@fedoraproject.org> - 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 <remi@fedoraproject.org> - 1.0.5-1
|
||||||
|
- version 1.0.5 (beta)
|
||||||
|
- move from launchpad (devel) to dev.mysql.com
|
||||||
|
|
||||||
* Sun Mar 20 2011 Remi Collet <Fedora@famillecollet.com> 0.3.2-2
|
* Sun Mar 20 2011 Remi Collet <Fedora@famillecollet.com> 0.3.2-2
|
||||||
- run unittest during %%check
|
- run unittest during %%check
|
||||||
- fix License
|
- fix License
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
2ffdfa21c0a870cc7080f9f9a5ee3d87 mysql-connector-python-0.3.2-devel.tar.gz
|
9421b654a41f15239db4d4959c01eb6f mysql-connector-python-1.0.7-nodocs.tar.bz2
|
||||||
|
|
|
||||||
33
stripdocs.sh
Executable file
33
stripdocs.sh
Executable file
|
|
@ -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
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue