2018-05-03 04:59:22 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-line_profiler
|
|
|
|
|
#
|
2025-05-04 08:51:52 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-05-03 04:59:22 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2019-01-02 12:36:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-03 04:59:22 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2025-05-04 08:51:52 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-05-03 04:59:22 +00:00
|
|
|
Name: python-line_profiler
|
2025-05-04 08:51:52 +00:00
|
|
|
Version: 4.2.0
|
2018-05-03 04:59:22 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Line-by-line profiler
|
|
|
|
|
License: BSD-3-Clause
|
2022-01-07 13:21:55 +00:00
|
|
|
URL: https://github.com/pyutils/line_profiler
|
2018-05-03 06:51:26 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/l/line_profiler/line_profiler-%{version}.tar.gz
|
2023-12-05 15:53:56 +00:00
|
|
|
BuildRequires: %{python_module Cython}
|
2018-05-03 04:59:22 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2022-01-07 13:21:55 +00:00
|
|
|
BuildRequires: %{python_module ipython}
|
2024-11-27 00:01:34 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2018-07-19 15:07:12 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2021-04-22 13:08:51 +00:00
|
|
|
BuildRequires: %{python_module scikit-build}
|
2018-05-03 04:59:22 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-12-05 15:53:56 +00:00
|
|
|
BuildRequires: %{python_module ubelt}
|
2024-11-27 00:01:34 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2021-04-22 13:08:51 +00:00
|
|
|
BuildRequires: cmake
|
2018-07-19 15:07:12 +00:00
|
|
|
BuildRequires: fdupes
|
2021-04-22 13:08:51 +00:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: ninja
|
2018-07-19 15:07:12 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-01-07 13:21:55 +00:00
|
|
|
Requires: python-ipython
|
2019-01-02 12:36:36 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-02-15 03:16:37 +00:00
|
|
|
Requires(postun): update-alternatives
|
2018-05-03 04:59:22 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
line_profiler will profile the time individual lines of code take to execute.
|
|
|
|
|
The profiler is implemented in C via Cython in order to reduce the overhead of
|
|
|
|
|
profiling.
|
|
|
|
|
|
|
|
|
|
Also included is the script kernprof.py which can be used to conveniently
|
|
|
|
|
profile Python applications and scripts either with line_profiler or with the
|
|
|
|
|
function-level profiling tools in the Python standard library.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-12-05 15:53:56 +00:00
|
|
|
%autosetup -p1 -n line_profiler-%{version}
|
2018-05-03 04:59:22 +00:00
|
|
|
|
|
|
|
|
%build
|
2019-01-02 12:36:36 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2022-01-07 13:21:55 +00:00
|
|
|
# remove shebangs
|
|
|
|
|
sed -i '1{/env python/d}' line_profiler/line_profiler.py kernprof.py
|
2024-11-27 00:01:34 +00:00
|
|
|
%pyproject_wheel
|
2018-05-03 04:59:22 +00:00
|
|
|
|
|
|
|
|
%install
|
2024-11-27 00:01:34 +00:00
|
|
|
%pyproject_install
|
2018-05-03 04:59:22 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/kernprof
|
2022-01-07 13:21:55 +00:00
|
|
|
%python_compileall
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2018-05-03 04:59:22 +00:00
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%python_install_alternative kernprof
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative kernprof
|
|
|
|
|
|
|
|
|
|
%check
|
2021-04-22 13:08:51 +00:00
|
|
|
# test_cli needs ubelt, which we don't have and which is needed just for tests
|
2024-11-27 00:01:34 +00:00
|
|
|
# test_assumed_noop removed upstream, stop skipping it with 4.2.0.
|
|
|
|
|
%pytest_arch -k "not (test_cli or test_assumed_noop)" tests
|
2018-05-03 04:59:22 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-05-03 16:16:55 +00:00
|
|
|
%doc README.rst
|
|
|
|
|
%license LICENSE.txt LICENSE_Python.txt
|
2018-05-03 04:59:22 +00:00
|
|
|
%python_alternative %{_bindir}/kernprof
|
2022-01-07 13:21:55 +00:00
|
|
|
%{python_sitearch}/line_profiler
|
2024-11-27 00:01:34 +00:00
|
|
|
%{python_sitearch}/line_profiler-%{version}.dist-info
|
|
|
|
|
%{python_sitearch}/kernprof.py
|
|
|
|
|
%pycache_only %{python_sitearch}/__pycache__/kernprof.*.pyc
|
2018-05-03 04:59:22 +00:00
|
|
|
|
|
|
|
|
%changelog
|