Blame SPECS/python3.11-pysocks.spec

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