2013-04-29 13:48:34 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-Logbook
|
|
|
|
#
|
2021-05-07 21:04:51 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2013-04-29 13:48:34 +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-03-05 16:43:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-10-24 11:08:00 +00:00
|
|
|
#
|
2013-04-29 13:48:34 +00:00
|
|
|
|
|
|
|
|
2017-09-08 19:32:30 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-03-14 08:12:50 +00:00
|
|
|
%bcond_without python2
|
2013-04-29 13:48:34 +00:00
|
|
|
Name: python-Logbook
|
2020-01-15 10:51:38 +00:00
|
|
|
Version: 1.5.3
|
2013-04-29 13:48:34 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A logging replacement for Python
|
2013-10-24 11:08:00 +00:00
|
|
|
License: BSD-3-Clause
|
2018-08-11 06:39:28 +00:00
|
|
|
URL: https://github.com/getlogbook/logbook
|
2017-09-08 19:32:30 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/L/Logbook/Logbook-%{version}.tar.gz
|
2021-05-07 21:04:51 +00:00
|
|
|
# PATCH-FIX-UPSTREAM logbook-pr316-sqlalchemy-count.patch -- gh#getlogbook/logbook#316
|
|
|
|
Patch1: https://github.com/getlogbook/logbook/pull/316.patch#/logbook-pr316-sqlalchemy-count.patch
|
2018-08-11 06:39:28 +00:00
|
|
|
BuildRequires: %{python_module Brotli}
|
2017-09-08 19:32:30 +00:00
|
|
|
BuildRequires: %{python_module Cython}
|
|
|
|
BuildRequires: %{python_module Jinja2}
|
|
|
|
BuildRequires: %{python_module SQLAlchemy}
|
2018-08-11 06:39:28 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2017-09-08 19:32:30 +00:00
|
|
|
BuildRequires: %{python_module execnet >= 1.0.9}
|
|
|
|
BuildRequires: %{python_module gevent}
|
2018-08-11 06:39:28 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-09-24 09:24:50 +00:00
|
|
|
BuildRequires: %{python_module pytest >= 4.0}
|
2017-09-08 19:32:30 +00:00
|
|
|
BuildRequires: %{python_module pytest-cov}
|
|
|
|
BuildRequires: %{python_module pyzmq}
|
|
|
|
BuildRequires: %{python_module redis}
|
2018-08-11 06:39:28 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-09-24 09:24:50 +00:00
|
|
|
BuildRequires: dos2unix
|
2018-08-11 06:39:28 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: redis
|
|
|
|
BuildRequires: util-linux
|
2017-09-08 19:32:30 +00:00
|
|
|
Recommends: python-Jinja2
|
|
|
|
Recommends: python-SQLAlchemy
|
|
|
|
Recommends: python-execnet >= 1.0.9
|
|
|
|
Recommends: python-gevent
|
|
|
|
Recommends: python-pyzmq
|
2018-08-11 06:39:28 +00:00
|
|
|
Recommends: python-redis
|
2020-03-14 08:12:50 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python-mock
|
|
|
|
%endif
|
2017-09-08 19:32:30 +00:00
|
|
|
%python_subpackages
|
2013-04-29 13:48:34 +00:00
|
|
|
|
|
|
|
%description
|
2017-09-08 19:32:30 +00:00
|
|
|
An alternative logging implementation for python.
|
2013-04-29 13:48:34 +00:00
|
|
|
|
|
|
|
%prep
|
2021-05-07 21:04:51 +00:00
|
|
|
%autosetup -p1 -n Logbook-%{version}
|
2019-09-24 09:24:50 +00:00
|
|
|
dos2unix LICENSE
|
2013-04-29 13:48:34 +00:00
|
|
|
|
|
|
|
%build
|
2019-03-05 16:43:36 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2019-09-16 07:36:48 +00:00
|
|
|
%{python_expand cython-%{$python_version} logbook/_speedups.pyx
|
|
|
|
%{$python_build}
|
2018-08-11 06:39:28 +00:00
|
|
|
rm logbook/_speedups.c
|
2019-09-16 07:36:48 +00:00
|
|
|
}
|
2013-04-29 13:48:34 +00:00
|
|
|
|
|
|
|
%install
|
2017-09-08 19:32:30 +00:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2013-04-29 13:48:34 +00:00
|
|
|
|
2017-09-08 19:32:30 +00:00
|
|
|
%check
|
|
|
|
export CFLAGS="%{optflags}"
|
2018-08-11 06:39:28 +00:00
|
|
|
%{_sbindir}/redis-server &
|
2019-09-24 09:24:50 +00:00
|
|
|
# test_asyncio_context_management seems to fail in OBS
|
|
|
|
%pytest -k 'not test_asyncio_context_management'
|
|
|
|
kill %%1
|
2013-04-29 13:53:05 +00:00
|
|
|
|
2017-09-08 19:32:30 +00:00
|
|
|
%files %{python_files}
|
2018-08-11 06:39:28 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc CHANGES
|
2013-04-29 13:48:34 +00:00
|
|
|
%{python_sitearch}/*
|
|
|
|
|
|
|
|
%changelog
|