From 9190c546eb8f52e6dfdcdca0fb28a13ab0a63abcfb12d5af0d7cf6619304de39 Mon Sep 17 00:00:00 2001 From: Ana Guerrero Date: Sun, 25 Feb 2024 13:04:43 +0000 Subject: [PATCH] Accepting request 1149664 from devel:languages:python - Switch to autosetup macro. OBS-URL: https://build.opensuse.org/request/show/1149664 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-distro?expand=0&rev=21 --- python-distro.changes | 5 +++++ python-distro.spec | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/python-distro.changes b/python-distro.changes index d25e580..ba2af3f 100644 --- a/python-distro.changes +++ b/python-distro.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 23 00:52:41 UTC 2024 - Steve Kowalik + +- Switch to autosetup macro. + ------------------------------------------------------------------- Wed Dec 27 09:21:33 UTC 2023 - Dirk Müller diff --git a/python-distro.spec b/python-distro.spec index eea1d50..f46a99f 100644 --- a/python-distro.spec +++ b/python-distro.spec @@ -1,7 +1,7 @@ # # spec file for package python-distro # -# Copyright (c) 2023 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 @@ -24,7 +24,6 @@ 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 @@ -33,7 +32,7 @@ BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test %if %{with test} @@ -48,10 +47,9 @@ 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. %prep -%setup -q -n distro-%{version} +%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 -%patch0 -p1 %build %pyproject_wheel @@ -77,7 +75,7 @@ export LANG=C.UTF-8 %doc CHANGELOG.md README.md %python_alternative %{_bindir}/distro %{python_sitelib}/distro -%{python_sitelib}/distro-%{version}*-info +%{python_sitelib}/distro-%{version}.dist-info %%license LICENSE %changelog