14
0
forked from pool/python-pypng

Accepting request 807692 from home:pgajdos:python

- %python3_only -> %python_alternative

OBS-URL: https://build.opensuse.org/request/show/807692
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pypng?expand=0&rev=9
This commit is contained in:
Tomáš Chvátal
2020-05-20 12:18:23 +00:00
committed by Git OBS Bridge
parent 56a88a44e2
commit bafdd4f9b9
2 changed files with 30 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 20 07:26:40 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 22 15:05:42 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com> Mon Jul 22 15:05:42 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pypng # spec file for package python-pypng
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 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
@@ -16,6 +16,7 @@
# #
%define binaries prichunkpng priforgepng prigreypng pripalpng pripamtopng pripnglsch pripngtopam priweavepng
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pypng Name: python-pypng
Version: 0.0.20 Version: 0.0.20
@@ -30,6 +31,8 @@ BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -45,14 +48,34 @@ sed -i -e '/^#!\//, 1d' code/png.py
%install %install
%python_install %python_install
for b in %{binaries}; do
%python_clone -a %{buildroot}%{_bindir}/$b
done
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:code $python code/test_png.py %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:code $python code/test_png.py
%post
for b in %{binaries}; do
%python_install_alternative $b
done
%postun
for b in %{binaries}; do
%python_uninstall_alternative $b
done
%files %{python_files} %files %{python_files}
%license LICENCE %license LICENCE
%{python_sitelib}/* %{python_sitelib}/*
%python3_only %{_bindir}/* %python_alternative %{_bindir}/prichunkpng
%python_alternative %{_bindir}/priforgepng
%python_alternative %{_bindir}/prigreypng
%python_alternative %{_bindir}/pripalpng
%python_alternative %{_bindir}/pripamtopng
%python_alternative %{_bindir}/pripnglsch
%python_alternative %{_bindir}/pripngtopam
%python_alternative %{_bindir}/priweavepng
%changelog %changelog