commit db7bba191563e2d0ade8f2ededda168d3a2287e7 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:15:25 2019 -0400 Package init diff --git a/PySocks-1.7.0.tar.gz b/PySocks-1.7.0.tar.gz new file mode 100644 index 0000000..3e0d7e5 Binary files /dev/null and b/PySocks-1.7.0.tar.gz differ diff --git a/python-pysocks.spec b/python-pysocks.spec new file mode 100644 index 0000000..4848c9c --- /dev/null +++ b/python-pysocks.spec @@ -0,0 +1,93 @@ +Name: python-pysocks +Version: 1.7.0 +Release: 1 +Summary: A Python SOCKS client module +License: BSD +URL: https://github.com/Anorov/PySocks +Source0: https://files.pythonhosted.org/packages/source/P/PySocks/PySocks-%{version}.tar.gz +BuildArch: noarch + +%description +This module was designed to allow developers of Python software +that uses the Internet or another TCP/IP-based network to add +support for connection through a SOCKS proxy server with as much +ease as possible. + +%package -n python2-pysocks +Summary: A Python SOCKS client module +BuildRequires: python2-devel python2-setuptools +# for tests +BuildRequires: python2-pytest python2-psutil +%{?python_provide:%python_provide python2-pysocks} + +# https://bugzilla.redhat.com/show_bug.cgi?id=1334407 +Obsoletes: python-SocksiPy python2-SocksiPy +Provides: python-SocksiPy python2-SocksiPy + +%description -n python2-pysocks +This module was designed to allow developers of Python software +that uses the Internet or another TCP/IP-based network to add +support for connection through a SOCKS proxy server with as much +ease as possible. +This package is for Python2 only. + +%package -n python3-pysocks +Summary: A Python SOCKS client module +BuildRequires: python3-devel python3-setuptools +# for tests +BuildRequires: python3-pytest python3-psutil +%{?python_provide:%python_provide python3-pysocks} + +# if it exist, we would conflict with it. +Conflicts: python3-SocksiPy + +%description -n python3-pysocks +This module was designed to allow developers of Python software +that uses the Internet or another TCP/IP-based network to add +support for connection through a SOCKS proxy server with as much +ease as possible. +This package is for Python3 version python3 only. + +%package_help + +%prep +%autosetup -n PySocks-%{version} +# drop useless 3rdparty code +rm -rfv test/bin + +%build +%py2_build +%py3_build + +%install +%py2_install +%py3_install + +%check +# package test_server is needed but not packaged +%if 0 +%{__python2} setup.py test +%{__python3} setup.py test +%endif + +%files -n python2-pysocks +%defattr(-,root,root) +%license LICENSE +%{python2_sitelib}/socks.py* +%{python2_sitelib}/sockshandler.py* +%{python2_sitelib}/PySocks-%{version}* + +%files -n python3-pysocks +%defattr(-,root,root) +%license LICENSE +%{python3_sitelib}/socks.py* +%{python3_sitelib}/sockshandler.py* +%{python3_sitelib}/__pycache__/*socks* +%{python3_sitelib}/PySocks-%{version}-* + +%files help +%doc README.md + +%changelog +* Sat Sep 14 2019 openEuler Buildteam - 1.7.0-1 +- Package init