Blob Blame History Raw
## START: Set by rpmautospec
## (rpmautospec version 0.5.1)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 12;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%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
URL:            https://github.com/pahaz/sshtunnel
Source0:        %{pypi_source}
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  pyproject-rpm-macros

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


%description
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


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

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

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


%build
%pyproject_wheel


%generate_buildrequires
%pyproject_buildrequires -r


%install
%pyproject_install
%pyproject_save_files sshtunnel


%if %{with tests}
%check
%pytest
%endif


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


%changelog
## START: Generated by rpmautospec
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 0.4.0-9
- Rebuilt for Python 3.12

* Wed May 17 2023 Major Hayden <major@redhat.com> - 0.4.0-8
- Migrated to SPDX license

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.4.0-5
- Rebuilt for Python 3.11

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Tue Nov 09 2021 Major Hayden <major@mhtx.net> - 0.4.0-3
- Switch to rpmautospec

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Mon Jun 14 2021 Major Hayden <major@mhtx.net> - 0.4.0-1
- Update to 0.4.0

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.1.5-5
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro HronĨok <miro@hroncok.cz> - 0.1.5-2
- Rebuilt for Python 3.9

* Tue May 05 2020 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.1.5-1
- initial import
## END: Generated by rpmautospec