From b8291e5b8fd1493689d873fa68340fdf4d2b51242a9b6b77c10043264cf521bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 7 Feb 2025 12:59:41 +0000 Subject: [PATCH] Accepting request 1244134 from home:glaubitz:branches:devel:languages:python - Switch package to modern Python Stack on SLE-15 * Use Python 3.11 on SLE-15 by default * Drop support for older Python versions - 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 * Update name for dist directory in %files section OBS-URL: https://build.opensuse.org/request/show/1244134 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-injector?expand=0&rev=21 --- python-injector.changes | 12 ++++++++++++ python-injector.spec | 13 +++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/python-injector.changes b/python-injector.changes index d9542c1..de145fe 100644 --- a/python-injector.changes +++ b/python-injector.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Feb 7 12:10:02 UTC 2025 - John Paul Adrian Glaubitz + +- Switch package to modern Python Stack on SLE-15 + * Use Python 3.11 on SLE-15 by default + * Drop support for older Python versions +- 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 + * Update name for dist directory in %files section + ------------------------------------------------------------------- Thu Dec 7 22:09:22 UTC 2023 - Dirk Müller diff --git a/python-injector.spec b/python-injector.spec index e982559..bcb816d 100644 --- a/python-injector.spec +++ b/python-injector.spec @@ -1,7 +1,7 @@ # # spec file for package python-injector # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,7 @@ # -%define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-injector Version: 0.21.0 Release: 0 @@ -25,8 +24,10 @@ Summary: Python dependency injection framework, inspired by Guice License: BSD-3-Clause URL: https://github.com/alecthomas/injector Source: https://github.com/alecthomas/injector/archive/%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing_extensions >= 3.7.4 if %python-base < 3.9} +BuildRequires: %{python_module wheel} # SECTION test requirements BuildRequires: %{python_module pytest} BuildRequires: %{python_module dataclasses if %python-base < 3.7} @@ -61,10 +62,10 @@ API. Providing a Pythonic API trumps faithfulness. rm pytest.ini %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -74,6 +75,6 @@ rm pytest.ini %license COPYING %doc README.md %{python_sitelib}/injector -%{python_sitelib}/injector-%{version}*-info +%{python_sitelib}/injector-%{version}.dist-info %changelog