File python-memory_profiler.spec of Package python-memory_profiler
#
# spec file for package python-memory_profiler
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-memory_profiler
Version: 0.52.0
Release: 0
Summary: A module for monitoring memory usage of a python program
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://pypi.python.org/pypi/memory_profiler
Source: https://files.pythonhosted.org/packages/source/m/memory_profiler/memory_profiler-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION tests
BuildRequires: %{python_module psutil}
# /SECTION
Requires: python-psutil
BuildArch: noarch
%python_subpackages
%description
This is a python module for monitoring memory consumption of a process
as well as line-by-line analysis of memory consumption for python
programs. It is a pure python module and has the psutil
module as optional (but highly recommended) dependencies.
%prep
%setup -q -n memory_profiler-%{version}
%build
%python_build
%install
%python_install
%{python_expand chmod -x %{buildroot}%{$python_sitelib}/memory_profiler-%version-py%{$python_bin_suffix}.egg-info/*}
%check
# adapted command from the Makefile which is not included in the tarball :(
%python_exec -m memory_profiler test/test_func.py
%python_exec -m memory_profiler test/test_loop.py
%python_exec -m memory_profiler test/test_as.py
%python_exec -m memory_profiler test/test_global.py
%python_exec -m memory_profiler test/test_precision_command_line.py
%python_exec -m memory_profiler test/test_gen.py
# fails no matter what I set as LANG
%{python_expand $python -m memory_profiler test/test_unicode.py || :}
%python_exec -m memory_profiler test/test_tracemalloc.py
%python_exec -m memory_profiler test/test_import.py
%python_exec -m memory_profiler test/test_memory_usage.py
%python_exec -m memory_profiler test/test_precision_import.py
%files %{python_files}
%doc README.rst
%license COPYING
%python3_only %{_bindir}/mprof
%{python_sitelib}/*
%changelog