From d2a4c11c9a7d0c7eec9f1c7e747fa818d9e902c9c9bdb0f3d702891076576377 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Tue, 26 Mar 2024 20:40:35 +0000 Subject: [PATCH] Accepting request 1162356 from home:glaubitz:branches:devel:languages:python - Switch build system from setuptools to pyproject.toml + Add python-pip and python-wheel to BuildRequires + Replace %python_build with %pyproject_wheel + Replace %python_install with %pyproject_install - Limit Python files matched in %files section OBS-URL: https://build.opensuse.org/request/show/1162356 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sshtunnel?expand=0&rev=17 --- python-sshtunnel.changes | 9 +++++++++ python-sshtunnel.spec | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/python-sshtunnel.changes b/python-sshtunnel.changes index 0b01930..d76ff07 100644 --- a/python-sshtunnel.changes +++ b/python-sshtunnel.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Mar 26 18:57:48 UTC 2024 - John Paul Adrian Glaubitz + +- Switch build system from setuptools to pyproject.toml + + Add python-pip and python-wheel to BuildRequires + + Replace %python_build with %pyproject_wheel + + Replace %python_install with %pyproject_install +- Limit Python files matched in %files section + ------------------------------------------------------------------- Mon Jan 15 13:49:41 UTC 2024 - Antonio Larrosa diff --git a/python-sshtunnel.spec b/python-sshtunnel.spec index 6524a30..51a79cb 100644 --- a/python-sshtunnel.spec +++ b/python-sshtunnel.spec @@ -26,8 +26,10 @@ Group: Development/Languages/Python URL: https://github.com/pahaz/sshtunnel/ Source: https://files.pythonhosted.org/packages/source/s/sshtunnel/sshtunnel-%{version}.tar.gz BuildRequires: %{python_module paramiko >= 2.7.2} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} # for the tests to validate some things BuildRequires: fdupes BuildRequires: openssh @@ -49,10 +51,10 @@ and -R parameters. sed -i '1{\,^#!%{_bindir}/env python,d}' sshtunnel.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/sshtunnel %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -71,6 +73,8 @@ sed -i 's:import mock:from unittest import mock:' tests/test_forwarder.py %license LICENSE %doc *.rst %python_alternative %{_bindir}/sshtunnel -%{python_sitelib}/* +%{python_sitelib}/__pycache__/sshtunnel*pyc +%{python_sitelib}/sshtunnel.py +%{python_sitelib}/sshtunnel-*.dist-info %changelog