%global pypi_name aiohttp-socks %bcond_with network Name: python-%{pypi_name} Version: 0.3.3 Release: 1%{?dist} Summary: Proxy connector for aiohttp License: ASL 2.0 URL: https://github.com/romis2012/aiohttp-socks Source0: https://github.com/romis2012/aiohttp-socks/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description Proxy connector for aiohttp. SOCKS4(a), SOCKS5, HTTP (tunneling), Proxy chains are supported. %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{with network} BuildRequires: python3-aiohttp BuildRequires: python3-pytest BuildRequires: python3-pytest-asyncio BuildRequires: python3-pytest-cov %endif %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} Proxy connector for aiohttp. SOCKS4(a), SOCKS5, HTTP (tunneling), Proxy chains are supported. %prep %autosetup -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %py3_build %install %py3_install %if %{with network} %check PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version} -v tests %endif %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.md %{python3_sitelib}/aiohttp_socks/ %{python3_sitelib}/aiohttp_socks-%{version}-py?.?.egg-info %changelog * Wed Jan 01 2020 Fabian Affolter - 0.3.3-1 - Initial package for Fedora