Blob Blame History Raw
%global pypi_name agate-sql
%global file_name agatesql
%global project_owner wireservice
%global github_name agate-sql
%global desc agate-sql adds SQL read/write support to agate.

Name:           python-%{pypi_name}
Version:        0.5.3
Release:        1%{?dist}
Summary:        Adds SQL read/write support to agate

License:        MIT
URL:  {pypi_name}
BuildArch:      noarch


%package -n     python2-%{pypi_name}
BuildRequires:  python2-devel
BuildRequires:  python2-nose >= 1.1.2
BuildRequires:  python2-sphinx >= 1.2.2
BuildRequires:  python2-sphinx_rtd_theme >= 0.1.6
BuildRequires:  python2-agate >= 1.6.1
BuildRequires:  python2-sqlalchemy >= 1.0.8
Requires:       python2-agate >= 1.6.1
Requires:       python2-sqlalchemy >= 1.0.8
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}

%package -n     python3-%{pypi_name}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-nose
BuildRequires:  python3-agate >= 1.6.1
BuildRequires:  python3-sqlalchemy >= 1.0.8
Requires:       python3-agate >= 1.6.1
Requires:       python3-sqlalchemy >= 1.0.8
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}

%package -n    python-%{pypi_name}-doc
Summary:       %{summary}
BuildArch:     noarch

%description -n python-%{pypi_name}-doc

Documentation package.

%setup -qn %{github_name}-%{version}
# Remove shebang on non executable scripts
sed -i '1{\@^#!/usr/bin/env python@d}' agatesql/*.py


# Build documentation
pushd docs
    make html
    rm -f _build/html/.buildinfo


# Some tests fails here but they pass on travis. We should check how this environment differs to explain this.
nosetests-%{python2_version} tests -v -e test_to_sql_create_statement_unique_constraint -e test_to_sql_create_statement
nosetests-%{python3_version} tests -v -e test_to_sql_create_statement_unique_constraint -e test_to_sql_create_statement

%files -n python2-%{pypi_name}
%license COPYING

%files -n python3-%{pypi_name}
%license COPYING

%files -n python-%{pypi_name}-doc
%license COPYING
%doc README.rst AUTHORS.rst CHANGELOG.rst docs/_build/

* Mon Mar 12 2018 Julien Enselme <> - 0.5.3-1
- Update to 0.5.3

* Wed Oct 04 2017 Julien Enselme <> - 0.5.2-2
- Fetch sources on github with tag instead of commit

* Mon Oct 02 2017 Julien Enselme <> - 0.5.2-1
- Update to 0.5.2
- Fix minor SPEC issues

* Sun Mar 12 2017 Julien Enselme <> - 0.5.1-1
- Inital package