Blame python-PyMySQL.spec

81f8e16
%global pypi_name PyMySQL
5552d4c
%global with_python3 1
81f8e16
81f8e16
Name:           python-%{pypi_name}
495822d
Version:        0.8.0
24afbb8
Release:        4%{?dist}
81f8e16
Summary:        Pure-Python MySQL client library
81f8e16
81f8e16
License:        MIT
81f8e16
URL:            https://pypi.python.org/pypi/%{pypi_name}/
495822d
Source0:        https://files.pythonhosted.org/packages/a8/b4/3544c8e6ed9b1c6a00e5b302e3d5a646e43a8a0ac5216f5ae8706688706e/PyMySQL-0.8.0.tar.gz
ce242ad
81f8e16
BuildArch:      noarch
81f8e16
BuildRequires:  python2-devel
4a24780
BuildRequires:  python2-setuptools
81f8e16
81f8e16
81f8e16
%description
81f8e16
This package contains a pure-Python MySQL client library. The goal of PyMySQL is
81f8e16
to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython
81f8e16
and Jython.
81f8e16
81f8e16
81f8e16
%package -n     python2-%{pypi_name}
81f8e16
Summary:        Pure-Python MySQL client library
81f8e16
%{?python_provide:%python_provide python2-%{pypi_name}}
81f8e16
81f8e16
%description -n python2-%{pypi_name}
81f8e16
This package contains a pure-Python MySQL client library. The goal of PyMySQL is
81f8e16
to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython
81f8e16
and Jython.
81f8e16
5552d4c
%if 0%{?with_python3}
81f8e16
%package -n     python3-%{pypi_name}
81f8e16
Summary:        Pure-Python MySQL client library
24afbb8
BuildRequires:  python%{python3_pkgversion}-devel
24afbb8
BuildRequires:  python%{python3_pkgversion}-setuptools
24afbb8
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
81f8e16
81f8e16
%description -n python3-%{pypi_name}
81f8e16
This package contains a pure-Python MySQL client library. The goal of PyMySQL is
81f8e16
to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython
81f8e16
and Jython.
5552d4c
%endif
81f8e16
ed12619
81f8e16
%prep
81f8e16
%setup -qn %{pypi_name}-%{version}
81f8e16
rm -rf %{pypi_name}.egg-info
81f8e16
ce242ad
81f8e16
%build
81f8e16
%py2_build
5552d4c
%if 0%{?with_python3}
81f8e16
%py3_build
5552d4c
%endif
81f8e16
ed12619
81f8e16
%install
81f8e16
%py2_install
81f8e16
# Remove shebang
5552d4c
for lib in %{buildroot}%{python2_sitelib}/pymysql/tests/thirdparty/test_MySQLdb/*.py; do
81f8e16
  sed -i '1{\@^#!/usr/bin/env python@d}' $lib
81f8e16
done
81f8e16
5552d4c
%if 0%{?with_python3}
5552d4c
%py3_install
81f8e16
# Remove shebang
5552d4c
for lib in %{buildroot}%{python3_sitelib}/pymysql/tests/thirdparty/test_MySQLdb/*.py; do
81f8e16
  sed -i '1{\@^#!/usr/bin/env python@d}' $lib
81f8e16
done
5552d4c
%endif
81f8e16
ed12619
81f8e16
%check
81f8e16
# Tests cannot be launch on koji, they require a mysqldb running.
81f8e16
81f8e16
81f8e16
%files -n python2-%{pypi_name}
81f8e16
%license LICENSE
81f8e16
%doc README.rst
81f8e16
%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info/
81f8e16
%{python2_sitelib}/pymysql/
81f8e16
5552d4c
%if 0%{?with_python3}
81f8e16
%files -n python3-%{pypi_name}
81f8e16
%license LICENSE
81f8e16
%doc README.rst
81f8e16
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
81f8e16
%{python3_sitelib}/pymysql/
5552d4c
%endif
81f8e16
ed12619
81f8e16
%changelog
24afbb8
* Thu Feb 15 2018 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.8.0-4
24afbb8
- make spec file compatible with epel7
24afbb8
df6e7c1
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-3
df6e7c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
df6e7c1
4a24780
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.8.0-2
4a24780
- Update Python 2 dependency declarations to new packaging standards
4a24780
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
4a24780
495822d
* Wed Dec 27 2017 Julien Enselme <jujens@jujens.eu> - 0.8.0-1
495822d
- Update to 0.8.0
495822d
1c13e03
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.11-2
1c13e03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1c13e03
64c1c19
* Fri Apr 07 2017 Julien Enselme <jujens@jujens.eu> - 0.7.11-1
64c1c19
- Update to 0.7.11
64c1c19
ed12619
* Wed Feb 15 2017 Julien Enselme <jujens@jujens.eu> - 0.7.10-1
ed12619
- Update to 0.7.10
ed12619
395d837
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-4
395d837
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
395d837
7340d81
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.7.9-3
7340d81
- Rebuild for Python 3.6
7340d81
ce242ad
* Wed Nov 23 2016 Damien Ciabrini <dciabrin@redhat.com> - 0.7.9-2
ce242ad
- cherrypick commit 755dfdc upstream to allow bind before connect
ce242ad
  Related: rhbz#1378008
ce242ad
c3f291b
* Sun Sep 18 2016 Julien Enselme <jujens@jujens.eu> - 0.7.9-1
c3f291b
- Update to 0.7.9
c3f291b
95d7398
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.7-6
95d7398
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
95d7398
6f5389d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.7-5
6f5389d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6f5389d
559e742
* Mon Jan 4 2016 Julien Enselme <jujens@jujens.eu> - 0.6.7-4
559e742
- Correct installation problems due to Requires: mariadb
559e742
cc36ddb
* Thu Nov 5 2015 Julien Enselme <jujens@jujens.eu> - 0.6.7-3
cc36ddb
- Rebuilt for python 3.5
cc36ddb
5552d4c
* Wed Nov  4 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.6.7-2
5552d4c
- Drop unnecessary mariadb requirement
5552d4c
- Add python3 conditionals in order to rebuild it in EL7
5552d4c
cb9e246
* Thu Oct 1 2015 Julien Enselme <jujens@jujens.eu> - 0.6.7-1
cb9e246
- Update to 0.6.7
cb9e246
81f8e16
* Thu Aug 6 2015 Julien Enselme <jujens@jujens.eu> - 0.6.6-4
81f8e16
- Use %%license in %%files
81f8e16
81f8e16
* Wed Aug 5 2015 Julien Enselme <jujens@jujens.eu> - 0.6.6-3
81f8e16
- Move python2 package in its own subpackage
81f8e16
- Add provides
81f8e16
81f8e16
* Fri Jul 31 2015 Julien Enselme <jujens@jujens.eu> - 0.6.6-2
81f8e16
- Add Provides: python2-PyMySQL
81f8e16
- Remove usage of %%py3dir
81f8e16
81f8e16
* Sun May 31 2015 Julien Enselme <jujens@jujens.eu> - 0.6.6-1
81f8e16
- Update to 0.6.6
81f8e16
81f8e16
* Wed Nov 26 2014 Julien Enselme <jujens@jujens.eu> - 0.6.2-1
81f8e16
- Initial packaging