diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b04dcbf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/PySocks-1.6.8.tar.gz diff --git a/.python-pysocks.metadata b/.python-pysocks.metadata new file mode 100644 index 0000000..a265642 --- /dev/null +++ b/.python-pysocks.metadata @@ -0,0 +1 @@ +f4292b91c78bc388616674cefbfeb01e9a1c903d SOURCES/PySocks-1.6.8.tar.gz diff --git a/SPECS/python-pysocks.spec b/SPECS/python-pysocks.spec new file mode 100644 index 0000000..3791111 --- /dev/null +++ b/SPECS/python-pysocks.spec @@ -0,0 +1,136 @@ +%bcond_without python3 + +%global distname PySocks +%global flatname pysocks +%global sum A Python SOCKS client module + +Name: python-pysocks +Version: 1.6.8 +Release: 6%{?dist} +Summary: %{sum} + +License: BSD +URL: https://github.com/Anorov/PySocks +Source0: https://files.pythonhosted.org/packages/source/P/PySocks/PySocks-%{version}.tar.gz +BuildArch: noarch + + +%description +A fork of SocksiPy with bug fixes and extra features. + +Acts as a drop-in replacement to the socket module. Featuring: + +- SOCKS proxy client for Python 2.6 - 3.x +- TCP and UDP both supported +- HTTP proxy client included but not supported or recommended (you should use + urllib2's or requests' own HTTP proxy interface) +- urllib2 handler included. + + +%package -n python2-%{flatname} +Summary: %{sum} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +%{?python_provide:%python_provide python2-%{flatname}} + +# https://bugzilla.redhat.com/show_bug.cgi?id=1334407 +Obsoletes: python-SocksiPy +Obsoletes: python2-SocksiPy +Provides: python2-SocksiPy + + +%description -n python2-%{flatname} +A fork of SocksiPy with bug fixes and extra features. + +Acts as a drop-in replacement to the socket module. Featuring: + +- SOCKS proxy client for Python 2.6 - 3.x +- TCP and UDP both supported +- HTTP proxy client included but not supported or recommended (you should use + urllib2's or requests' own HTTP proxy interface) +- urllib2 handler included. + + +%if %{with python3} +%package -n python%{python3_pkgversion}-%{flatname} +Summary: %{sum} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%{?python_provide:%python_provide python%{python3_pkgversion}-%{flatname}} + +# This package doesn't actually exist... but if it did, we would conflict with +# it. +Conflicts: python%{python3_pkgversion}-SocksiPy + + +%description -n python%{python3_pkgversion}-%{flatname} +A fork of SocksiPy with bug fixes and extra features. + +Acts as a drop-in replacement to the socket module. Featuring: + +- SOCKS proxy client for Python 2.6 - 3.x +- TCP and UDP both supported +- HTTP proxy client included but not supported or recommended (you should use + urllib2's or requests' own HTTP proxy interface) +- urllib2 handler included. + +%endif + +%prep +%autosetup -n %{distname}-%{version} + +%build +%py2_build +%if %{with python3} +%py3_build +%endif + + +%install +%py2_install +%if %{with python3} +%py3_install +%endif + + +#%%check +## No tests included in the tarball... +## https://github.com/Anorov/PySocks/issues/37 +#%%{__python2} setup.py test +#%%if 0%%{?with_python3} +#%%{__python3} setup.py test +#%%endif + + +%files -n python2-%{flatname} +%doc README.md +%license LICENSE +%{python2_sitelib}/socks.py* +%{python2_sitelib}/sockshandler.py* +%{python2_sitelib}/%{distname}-%{version}* + +%if %{with python3} +%files -n python%{python3_pkgversion}-%{flatname} +%doc README.md +%license LICENSE +%{python3_sitelib}/socks.py* +%{python3_sitelib}/sockshandler.py* +%{python3_sitelib}/__pycache__/*socks* +%{python3_sitelib}/%{distname}-%{version}-* +%endif + + +%changelog +* Thu Apr 25 2019 Tomas Orsava - 1.6.8-6 +- Bumping due to problems with modular RPM upgrade path +- Resolves: rhbz#1695587 + +* Mon Sep 17 2018 Tomas Orsava - 1.6.8-5 +- Stop providing the unversioned name python-SocksiPy +- Resolves: rhbz#1628242 + +* Tue Jul 31 2018 Lumír Balhar - 1.6.8-4 +- Make possible to disable python3 subpackage + +* Mon Jul 16 2018 Lumír Balhar - 1.6.8-3 +- First version for python27 module