File project.diff of Package python-distro
--- python-distro.changes.orig
+++ python-distro.changes
@@ -1,4 +1,100 @@
-------------------------------------------------------------------
+Fri Feb 23 00:52:41 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
+
+- Switch to autosetup macro.
+
+-------------------------------------------------------------------
+Wed Dec 27 09:21:33 UTC 2023 - Dirk Müller <dmueller@suse.com>
+
+- update to 1.9.0:
+ * Refactor distro.info() method to return an InfoDict [#360]
+ * Ignore the file '/etc/board-release' [#353]
+ * Ignore the file '/etc/ec2_version' [#359]
+ * Test on modern versions of CPython and PyPy and macOS [#362]
+ * Add support for ALT Linux Server 10.1 distribution [#354]
+ * Add Debian Testing to the tests [#356]
+ * Update archlinux resource for tests [#352]
+
+-------------------------------------------------------------------
+Mon Sep 18 16:28:25 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
+
+- Remove duplicate files calling %fdupes
+
+-------------------------------------------------------------------
+Fri May 5 12:16:53 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
+
+- add sle15_python_module_pythons
+
+-------------------------------------------------------------------
+Mon Jan 2 09:26:27 UTC 2023 - Dirk Müller <dmueller@suse.com>
+
+- update to 1.8.0:
+ * Lowered `LinuxDistribution._distro_release_info` method complexity
+ [#327]
+ * Added official support for Buildroot distribution [#329]
+ * Added official support for Guix distribution [#330]
+ * Added support for `/etc/debian_version` [#333] & [#349]
+ * Fixed a typography in CONTRIBUTING.md [#340]
+ * Improved README.md "Usage" code block [#343]
+ * Bumped black to v22.3.0 in pre-commit.ci configuration [#331]
+ * Enabled GitHub Dependabot to keep GitHub Actions up to date [#335]
+
+-------------------------------------------------------------------
+Tue Feb 15 19:13:51 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>
+
+- remove shebang from distro.py
+- update to version 1.7.0:
+ - BACKWARD COMPATIBILITY:
+ - Dropped support for EOL Pythons 2.7, 3.4 and 3.5 [[#281](https://github.com/python-distro/distro/pull/281)]
+ - Dropped support for LSB and `uname` back-ends when `--root-dir` is specified [[#311](https://github.com/python-distro/distro/pull/311)]
+ - Moved `distro.py` to `src/distro/distro.py` [[#315](https://github.com/python-distro/distro/pull/315)]
+ - ENHANCEMENTS:
+ - Documented that `distro.version()` can return an empty string on rolling releases [[#312](https://github.com/python-distro/distro/pull/312)]
+ - Documented support for Python 3.10 [[#316](https://github.com/python-distro/distro/pull/316)]
+ - Added official support for Rocky Linux distribution [[#318](https://github.com/python-distro/distro/pull/318)]
+ - Added a shebang to `distro.py` to allow standalone execution [[#313](https://github.com/python-distro/distro/pull/313)]
+ - Added support for AIX platforms [[#311](https://github.com/python-distro/distro/pull/311)]
+ - Added compliance for PEP-561 [[#315](https://github.com/python-distro/distro/pull/315)]
+ - BUG FIXES:
+ - Fixed `include_uname` parameter oversight [[#305](https://github.com/python-distro/distro/pull/305)]
+ - Fixed crash when `uname -rs` output is empty [[#304](https://github.com/python-distro/distro/pull/304)]
+ - Fixed Amazon Linux identifier in `distro.id()` documentation [[#318](https://github.com/python-distro/distro/pull/318)]
+ - Fixed OpenSuse >= 15 support [[#319](https://github.com/python-distro/distro/pull/319)]
+ - Fixed encoding issues when opening distro release files [[#324](https://github.com/python-distro/distro/pull/324)]
+ - Fixed `linux_distribution` regression introduced in [[#230](https://github.com/python-distro/distro/pull/230)] [[#325](https://github.com/python-distro/distro/pull/325)]
+
+-------------------------------------------------------------------
+Fri Nov 19 05:31:21 UTC 2021 - Sebastian Wagner <sebix+novell.com@sebix.at>
+
+- Tests: Set locale to UTF-8 to fix tests on Leap 15.3.
+
+-------------------------------------------------------------------
+Sun Sep 26 16:23:18 UTC 2021 - Matej Cepl <mcepl@suse.com>
+
+- Expliciting setting of locale is not necessary anymore
+ (gh#python-distro/distro#223).
+
+-------------------------------------------------------------------
+Tue Aug 3 12:19:39 UTC 2021 - brejoc@gmail.com
+
+- Update to version 1.6.0
+ * Deprecated the distro.linux_distribution() function. Use distro.id(), distro.version() and distro.name() instead [#296]
+ * Deprecated Python 2.7, 3.4 and 3.5 support. Further releases will only support Python 3.6+
+ * Added type hints to distro module [#269]
+ * Added __version__ for checking distro version [#292]
+ * Added support for arbitrary rootfs via the root_dir parameter [#247]
+ * Added the --root-dir option to CLI [#161]
+ * Added fallback to /usr/lib/os-release when /etc/os-release isn't available [#262]
+ * Fixed subprocess.CalledProcessError when running lsb_release [#261]
+ * Ignore /etc/iredmail-release file while parsing distribution [#268]
+ * Use a binary file for /dev/null to avoid TextIOWrapper overhead [#271]
+
+-------------------------------------------------------------------
+Tue May 18 10:55:49 UTC 2021 - pgajdos@suse.com
+
+- use %pytest macro
+
+-------------------------------------------------------------------
Tue May 26 07:22:40 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
@@ -42,7 +138,7 @@ Tue Feb 5 11:48:38 CET 2019 - Matej Cep
-------------------------------------------------------------------
Wed Jun 13 16:52:25 UTC 2018 - mcepl@suse.com
-- Enable tests properly (this is pytest, not unittest),
+- Enable tests properly (this is pytest, not unittest),
it is necessary to explicitly set locale to an Unicode one
(https://github.com/nir0s/distro/issues/223)
--- python-distro.spec.orig
+++ python-distro.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-distro
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,26 +16,26 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?sle15_python_module_pythons}
%{!?license: %global license %doc}
%bcond_without test
Name: python-distro
-Version: 1.5.0
+Version: 1.9.0
Release: 0
Summary: Linux Distribution - a Linux OS platform information API
License: Apache-2.0
-Group: Development/Languages/Python
URL: https://github.com/nir0s/distro
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
Patch0: assert_locale.patch
-BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module pip}
+BuildRequires: %{python_module wheel}
+BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test
%if %{with test}
-BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
%endif
# /SECTION
@@ -47,20 +47,22 @@ distro (for: Linux Distribution) provide
It is a renewed alternative implementation for Python's original platform.linux_distribution function, but it also provides much more functionality which isn't necessarily Python bound like a command-line interface.
%prep
-%setup -q -n distro-%{version}
-%patch0 -p1
+%autosetup -p1 -n distro-%{version}
+# remove shebang. Has been added by upstream intentionally: https://github.com/python-distro/distro/commit/8032f16a1082ff72471c13ff665f3ad9c929f3b0
+sed -i '1{/\/usr\/bin\/env python/d;}' src/distro/distro.py
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/distro
+%python_expand %fdupes %{buildroot}%{$python_sitelib}/distro
%if %{with test}
%check
-# Explicit settings of locale is necessary gh#nir0s/distro#223
-LANG=en_US.utf8 %python_exec setup.py pytest
+export LANG=C.UTF-8
+%pytest
%endif
%post
@@ -72,7 +74,8 @@ LANG=en_US.utf8 %python_exec setup.py py
%files %{python_files}
%doc CHANGELOG.md README.md
%python_alternative %{_bindir}/distro
-%{python_sitelib}/*
+%{python_sitelib}/distro
+%{python_sitelib}/distro-%{version}.dist-info
%%license LICENSE
%changelog