forked from pool/python-yappi
Accepting request 805854 from home:pgajdos:python
submit OBS-URL: https://build.opensuse.org/request/show/805854 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yappi?expand=0&rev=9
This commit is contained in:
committed by
Git OBS Bridge
parent
134b93bf47
commit
560e4c28a8
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 15 12:52:55 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||
|
||||
- %python3_only -> %python_alternative
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 17 23:52:17 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-setuptools
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -48,23 +50,31 @@ export CFLAGS="%{optflags}"
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/yappi
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
export PYTHONPATH="tests/"
|
||||
export PATH="$PATH:%{buildroot}/%{_bindir}"
|
||||
# Skip two flaky tests
|
||||
skip_tests="not test_basic_old_style and not test_basic"
|
||||
%if %{python3_version_nodots} < 37
|
||||
# this test relies on asyncio.run method
|
||||
skip_tests="$skip_tests and not test_asyncio_context_vars"
|
||||
skip_tests="$skip_tests and not test_asyncio_context_vars"
|
||||
%endif
|
||||
# yappi binary is not available (only yappi-%python_version)
|
||||
skip_tests="$skip_tests and not test_run_as_script"
|
||||
%pytest_arch -k "$skip_tests"
|
||||
|
||||
%post
|
||||
%python_install_alternative yappi
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative yappi
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%python3_only %{_bindir}/yappi
|
||||
%python_alternative %{_bindir}/yappi
|
||||
%{python_sitearch}/*
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user