From 1d62a4bc968e5e757ce16612eff0ef4d1c5346e3e5e7e719513e62d82361ce99 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 12 Jun 2023 12:24:20 +0000 Subject: [PATCH] Accepting request 1092574 from home:dimstar:Factory Some minor cleanup Requires: must never reference python_module (in python single-spec, this translates to ALL python versions) python_expand can take more than one command OBS-URL: https://build.opensuse.org/request/show/1092574 OBS-URL: https://build.opensuse.org/package/show/utilities/urlscan?expand=0&rev=31 --- urlscan.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/urlscan.spec b/urlscan.spec index dce82e3..cc3e34c 100644 --- a/urlscan.spec +++ b/urlscan.spec @@ -36,8 +36,8 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: sed -Requires: %{python_module base} -Requires: %{python_module urwid >= 1.2.1} +Requires: python3-base} +Requires: python3-urwid >= 1.2.1} BuildArch: noarch %global myname %name @@ -58,10 +58,11 @@ export SETUPTOOLS_SCM_PRETEND_VERSION %install %pyproject_install -%python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname} -%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{name}/__main__* -%python_expand sed -ri '1 { s@(/usr/bin/)env +@\1@ }' %{buildroot}%{$python_sitelib}/%{name}/__main__* -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%{python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname} + chmod 755 %{buildroot}%{$python_sitelib}/%{name}/__main__* + sed -ri '1 { s@(/usr/bin/)env +@\1@ }' %{buildroot}%{$python_sitelib}/%{name}/__main__* + %fdupes %{buildroot}%{$python_sitelib} +} sed -ri '1 { s@(/usr/bin/)env +@\1@;s@(/python3)\.[[:digit:]]+@\1@ }' %{buildroot}%{_bindir}/%{name} if test -e %{buildroot}%{_datadir}/doc/%{myname}* then