From 50fd67aeed75e36ccce5c9ab733fcc66b0a0f464 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Sep 12 2018 21:57:01 +0000 Subject: Initial import (#1623616) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f0e47b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fedora_messaging-1.0.0b1.tar.gz diff --git a/Use-old-napoleon-module-for-EPEL-7.patch b/Use-old-napoleon-module-for-EPEL-7.patch new file mode 100644 index 0000000..1f868b3 --- /dev/null +++ b/Use-old-napoleon-module-for-EPEL-7.patch @@ -0,0 +1,26 @@ +From ddf28f63fd5ffbae79589e33272825dd18027472 Mon Sep 17 00:00:00 2001 +From: Jeremy Cline +Date: Wed, 12 Sep 2018 16:43:52 -0400 +Subject: [PATCH] Use old napoleon module for EPEL 7 + +Signed-off-by: Jeremy Cline +--- + docs/conf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/conf.py b/docs/conf.py +index ece6158..d0d359f 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -42,7 +42,7 @@ extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.viewcode", +- "sphinx.ext.napoleon", ++ "sphinxcontrib.napoleon", + ] + + # Add any paths that contain templates here, relative to this directory. +-- +2.17.1 + diff --git a/fedora-messaging.spec b/fedora-messaging.spec new file mode 100644 index 0000000..dba3b71 --- /dev/null +++ b/fedora-messaging.spec @@ -0,0 +1,113 @@ +%global pkgname fedora-messaging +%global srcname fedora_messaging +%global desc \ +Tools and APIs to make working with AMQP in Fedora easier. + +Name: %{pkgname} +Version: 1.0.0 +Release: 0.2.b1%{?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}b1/%{srcname}-%{version}b1.tar.gz +Patch0: Use-old-napoleon-module-for-EPEL-7.patch +BuildArch: noarch + +BuildRequires: python-devel +BuildRequires: python-blinker +BuildRequires: python-click +BuildRequires: python-jsonschema +BuildRequires: python-mock +BuildRequires: python-pika >= 0.12.0 +BuildRequires: pyOpenSSL +BuildRequires: pytest +BuildRequires: python-pytoml +BuildRequires: python-pytz +BuildRequires: python-six +BuildRequires: python-sphinx +BuildRequires: python-sphinxcontrib-napoleon +Requires: python-%{pkgname} = %{version}-%{release} + +%description %{desc} + +%package -n python2-%{pkgname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{pkgname}} +# Drop when https://github.com/fedora-infra/fedora-messaging/pull/51 is released +Requires: python-blinker +Requires: python-click +Requires: python-jsonschema +Requires: python-pika >= 0.12.0 +Requires: pyOpenSSL +Requires: python-pytoml +Requires: python-six +Requires: python-pytz + +%description -n python2-%{pkgname} %{desc} + + +%package doc +Summary: Documentation for %{pkgname} +%description doc +Documentation for %{pkgname}. + + +%prep +%autosetup -p1 -n %{pkgname}-%{version}b1 + +# Twisted is too old in EPEL7 to bother supporting. +rm -f fedora_messaging/tests/unit/twisted/*.py + +# Swathes of unit tests fail due to old versions of mock +rm -f fedora_messaging/tests/unit/test_config.py +rm -f fedora_messaging/tests/unit/test_cli.py + +%build +%py2_build +# generate docs +PYTHONPATH=${PWD} sphinx-build -b man -d docs/_build/doctrees docs docs/_build/man +# remove the sphinx-build leftovers +rm -rf docs/_build/*/.buildinfo + + +%install +%py2_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=. +py.test -vv fedora_messaging/tests/unit/ + + +%files +%license LICENSE +%doc README.rst +%config(noreplace) %{_sysconfdir}/fedora-messaging/config.toml +%{_mandir}/man1/%{name}.* +%{_bindir}/%{name} + +%files -n python2-%{pkgname} +%license LICENSE +%{python2_sitelib}/%{srcname} +%{python2_sitelib}/%{srcname}-%{version}b1-py%{python2_version}.egg-info + +%files doc +%license LICENSE +%doc README.rst docs/*.rst + + +%changelog +* Fri Sep 07 2018 Jeremy Cline - 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 - 1.0.0-0.1b1 +- Update to 1.0.0b1 +- Drop Python 2 package for Rawhide + +* Wed Aug 15 2018 Aurelien Bompard - 1.0.0-0.1.a1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..fce26b4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fedora_messaging-1.0.0b1.tar.gz) = 38c289be18d3bb2d0b9bef029aea25c486b63e9c997bd633a1bd47fba33ad2b6192d133bdb739f03e98ec496fe932b280ea52393f0cf730ffb9909dc08ef53f4