From 4366e2bcf8d1863947c40ff18de4f39be712ac1c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 9 May 2023 05:26:28 +0000 Subject: [PATCH] import python3.11-pysocks-1.7.1-1.el9 --- .gitignore | 1 + .python3.11-pysocks.metadata | 1 + SPECS/python3.11-pysocks.spec | 87 +++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 .gitignore create mode 100644 .python3.11-pysocks.metadata create mode 100644 SPECS/python3.11-pysocks.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fb9a86 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/PySocks-1.7.1.tar.gz diff --git a/.python3.11-pysocks.metadata b/.python3.11-pysocks.metadata new file mode 100644 index 0000000..ab68124 --- /dev/null +++ b/.python3.11-pysocks.metadata @@ -0,0 +1 @@ +439b5044af79748972675f3d9af1f4c91753d0db SOURCES/PySocks-1.7.1.tar.gz diff --git a/SPECS/python3.11-pysocks.spec b/SPECS/python3.11-pysocks.spec new file mode 100644 index 0000000..485d90e --- /dev/null +++ b/SPECS/python3.11-pysocks.spec @@ -0,0 +1,87 @@ +%global __python3 /usr/bin/python3.11 +%global python3_pkgversion 3.11 + +%if 0%{?fedora} +%global with_python3_tests 1 +%endif + +%global pypi_name PySocks +%global modname pysocks +%global sum A Python SOCKS client module + +Name: python%{python3_pkgversion}-%{modname} +Version: 1.7.1 +Release: 1%{?dist} +Summary: %{sum} + +License: BSD +URL: https://github.com/Anorov/%{pypi_name} +Source0: %pypi_source +BuildArch: noarch + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-rpm-macros +BuildRequires: python%{python3_pkgversion}-setuptools +# for tests +%if 0%{?with_python3_tests} +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-psutil +BuildRequires: python%{python3_pkgversion}-test_server +%endif + +%global _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. + +%description +%_description + + +%prep +%autosetup -n %{pypi_name}-%{version} +# drop useless 3rdparty code +rm -rfv test/bin + +%build +%py3_build + +%install +%py3_install + +%check +# https://github.com/Anorov/PySocks/issues/37 +# FIXME python module named test_server is needed but not packaged +%if 0%{?with_python3_tests} +%{__python3} setup.py test +%endif + + + +%files -n python%{python3_pkgversion}-%{modname} +%doc README.md +%license LICENSE +%{python3_sitelib}/socks.py* +%{python3_sitelib}/sockshandler.py* +%{python3_sitelib}/__pycache__/*socks* +%{python3_sitelib}/%{pypi_name}-%{version}-* + + +%changelog +* Mon Nov 14 2022 Charalampos Stratakis - 1.7.1-1 +- Initial package +- Fedora contributions by: + Carl George + Charalampos Stratakis + Kevin Fenzi + Miro HronĨok + Petr Viktorin + Ralph Bean + Raphael Groner + Tim Orling