Blob Blame Raw
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global realname xgoogle
Name:		python-%{realname}
Version:	1.4
Release:	13%{?dist}
Summary:	Python library to search Google without using their API
Group:		Development/Languages
License:	MIT
URL:		http://www.catonmat.net/blog/python-library-for-google-search/
Source0:	http://www.catonmat.net/download/xgoogle.zip
Source1:	%{realname}-setup.py
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:	python-devel
BuildRequires:	python-setuptools
BuildRequires:	dos2unix
BuildArch:	noarch
%global _description\
A Python library to search Google without using their API.\
%description %_description
%package -n python2-%{realname}
Summary: %summary
Requires:	python-BeautifulSoup
%{?python_provide:%python_provide python2-%{realname}}
%description -n python2-%{realname} %_description
%prep
%setup -q -c -n %{realname}-%{version}
rm -f %{realname}/BeautifulSoup.py
rm -f %{realname}/*.pyc
install -m 0644 -p %{SOURCE1} setup.py
dos2unix contributors.txt projects-using-xgoogle.txt readme.txt
dos2unix xgoogle/{browser.py,googlesets.py,sponsoredlinks.py,translate.py}
sed -i -e "/^#\!\/usr\/bin\/python$/d" xgoogle/*.py
%build
%{__python} -c 'import setuptools; execfile("setup.py")' build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files -n python2-%{realname}
%defattr(-,root,root,-)
%doc examples contributors.txt projects-using-xgoogle.txt readme.txt
%{python_sitelib}/%{realname}/
%{python_sitelib}/%{realname}-%{version}-*.egg-info/
%changelog
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.4-13
- Python 2 binary package renamed to python2-xgoogle
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sun Jun 19 2011 Peter Lemenkov <lemenkov@gmail.com> - 1.4-3
- Added missing BuildRequires
* Sun Jun 05 2011 Peter Lemenkov <lemenkov@gmail.com> - 1.4-2
- Fixed rpmlint errors
* Fri Jun 03 2011 Peter Lemenkov <lemenkov@gmail.com> - 1.4-1
- Initial package