python-tblib/python-tblib.spec
Tomáš Chvátal 6022fcd26c Accepting request 681078 from home:jayvdb:noflake8
- Remove bcond_with test preventing the tests from running,
  and fix the %check
- Remove unnecessary dependency on tox, flake8 and 9 other deps
- Add 0001-Patch-tests-against-Python-3.7.patch to workaround
  Python 3.7 test failure.

OBS-URL: https://build.opensuse.org/request/show/681078
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tblib?expand=0&rev=6
2019-03-03 12:33:04 +00:00

81 lines
2.6 KiB
RPMSpec

#
# spec file for package python-tblib
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tblib
Version: 1.3.2
Release: 0
Summary: Traceback serialization library
License: BSD-2-Clause
Group: Development/Languages/Python
Url: https://github.com/ionelmc/python-tblib
Source: https://files.pythonhosted.org/packages/source/t/tblib/tblib-%{version}.tar.gz
# https://github.com/ionelmc/python-tblib/issues/36
Patch0: https://src.fedoraproject.org/rpms/python-tblib/raw/master/f/0001-Patch-tests-against-Python-3.7.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six
BuildArch: noarch
%python_subpackages
%description
Traceback serialization library.
It allows you to:
* Pickle tracebacks and raise exceptions with pickled tracebacks in
different processes. This allows better error handling when running
code over multiple processes (imagine multiprocessing, billiard,
futures, celery etc).
* Create traceback objects from strings (the ``from_string`` method).
*No pickling is used*.
* Serialize tracebacks to/from plain dicts (the ``from_dict`` and
``to_dict`` methods). *No pickling is used*.
* Raise the tracebacks created from the aforementioned sources.
Again, note that using the pickle support is completely optional. You
are solely responsible for security problems should you decide to use
the pickle support.
%prep
%setup -q -n tblib-%{version}
%patch0 -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand export PYTHONPATH=tests:%{buildroot}%{$python_sitelib}
$python -m pytest README.rst
}
%files %{python_files}
%doc AUTHORS.rst CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/*
%changelog