157838e
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
157838e
%global with_python3 1
157838e
%endif
157838e
157838e
%global modname pkgwat.api
157838e
157838e
Name:             python-pkgwat-api
7999579
Version:          0.5
ca200d7
Release:          2%{?dist}
157838e
Summary:          Python API for querying the fedora packages webapp
157838e
157838e
Group:            Development/Libraries
157838e
License:          LGPLv2+
157838e
URL:              http://pypi.python.org/pypi/pkgwat.api
157838e
Source0:          http://pypi.python.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
157838e
157838e
BuildArch:        noarch
157838e
157838e
157838e
BuildRequires:    python2-devel
157838e
BuildRequires:    python-setuptools
157838e
157838e
%if 0%{?with_python3}
157838e
BuildRequires:    python3-devel
157838e
BuildRequires:    python3-setuptools
157838e
%endif
157838e
157838e
Requires:         python-six
157838e
Requires:         python-requests
157838e
157838e
%description
157838e
Python API for pkgwat
157838e
http://pypi.python.org/pypi/pkgwat.cli
157838e
157838e
%if 0%{?with_python3}
157838e
%package -n python3-%{name}
157838e
Summary:          Python API for querying the fedora packages webapp
157838e
Group:            Development/Libraries
157838e
157838e
Requires:         python3-six
157838e
Requires:         python3-requests
157838e
157838e
%description -n python3-%{name}
157838e
Python API for pkgwat
157838e
http://pypi.python.org/pypi/pkgwat.cli.
157838e
157838e
%endif
157838e
157838e
%prep
157838e
%setup -q -n %{modname}-%{version}
157838e
rm -rf pkgwat.api.egg-info
157838e
157838e
%if 0%{?with_python3}
157838e
rm -rf %{py3dir}
157838e
cp -a . %{py3dir}
157838e
%endif
157838e
157838e
%build
157838e
%{__python} setup.py build
157838e
157838e
%if 0%{?with_python3}
157838e
pushd %{py3dir}
157838e
%{__python3} setup.py build
157838e
popd
157838e
%endif
157838e
157838e
157838e
%install
157838e
%if 0%{?with_python3}
157838e
pushd %{py3dir}
157838e
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
157838e
popd
157838e
%endif
157838e
157838e
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
157838e
157838e
%files
157838e
%doc README.rst LICENSE lgpl-2.1.txt
157838e
%{python_sitelib}/pkgwat
157838e
%{python_sitelib}/%{modname}-%{version}*
157838e
157838e
%if 0%{?with_python3}
157838e
%files -n python3-%{name}
157838e
%doc README.rst LICENSE lgpl-2.1.txt
157838e
%{python3_sitelib}/pkgwat
157838e
%{python3_sitelib}/%{modname}-%{version}-*
157838e
157838e
%endif
157838e
157838e
157838e
%changelog
ca200d7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-2
ca200d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ca200d7
7999579
* Tue Jan 22 2013 Ralph Bean <rbean@redhat.com> - 0.5-1
7999579
- Latest upstream; Fix to the karma formatting.
7999579
1f4c0c1
* Wed Jan 16 2013 Ralph Bean <rbean@redhat.com> - 0.4-1
1f4c0c1
- Latest upstream with support for newer python-requests.
1f4c0c1
29ab9c7
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.3-5
29ab9c7
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
29ab9c7
b63550e
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
b63550e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b63550e
157838e
* Thu Jul 05 2012 Ralph Bean <rbean@redhat.com> - 0.3-3
157838e
- Remove the bundled egg-info.
157838e
157838e
* Mon Jul 02 2012 Ralph Bean <rbean@redhat.com> - 0.3-2
157838e
- Remove tests for koji.
157838e
157838e
* Mon Jul 02 2012 Ralph Bean <rbean@redhat.com> - 0.3-1
157838e
- Latest upstream, includes unit tests.
157838e
157838e
* Mon Jul 02 2012 Ralph Bean <rbean@redhat.com> - 0.1-1
157838e
- Initial package for Fedora