0ae9d37
%if 0%{?fedora}
157838e
%global with_python3 1
157838e
%endif
157838e
157838e
%global modname pkgwat.api
157838e
157838e
Name:             python-pkgwat-api
cefd97e
Version:          0.8
cefd97e
Release:          1%{?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
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
cefd97e
%if 0%{?rhel}
cefd97e
BuildRequires:    python-ordereddict
cefd97e
Requires:         python-ordereddict
cefd97e
%endif
cefd97e
157838e
%description
157838e
Python API for pkgwat
157838e
http://pypi.python.org/pypi/pkgwat.cli
157838e
157838e
%if 0%{?with_python3}
79f2a80
%package -n python3-pkgwat-api
157838e
Summary:          Python API for querying the fedora packages webapp
157838e
Group:            Development/Libraries
157838e
157838e
Requires:         python3-six
157838e
Requires:         python3-requests
157838e
79f2a80
%description -n python3-pkgwat-api
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}
2661a2b
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
%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}
79f2a80
%files -n python3-pkgwat-api
157838e
%doc README.rst LICENSE lgpl-2.1.txt
157838e
%{python3_sitelib}/pkgwat
157838e
%{python3_sitelib}/%{modname}-%{version}-*
157838e
%endif
157838e
157838e
%changelog
cefd97e
* Tue Apr 09 2013 Ralph Bean <rbean@redhat.com> - 0.8-1
cefd97e
- Latest upstream with a bugfix for py2.6.
cefd97e
- Conditionally depend on python-ordereddict.
cefd97e
- Remove py3.2 patch.  Now included in upstream's release.
cefd97e
79f2a80
* Wed Mar 20 2013 Ralph Bean <rbean@redhat.com> - 0.7-3
79f2a80
- Correctly name the python3 subpackage.
79f2a80
2661a2b
* Thu Feb 28 2013 Ralph Bean <rbean@redhat.com> - 0.7-2
2661a2b
- Patch to fix syntax error on python3.2.
2661a2b
1fcc526
* Thu Feb 28 2013 Ralph Bean <rbean@redhat.com> - 0.7-1
1fcc526
- Latest upstream with a new "get" function.
1fcc526
ed605fb
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 0.6-1
ed605fb
- Latest upstream with new functions for querying relationships.
ed605fb
- Removed spurious newlines in .spec file.
0ae9d37
- Modernized with_python3 conditional.
0ae9d37
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
ed605fb
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