ad020eb
%global pypi_name agate-sql
ad020eb
%global file_name agatesql
ad020eb
%global project_owner wireservice
ad020eb
%global github_name agate-sql
ad020eb
%global desc agate-sql adds SQL read/write support to agate. http://agate-sql.rtfd.org
ad020eb
ad020eb
ad020eb
Name:           python-%{pypi_name}
ad020eb
Version:        0.5.2
4d0ca46
Release:        4%{?dist}
ad020eb
Summary:        Adds SQL read/write support to agate
ad020eb
ad020eb
License:        MIT
ad020eb
URL:            https://pypi.python.org/pypi/%{pypi_name}
ad020eb
Source0:        https://github.com/%{project_owner}/%{github_name}/archive/%{version}/%{github_name}-%{version}.tar.gz
ad020eb
BuildArch:      noarch
ad020eb
ad020eb
%description
ad020eb
%{desc}
ad020eb
ad020eb
ad020eb
%package -n     python2-%{pypi_name}
ad020eb
BuildRequires:  python2-devel
ad020eb
BuildRequires:  python2-nose >= 1.1.2
ad020eb
BuildRequires:  python2-sphinx >= 1.2.2
ad020eb
BuildRequires:  python2-sphinx_rtd_theme >= 0.1.6
ad020eb
BuildRequires:  python2-agate >= 1.5.0
2490ea3
BuildRequires:  python2-sqlalchemy >= 1.0.8
ad020eb
Requires:       python2-agate >= 1.5.0
2490ea3
Requires:       python2-sqlalchemy >= 1.0.8
ad020eb
Summary:        %{summary}
ad020eb
%{?python_provide:%python_provide python2-%{pypi_name}}
ad020eb
ad020eb
%description -n python2-%{pypi_name}
ad020eb
%{desc}
ad020eb
ad020eb
ad020eb
%package -n     python3-%{pypi_name}
ad020eb
Summary:        %{summary}
ad020eb
BuildRequires:  python3-devel
ad020eb
BuildRequires:  python3-nose
ad020eb
BuildRequires:  python3-agate >= 1.5.0
ad020eb
BuildRequires:  python3-sqlalchemy >= 1.0.8
ad020eb
Requires:       python3-agate >= 1.5.0
ad020eb
Requires:       python3-sqlalchemy >= 1.0.8
ad020eb
%{?python_provide:%python_provide python3-%{pypi_name}}
ad020eb
ad020eb
%description -n python3-%{pypi_name}
ad020eb
%{desc}
ad020eb
ad020eb
ad020eb
%package -n    python-%{pypi_name}-doc
ad020eb
Summary:       %{summary}
ad020eb
BuildArch:     noarch
ad020eb
ad020eb
%description -n python-%{pypi_name}-doc
ad020eb
%{desc}
ad020eb
ad020eb
Documentation package.
ad020eb
ad020eb
ad020eb
%prep
ad020eb
%setup -qn %{github_name}-%{version}
ad020eb
# Remove shebang on non executable scripts
ad020eb
sed -i '1{\@^#!/usr/bin/env python@d}' agatesql/*.py
ad020eb
ad020eb
ad020eb
%build
ad020eb
%py2_build
ad020eb
%py3_build
ad020eb
ad020eb
# Build documentation
ad020eb
pushd docs
ad020eb
    make html
ad020eb
    rm -f _build/html/.buildinfo
ad020eb
popd
ad020eb
ad020eb
ad020eb
%install
ad020eb
%py3_install
ad020eb
%py2_install
ad020eb
ad020eb
ad020eb
%check
ad020eb
nosetests-%{python2_version} tests -v
ad020eb
nosetests-%{python3_version} tests -v
ad020eb
ad020eb
ad020eb
%files -n python2-%{pypi_name}
ad020eb
%doc README.rst AUTHORS.rst CHANGELOG.rst
ad020eb
%license COPYING
ad020eb
%{python2_sitelib}/agate_sql-%{version}-py%{python2_version}.egg-info/
ad020eb
%{python2_sitelib}/%{file_name}/
ad020eb
ad020eb
ad020eb
%files -n python3-%{pypi_name}
ad020eb
%doc README.rst AUTHORS.rst CHANGELOG.rst
ad020eb
%license COPYING
ad020eb
%{python3_sitelib}/agate_sql-%{version}-py%{python3_version}.egg-info/
ad020eb
%{python3_sitelib}/%{file_name}/
ad020eb
ad020eb
ad020eb
%files -n python-%{pypi_name}-doc
ad020eb
%license COPYING
ad020eb
%doc README.rst AUTHORS.rst CHANGELOG.rst docs/_build/
ad020eb
ad020eb
ad020eb
%changelog
4d0ca46
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4
4d0ca46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4d0ca46
2490ea3
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.2-3
2490ea3
- Update Python 2 dependency declarations to new packaging standards
2490ea3
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
2490ea3
ad020eb
* Wed Oct 04 2017 Julien Enselme <jujens@jujens.eu> - 0.5.2-2
ad020eb
- Fetch sources on github with tag instead of commit
ad020eb
ad020eb
* Mon Oct 02 2017 Julien Enselme <jujens@jujens.eu> - 0.5.2-1
ad020eb
- Update to 0.5.2
ad020eb
- Fix minor SPEC issues
ad020eb
ad020eb
* Sun Mar 12 2017 Julien Enselme <jujens@jujens.eu> - 0.5.1-1
ad020eb
- Inital package