Blob Blame History Raw
%global pypi_name sshtunnel

# tests are enabled by default
%bcond_without  tests

Name:           python-%{pypi_name}
Version:        0.4.0
Release:        %autorelease
Summary:        Pure python SSH tunnels

License:        MIT
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel

%if %{with tests}
BuildRequires:  openssh-clients
BuildRequires:  python3-pytest

Pure python SSH tunnels

%package -n     python3-%{pypi_name}
Summary:        %{summary}
Obsoletes:      python3-azure-sdk < 5.0.1
%description -n python3-%{pypi_name}
Pure python SSH tunnels

%autosetup -n %{pypi_name}-%{version}

# Remove the python shebang from non-executable files.
sed -i '1{\@^#!/usr/bin/env python@d}'

# Update tests to import the built-in mock.
sed -i 's/^import mock/from unittest import mock/' tests/*.py


%pyproject_buildrequires -r

%pyproject_save_files sshtunnel

%if %{with tests}

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst