Blob Blame History Raw
%global pkgname fedora-messaging
%global srcname fedora_messaging
%global desc \
Tools and APIs to make working with AMQP in Fedora easier.

%{?python_enable_dependency_generator}

Name:           %{pkgname}
Version:        1.2.0
Release:        1%{?dist}
Summary:        Set of tools for using Fedora's messaging infrastructure

License:        GPLv2+
URL:            https://github.com/fedora-infra/fedora-messaging
Source0:        %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-blinker
BuildRequires:  python3-click
BuildRequires:  python3-jsonschema
BuildRequires:  python3-mock
BuildRequires:  python3-pika
BuildRequires:  python3-pyOpenSSL
BuildRequires:  python3-pytest
BuildRequires:  python3-pytoml
BuildRequires:  python3-service-identity
BuildRequires:  python3-six
BuildRequires:  python3-sphinx
BuildRequires:  python3-twisted
Requires:       python3-%{pkgname} = %{version}-%{release}

%description %{desc}

%package     -n python3-%{pkgname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pkgname}}
# Drop when https://github.com/fedora-infra/fedora-messaging/pull/51 is released
Requires: python3-service-identity

%description -n python3-%{pkgname} %{desc}


%package doc
Summary:        Documentation for %{pkgname}
%description doc
Documentation for %{pkgname}.


%prep
%autosetup -n %{pkgname}-%{version}


%build
%py3_build
# generate docs
PYTHONPATH=${PWD} sphinx-build-3 -M html -d docs/_build/doctrees docs docs/_build/html
PYTHONPATH=${PWD} sphinx-build-3 -M man -d docs/_build/doctrees docs docs/_build/man
# remove the sphinx-build leftovers
rm -rf docs/_build/*/.buildinfo


%install
%py3_install
install -D -m 644 config.toml.example $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/config.toml
install -D -m 644 docs/_build/man/fedora-messaging.1 $RPM_BUILD_ROOT%{_mandir}/man1/fedora-messaging.1


%check
export PYTHONPATH=.
pytest-3 -vv


%files
%license LICENSE
%doc README.rst
%config(noreplace) %{_sysconfdir}/fedora-messaging/config.toml
%{_mandir}/man1/%{name}.*
%{_bindir}/%{name}

%files -n python3-%{pkgname}
%license LICENSE
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info

%files doc
%license LICENSE
%doc README.rst docs/*.rst docs/_build/html


%changelog
* Mon Jan 21 2019 Jeremy Cline <jeremy@jcline.org> - 1.2.0-1
- Update to v1.2.0

* Thu Nov 15 2018 Jeremy Cline <jeremy@jcline.org> - 1.1.0-1
- Update to v1.1.0

* Wed Oct 10 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.1-1
- Update to v1.0.1

* Wed Oct 10 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.0-1
- Update to v1.0.0

* Fri Sep 07 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.0-0.2b1
- Move dependency generator macro to top of file
- Depend on version + release for the library
- Add python_provide macro

* Wed Aug 29 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.0-0.1b1
- Update to 1.0.0b1
- Drop Python 2 package for Rawhide

* Wed Aug 15 2018 Aurelien Bompard <abompard@fedoraproject.org> - 1.0.0-0.1.a1
- Initial package