00ce3ba
# Created by pyp2rpm-1.1.1
00ce3ba
%global pypi_name testing.postgresql
00ce3ba
%global with_python3 1
00ce3ba
00ce3ba
Name:           python-%{pypi_name}
00ce3ba
Version:        1.1.0
beadb10
Release:        4%{?dist}
00ce3ba
Summary:        Automatically setup a PostgreSQL testing instance
00ce3ba
00ce3ba
License:        ASL 2.0
00ce3ba
URL:            http://bitbucket.org/tk0miya/testing.postgresql
00ce3ba
Source0:        https://pypi.python.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
00ce3ba
BuildArch:      noarch
00ce3ba
00ce3ba
BuildRequires:  python-devel
00ce3ba
BuildRequires:  python-nose
00ce3ba
BuildRequires:  python-psycopg2
00ce3ba
BuildRequires:  postgresql-server
00ce3ba
00ce3ba
%if 0%{?with_python3}
00ce3ba
BuildRequires:  python3-devel
00ce3ba
BuildRequires:  python3-nose
00ce3ba
BuildRequires:  python3-psycopg2
00ce3ba
%endif
00ce3ba
00ce3ba
Requires:       python-psycopg2
00ce3ba
Requires:       postgresql-server
00ce3ba
00ce3ba
%description
00ce3ba
testing.PostgreSQL automatically setups a PostgreSQL instance
00ce3ba
in a temporary directory, and destroys it after testing.
00ce3ba
00ce3ba
%if 0%{?with_python3}
00ce3ba
%package -n     python3-%{pypi_name}
00ce3ba
Summary:        Automatically setup a PostgreSQL testing instance
00ce3ba
00ce3ba
Requires:       python3-psycopg2
00ce3ba
00ce3ba
%description -n python3-%{pypi_name}
00ce3ba
testing.PostgreSQL automatically setups a PostgreSQL instance
00ce3ba
in a temporary directory, and destroys it after testing.
00ce3ba
%endif
00ce3ba
00ce3ba
%prep
00ce3ba
%setup -q -n %{pypi_name}-%{version}
00ce3ba
# Remove bundled egg-info
00ce3ba
rm -rf %{pypi_name}.egg-info
00ce3ba
00ce3ba
00ce3ba
%if 0%{?with_python3}
00ce3ba
rm -rf %{py3dir}
00ce3ba
cp -a . %{py3dir}
00ce3ba
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
00ce3ba
%endif
00ce3ba
00ce3ba
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
00ce3ba
00ce3ba
%build
00ce3ba
%{__python2} setup.py build
00ce3ba
00ce3ba
%if 0%{?with_python3}
00ce3ba
pushd %{py3dir}
00ce3ba
%{__python3} setup.py build
00ce3ba
popd
00ce3ba
%endif
00ce3ba
00ce3ba
00ce3ba
%install
00ce3ba
# Must do the subpackages' install first because the scripts in /usr/bin are
00ce3ba
# overwritten with every setup.py install (and we want the python2 version
00ce3ba
# to be the default for now).
00ce3ba
%if 0%{?with_python3}
00ce3ba
pushd %{py3dir}
00ce3ba
%{__python3} setup.py install --skip-build --root %{buildroot}
00ce3ba
popd
00ce3ba
%endif
00ce3ba
00ce3ba
%{__python2} setup.py install --skip-build --root %{buildroot}
00ce3ba
00ce3ba
00ce3ba
%check
00ce3ba
%{__python2} setup.py test
00ce3ba
00ce3ba
%if 0%{?with_python3}
00ce3ba
pushd %{py3dir}
00ce3ba
%{__python3} setup.py test
00ce3ba
popd
00ce3ba
%endif
00ce3ba
00ce3ba
00ce3ba
%files
00ce3ba
%doc README.rst LICENSE
00ce3ba
%{python2_sitelib}/testing
00ce3ba
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
00ce3ba
00ce3ba
%if 0%{?with_python3}
00ce3ba
%files -n python3-%{pypi_name}
00ce3ba
%doc README.rst LICENSE
00ce3ba
%{python3_sitelib}/testing
00ce3ba
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
00ce3ba
%endif
00ce3ba
00ce3ba
00ce3ba
%changelog
beadb10
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
beadb10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
beadb10
30e1855
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
30e1855
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
30e1855
af4e04b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
af4e04b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
af4e04b
00ce3ba
* Thu Jan 08 2015 Richard Marko <rmarko@fedoraproject.org> - 1.1.0-1
00ce3ba
- Initial package