Blame SPECS/python3.11-pysocks.spec

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