forked from pool/python-portpicker
Accepting request 807043 from devel:languages:python
- Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/request/show/807043 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-portpicker?expand=0&rev=3
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 18 20:33:40 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Don't use %python3_only command, but properly use alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 20 15:18:38 UTC 2019 - pgajdos@suse.com
|
Mon May 20 15:18:38 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-portpicker
|
# spec file for package python-portpicker
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -27,6 +27,8 @@ URL: https://github.com/google/python_portpicker
|
|||||||
Source0: https://files.pythonhosted.org/packages/source/p/portpicker/portpicker-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/p/portpicker/portpicker-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
@@ -46,16 +48,23 @@ harnesses that launch local servers.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/portserver.py
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python src/tests/portpicker_test.py
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python src/tests/portpicker_test.py
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative portserver.py
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative portserver.py
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CONTRIBUTING.md README.md
|
%doc CONTRIBUTING.md README.md
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
# import asyncio
|
# import asyncio
|
||||||
%python3_only %{_bindir}/portserver.py
|
%python_alternative %{_bindir}/portserver.py
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user