Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22f13e5bb6 | ||
|
|
a93fe5a79e | ||
|
|
34d36bd0d3 |
4 changed files with 55 additions and 67 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -5,3 +5,7 @@
|
||||||
/mysql-connector-python-1.0.6b2-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.7-nodocs.tar.bz2
|
||||||
/mysql-connector-python-1.0.8-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
|
||||||
|
/mysql-connector-python-1.0.11.tar.gz
|
||||||
|
/mysql-connector-python-1.0.12.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,47 @@
|
||||||
%{!?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
|
%if 0%{?fedora} >= 13
|
||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%else
|
%else
|
||||||
%global with_python3 0
|
%global with_python3 0
|
||||||
%endif
|
%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
|
Name: mysql-connector-python
|
||||||
Version: 1.0.8
|
Version: 1.0.12
|
||||||
Release: 1%{?versuffix:.%{versuffix}}%{?dist}
|
Release: 1%{?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: http://dev.mysql.com/usingmysql/python/
|
URL: http://dev.mysql.com/doc/connector-python/en/index.html
|
||||||
# Launch stripdocs.sh to remove non GPL documentation
|
# Upstream has a mirror redirector for downloads, so the URL is hard to
|
||||||
Source0: %{name}-%{version}%{?versuffix}-nodocs.tar.bz2
|
# represent statically. You can get the tarball by following a link from
|
||||||
Source1: stripdocs.sh
|
# http://dev.mysql.com/downloads/connector/python/
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: python-devel
|
BuildRequires: python2-devel
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_tests}
|
||||||
# for unittest
|
# for unittest
|
||||||
BuildRequires: mysql-server
|
BuildRequires: mysql-server
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -36,8 +51,7 @@ is necessary to run this Python DB API v2.0 compliant driver.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n mysql-connector-python3
|
%package -n mysql-connector-python3
|
||||||
|
Summary: MySQL Connector for Python 3
|
||||||
Summary: MySQL Connector for Python 3
|
|
||||||
|
|
||||||
%description -n mysql-connector-python3
|
%description -n mysql-connector-python3
|
||||||
MySQL Connector/Python is implementing the MySQL Client/Server protocol
|
MySQL Connector/Python is implementing the MySQL Client/Server protocol
|
||||||
|
|
@ -47,9 +61,8 @@ is necessary to run this Python DB API v2.0 compliant driver.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{?versuffix}
|
%setup -q -n %{name}-%{version}
|
||||||
chmod -x python?/examples/*py
|
chmod -x python?/examples/*py
|
||||||
mv docs/README.txt README-docs
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
@ -57,55 +70,59 @@ mv docs/README.txt README-docs
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%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 %{buildroot}
|
||||||
rm -rf build
|
rm -rf build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Python 2 build (end with this for tests)
|
# Python 2 build (end with this for tests)
|
||||||
%{__python} setup.py install --root $RPM_BUILD_ROOT
|
%{__python2} setup.py install --root %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
ver=$(mysql_config --version 2>/dev/null || echo 0)
|
%if %{with_tests}
|
||||||
if [ "$ver" \< "5.5" ]
|
%{__python2} unittests.py \
|
||||||
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} \
|
--mysql-basedir=%{_prefix} \
|
||||||
--verbosity=1
|
--verbosity=1
|
||||||
|
%else
|
||||||
|
: echo test suite disabled, need '--with tests' option
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc ChangeLog COPYING README*
|
%doc ChangeLog COPYING README* docs/README_DOCS.txt
|
||||||
%doc python2/examples
|
%doc python2/examples
|
||||||
%{python_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
|
|
||||||
|
|
||||||
%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 README*
|
%doc ChangeLog COPYING README* docs/README_DOCS.txt
|
||||||
%doc python3/examples
|
%doc python3/examples
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 26 2013 Remi Collet <remi@fedoraproject.org> - 1.0.12-1
|
||||||
|
- version 1.0.12 GA
|
||||||
|
|
||||||
|
* Wed May 8 2013 Remi Collet <remi@fedoraproject.org> - 1.0.10-1
|
||||||
|
- version 1.0.10 GA
|
||||||
|
- archive is now free (no more doc to strip)
|
||||||
|
|
||||||
|
* Wed Feb 27 2013 Remi Collet <remi@fedoraproject.org> - 1.0.9-1
|
||||||
|
- version 1.0.9 GA
|
||||||
|
- disable test suite in mock, fix FTBFS #914203
|
||||||
|
|
||||||
* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.0.8-1
|
* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.0.8-1
|
||||||
- version 1.0.8 GA
|
- version 1.0.8 GA
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
38655dade1b06d18ba1085ac6f00018f mysql-connector-python-1.0.8-nodocs.tar.bz2
|
caac07dc8fa08d1f55ad0c51491d2ba7 mysql-connector-python-1.0.12.tar.gz
|
||||||
|
|
|
||||||
33
stripdocs.sh
33
stripdocs.sh
|
|
@ -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
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue