2017-08-14 04:54:17 +02:00
|
|
|
#
|
2019-12-16 06:09:46 +01:00
|
|
|
# spec file for package python
|
2017-08-14 04:54:17 +02:00
|
|
|
#
|
2020-09-16 23:27:08 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2017-08-14 04:54:17 +02: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.
|
|
|
|
|
2018-12-04 15:08:20 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-08-14 04:54:17 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-12-16 06:09:46 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%bcond_without test
|
|
|
|
%bcond_without test_twisted
|
|
|
|
%define psuffix -test
|
|
|
|
%else
|
|
|
|
%bcond_without test
|
|
|
|
%bcond_with test_twisted
|
|
|
|
%endif
|
2023-06-11 13:29:48 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-12-16 06:09:46 +01:00
|
|
|
Name: python-tblib%{?psuffix}
|
2020-09-16 23:27:08 +02:00
|
|
|
Version: 1.7.0
|
2017-08-14 04:54:17 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Traceback serialization library
|
|
|
|
License: BSD-2-Clause
|
|
|
|
Group: Development/Languages/Python
|
2019-12-16 06:09:46 +01:00
|
|
|
URL: https://github.com/ionelmc/python-tblib
|
2017-08-14 04:54:17 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/tblib/tblib-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-12-16 06:09:46 +01:00
|
|
|
%if %{with test_twisted}
|
|
|
|
BuildRequires: %{python_module Twisted}
|
|
|
|
BuildRequires: %{python_module tblib == %{version}}
|
|
|
|
%endif
|
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
%endif
|
2017-08-14 04:54:17 +02:00
|
|
|
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}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
2019-12-16 06:09:46 +01:00
|
|
|
%if "%{flavor}" != "test"
|
2017-08-14 04:54:17 +02:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-12-16 06:09:46 +01:00
|
|
|
%endif
|
2017-08-14 04:54:17 +02:00
|
|
|
|
|
|
|
%check
|
2019-12-16 06:09:46 +01:00
|
|
|
%if %{with test}
|
2019-05-06 10:11:34 +02:00
|
|
|
%pytest
|
2019-12-16 06:09:46 +01:00
|
|
|
%endif
|
2017-08-14 04:54:17 +02:00
|
|
|
|
2019-12-16 06:09:46 +01:00
|
|
|
%if "%{flavor}" != "test"
|
2017-08-14 04:54:17 +02:00
|
|
|
%files %{python_files}
|
2018-03-19 23:01:51 +01:00
|
|
|
%doc AUTHORS.rst CHANGELOG.rst README.rst
|
|
|
|
%license LICENSE
|
2017-08-14 04:54:17 +02:00
|
|
|
%{python_sitelib}/*
|
2019-12-16 06:09:46 +01:00
|
|
|
%endif
|
2017-08-14 04:54:17 +02:00
|
|
|
|
|
|
|
%changelog
|