Compare commits

1 Commits
main ... 1.1

4 changed files with 14 additions and 43 deletions

BIN
distro-1.8.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
distro-1.9.0.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,34 +1,7 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 18 11:07:12 UTC 2025 - Pablo Suárez Hernández <psuarezhernandez@suse.com> Thu Jan 30 15:52:36 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Build package for multiple Python flavors on the SLE15 family - Use libalternatives instead of update-alternatives, bsc#1235785
-------------------------------------------------------------------
Fri Jan 24 12:35:25 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Use libalternatives instead of update-alternatives, bsc#1235785
-------------------------------------------------------------------
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> Fri May 5 12:16:53 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
@@ -148,7 +121,7 @@ Tue Feb 5 11:48:38 CET 2019 - Matej Cepl <mcepl@suse.com>
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 13 16:52:25 UTC 2018 - mcepl@suse.com 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 it is necessary to explicitly set locale to an Unicode one
(https://github.com/nir0s/distro/issues/223) (https://github.com/nir0s/distro/issues/223)

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-distro # spec file for package python-distro
# #
# Copyright (c) 2025 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -15,27 +15,26 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
%bcond_without libalternatives %bcond_without libalternatives
%else %else
%bcond_with libalternatives %bcond_with libalternatives
%endif %endif
%{?sle15allpythons} %{?sle15_python_module_pythons}
%{!?license: %global license %doc} %{!?license: %global license %doc}
%bcond_without test %bcond_without test
Name: python-distro Name: python-distro
Version: 1.9.0 Version: 1.8.0
Release: 0 Release: 0
Summary: Linux Distribution - a Linux OS platform information API Summary: Linux Distribution - a Linux OS platform information API
License: Apache-2.0 License: Apache-2.0
URL: https://github.com/python-distro/distro Group: Development/Languages/Python
URL: https://github.com/nir0s/distro
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
Patch0: assert_locale.patch Patch0: assert_locale.patch
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%if %{with libalternatives} %if %{with libalternatives}
Requires: alts Requires: alts
@@ -58,9 +57,10 @@ distro (for: Linux Distribution) provides information about the Linux distributi
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. 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 %prep
%autosetup -p1 -n distro-%{version} %setup -q -n distro-%{version}
# remove shebang. Has been added by upstream intentionally: https://github.com/python-distro/distro/commit/8032f16a1082ff72471c13ff665f3ad9c929f3b0 # 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 sed -i '1{/\/usr\/bin\/env python/d;}' src/distro/distro.py
%patch0 -p1
%build %build
%pyproject_wheel %pyproject_wheel
@@ -68,7 +68,6 @@ sed -i '1{/\/usr\/bin\/env python/d;}' src/distro/distro.py
%install %install
%pyproject_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/distro %python_clone -a %{buildroot}%{_bindir}/distro
%python_expand %fdupes %{buildroot}%{$python_sitelib}/distro
%if %{with test} %if %{with test}
%check %check
@@ -89,8 +88,7 @@ export LANG=C.UTF-8
%files %{python_files} %files %{python_files}
%doc CHANGELOG.md README.md %doc CHANGELOG.md README.md
%python_alternative %{_bindir}/distro %python_alternative %{_bindir}/distro
%{python_sitelib}/distro %{python_sitelib}/*
%{python_sitelib}/distro-%{version}.dist-info
%%license LICENSE %%license LICENSE
%changelog %changelog