Blame python-fedora-messaging.spec

31e8db
#
31e8db
# spec file for package python-fedora-messaging
31e8db
#
fe151c
# Copyright (c) 2022 SUSE LLC
31e8db
#
31e8db
# All modifications and additions to the file contributed by third parties
31e8db
# remain the property of their copyright owners, unless otherwise agreed
31e8db
# upon. The license for this file, and modifications and additions to the
31e8db
# file, is the same license as for the pristine package itself (unless the
31e8db
# license for the pristine package is not an Open Source License, in which
31e8db
# case the license is the MIT License). An "Open Source License" is a
31e8db
# license that conforms to the Open Source Definition (Version 1.9)
31e8db
# published by the Open Source Initiative.
31e8db
31e8db
# Please submit bugfixes or comments via https://bugs.opensuse.org/
31e8db
#
31e8db
31e8db
31e8db
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
31e8db
Name:           python-fedora-messaging
001374
Version:        3.0.2
31e8db
Release:        0
31e8db
Summary:        Python tools for Fedora's messaging infrastructure
31e8db
License:        GPL-2.0-or-later
31e8db
URL:            https://github.com/fedora-infra/fedora-messaging
31e8db
Source:         https://files.pythonhosted.org/packages/source/f/fedora_messaging/fedora_messaging-%{version}.tar.gz
31e8db
BuildRequires:  %{python_module setuptools}
31e8db
BuildRequires:  fdupes
31e8db
BuildRequires:  python-rpm-macros
31e8db
Requires:       python-Twisted
31e8db
Requires:       python-blinker
31e8db
Requires:       python-click
31e8db
Requires:       python-crochet
31e8db
Requires:       python-jsonschema
31e8db
Requires:       python-pika >= 1.0.1
31e8db
Requires:       python-pyOpenSSL
31e8db
Requires:       python-pytz
31e8db
Requires:       python-service_identity
31e8db
Requires:       python-six
31e8db
Requires:       python-toml
31e8db
BuildArch:      noarch
31e8db
# SECTION test requirements
31e8db
BuildRequires:  %{python_module Sphinx}
31e8db
BuildRequires:  %{python_module Twisted}
31e8db
BuildRequires:  %{python_module blinker}
31e8db
BuildRequires:  %{python_module click}
31e8db
BuildRequires:  %{python_module coverage}
31e8db
BuildRequires:  %{python_module crochet}
31e8db
BuildRequires:  %{python_module jsonschema}
31e8db
BuildRequires:  %{python_module pika >= 1.0.1}
31e8db
BuildRequires:  %{python_module pyOpenSSL}
31e8db
BuildRequires:  %{python_module pytest-twisted}
31e8db
BuildRequires:  %{python_module pytest}
31e8db
BuildRequires:  %{python_module pytz}
31e8db
BuildRequires:  %{python_module service_identity}
31e8db
BuildRequires:  %{python_module six}
31e8db
BuildRequires:  %{python_module toml}
31e8db
BuildRequires:  %{python_module towncrier}
31e8db
BuildRequires:  %{python_module treq}
31e8db
# /SECTION
31e8db
%python_subpackages
31e8db
31e8db
%description
31e8db
A set of Python tools for using Fedora's messaging infrastructure.
31e8db
31e8db
%prep
31e8db
%setup -q -n fedora_messaging-%{version}
31e8db
31e8db
%build
31e8db
%python_build
31e8db
31e8db
%install
31e8db
%python_install
31e8db
%python_clone -a %{buildroot}%{_bindir}/fedora-messaging
31e8db
%{python_expand rm -r %{buildroot}%{$python_sitelib}/fedora_messaging/tests/
31e8db
%fdupes %{buildroot}%{$python_sitelib}
31e8db
}
31e8db
31e8db
%post
31e8db
%python_install_alternative fedora-messaging
31e8db
31e8db
%postun
31e8db
%python_uninstall_alternative fedora-messaging
31e8db
31e8db
%check
31e8db
export PATH=$PATH:%{buildroot}%{_bindir}
31e8db
export PYTHONDONTWRITEBYTECODE=1
31e8db
export LANG=en_US.UTF-8
54a014
# https://github.com/fedora-infra/fedora-messaging/issues/255
fe151c
sed -i 's:. Perhaps you forgot a comma?::' fedora_messaging/tests/unit/test_cli.py
31e8db
# test_consume_unexpected_crash or test_consume_successful_halt are intermittent
31e8db
# and only relevant for improved handling of an unexpected failure/halt
31e8db
%pytest -k 'not (test_consume_unexpected_crash or test_consume_successful_halt)'
31e8db
31e8db
%files %{python_files}
31e8db
%doc README.rst
31e8db
%license LICENSE
31e8db
%python_alternative %{_bindir}/fedora-messaging
31e8db
%{python_sitelib}/*
31e8db
31e8db
%changelog