Blame SPECS/python3.11-pysocks.spec

f27b3d
%global __python3 /usr/bin/python3.11
f27b3d
%global python3_pkgversion 3.11
f27b3d
f27b3d
%if 0%{?fedora}
f27b3d
%global with_python3_tests 1
f27b3d
%endif
f27b3d
f27b3d
%global pypi_name   PySocks
f27b3d
%global modname     pysocks
f27b3d
%global sum         A Python SOCKS client module
f27b3d
f27b3d
Name:               python%{python3_pkgversion}-%{modname}
f27b3d
Version:            1.7.1
f27b3d
Release:            1%{?dist}
f27b3d
Summary:            %{sum}
f27b3d
f27b3d
License:            BSD
f27b3d
URL:                https://github.com/Anorov/%{pypi_name}
f27b3d
Source0:            %pypi_source
f27b3d
BuildArch:          noarch
f27b3d
f27b3d
BuildRequires:      python%{python3_pkgversion}-devel
f27b3d
BuildRequires:      python%{python3_pkgversion}-rpm-macros
f27b3d
BuildRequires:      python%{python3_pkgversion}-setuptools
f27b3d
# for tests
f27b3d
%if 0%{?with_python3_tests}
f27b3d
BuildRequires:      python%{python3_pkgversion}-pytest
f27b3d
BuildRequires:      python%{python3_pkgversion}-psutil
f27b3d
BuildRequires:      python%{python3_pkgversion}-test_server
f27b3d
%endif
f27b3d
f27b3d
%global _description \
f27b3d
A fork of SocksiPy with bug fixes and extra features.\
f27b3d
\
f27b3d
Acts as a drop-in replacement to the socket module. Featuring:\
f27b3d
\
f27b3d
- SOCKS proxy client for Python 2.6 - 3.x\
f27b3d
- TCP and UDP both supported\
f27b3d
- HTTP proxy client included but not supported or recommended (you should use\
f27b3d
  urllib2's or requests' own HTTP proxy interface)\
f27b3d
- urllib2 handler included.
f27b3d
f27b3d
%description
f27b3d
%_description
f27b3d
f27b3d
f27b3d
%prep
f27b3d
%autosetup -n %{pypi_name}-%{version}
f27b3d
# drop useless 3rdparty code
f27b3d
rm -rfv test/bin
f27b3d
f27b3d
%build
f27b3d
%py3_build
f27b3d
f27b3d
%install
f27b3d
%py3_install
f27b3d
f27b3d
%check
f27b3d
# https://github.com/Anorov/PySocks/issues/37
f27b3d
# FIXME python module named test_server is needed but not packaged
f27b3d
%if 0%{?with_python3_tests}
f27b3d
%{__python3} setup.py test
f27b3d
%endif
f27b3d
f27b3d
f27b3d
f27b3d
%files -n python%{python3_pkgversion}-%{modname}
f27b3d
%doc README.md
f27b3d
%license LICENSE
f27b3d
%{python3_sitelib}/socks.py*
f27b3d
%{python3_sitelib}/sockshandler.py*
f27b3d
%{python3_sitelib}/__pycache__/*socks*
f27b3d
%{python3_sitelib}/%{pypi_name}-%{version}-*
f27b3d
f27b3d
f27b3d
%changelog
f27b3d
* Mon Nov 14 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.7.1-1
f27b3d
- Initial package
f27b3d
- Fedora contributions by:
f27b3d
      Carl George <carl@george.computer>
f27b3d
      Charalampos Stratakis <cstratak@redhat.com>
f27b3d
      Kevin Fenzi <kevin@scrye.com>
f27b3d
      Miro HronĨok <miro@hroncok.cz>
f27b3d
      Petr Viktorin <pviktori@redhat.com>
f27b3d
      Ralph Bean <rbean@redhat.com>
f27b3d
      Raphael Groner <raphgro@fedoraproject.org>
f27b3d
      Tim Orling <timothy.t.orling@linux.intel.com>