%if 0%{?rhel} && 0%{?rhel} <= 5
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%global canonicalname socksipychain
%global upstreamname SocksipyChain
Name: python-%{canonicalname}
Version: 2.0.15
Release: 2%{?dist}
Summary: A Python SOCKS/HTTP Proxy module
Group: Development/Libraries
License: BSD
Url: http://github.com/pagekite/Py%{canonicalname}
Source0: http://pagekite.net/pk/src/%{upstreamname}-%{version}.tar.gz
%if 0%{?rhel} && 0%{?rhel} <= 5
%endif
BuildArch: noarch
BuildRequires: python2-devel
%global _description\
This Python module allows you to create TCP connections through a chain\
of SOCKS or HTTP proxies without any special effort. It also supports\
TLS/SSL encryption if the OpenSSL modules are installed.\
%description %_description
%package -n python2-%{canonicalname}
Summary: %summary
%{?python_provide:%python_provide python2-%{canonicalname}}
%description -n python2-%{canonicalname} %_description
%prep
%setup -q -n %{upstreamname}-%{version}
%build
%install
install -Dpm 0755 sockschain/__init__.py $RPM_BUILD_ROOT%{python_sitelib}/sockschain/__init__.py
%if 0%{?rhel} && 0%{?rhel} <= 5
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%endif
%files -n python2-%{canonicalname}
%defattr(-,root,root,-)
%doc LICENSE README.md BUGS
%{python_sitelib}/sockschain
%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.0.12-10
- Python 2 binary package renamed to python2-socksipychain
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.12-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Apr 14 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 2.0.12-3
- Package review fixes
* Wed Feb 20 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 2.0.12-2
- Initial package review fixes
* Fri Feb 08 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 2.0.12-1
- Initial version.