15
0

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
This commit is contained in:
2025-02-07 12:59:41 +00:00
committed by Git OBS Bridge
parent 08ac74e1de
commit b8291e5b8f
2 changed files with 19 additions and 6 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Feb 7 12:10:02 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- 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 <dmueller@suse.com>

View File

@@ -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