From 56ffceab1caba2b5d8be7b04954148cf4023d2c1 Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Oct 13 2020 08:48:07 +0000 Subject: [PATCH 1/3] Initial spec --- diff --git a/README.md b/README.md index cabcdd2..bc9a969 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ # python-zuul-client -The python-zuul-client package +Python-zuul-client is a REST client library that can be used to interact with +Zuul, the project gating system. It comes with a CLI tool called zuul-client. + +The latest documentation for Zuul and Zuul-client can be found at: +https://zuul-ci.org/docs/zuul/ + +## Getting Help + +There are two Zuul-related mailing lists: + +`zuul-announce `_ + A low-traffic announcement-only list to which every Zuul operator or + power-user should subscribe. + +`zuul-discuss `_ + General discussion about Zuul, including questions about how to use + it, and future development. + +You will also find Zuul developers in the `#zuul` channel on Freenode +IRC. + +## License + +python-zuul-client is free software, and licensed under the Apache License, version 2.0. diff --git a/fake-zuul-client b/fake-zuul-client new file mode 100644 index 0000000..054c4d2 --- /dev/null +++ b/fake-zuul-client @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +# This is only used at build time to generate the documentation. + +from zuulclient.cmd import main + + +if __name__ == '__main__': + main() diff --git a/python-zuul-client.spec b/python-zuul-client.spec new file mode 100644 index 0000000..6db7462 --- /dev/null +++ b/python-zuul-client.spec @@ -0,0 +1,91 @@ +%global pypi_name zuul-client + +Name: python-%{pypi_name} +Version: 0.0.2 +Release: 1%{?dist} +Summary: The zuulclient Python module +License: ASL 2.0 +URL: https://zuul-ci.org + +Source0: %pypi_source + +Source1: fake-zuul-client + +BuildArch: noarch + +%description +The zuulclient Python module is a client library for +Zuul Gating System's REST API. It includes zuul-client, +a CLI utility to interact with Zuul instances. + +%package -n python3-%{pypi_name} +Summary: %summary +BuildRequires: python3dist(testtools) +BuildRequires: python3dist(stestr) +BuildRequires: python3-devel +BuildRequires: python3dist(requests) +# Doc requirements +BuildRequires: python3dist(zuul-sphinx) +BuildRequires: python3dist(sphinx-autodoc-typehints) +BuildRequires: python3dist(sphinxcontrib-blockdiag) +BuildRequires: python3dist(sphinxcontrib-programoutput) +BuildRequires: python3dist(reno) + +%py_provides python3-%{pypi_name} + +%prep +%autosetup -n %{pypi_name}-%{version} + +%description -n python3-%{pypi_name} +The zuulclient Python module is a client library for +Zuul Gating System's REST API. It includes zuul-client, +a CLI utility to interact with Zuul instances. + +%package doc +Summary: zuul-client documentation + +%description doc +Documentation for the zuulclient library and the zuul-client CLI. + +%build +%py3_build + +cp %{SOURCE1} build/zuul-client +chmod +x build/zuul-client +# Generate documentation (without release note because source doesn't have git log) +sed -e 's/^ *releasenotes$//' -i doc/source/index.rst +rm doc/source/releasenotes.rst +# Build HTML doc +PYTHONPATH=../../build/lib PATH=$PATH:$(pwd)/build PBR_VERSION=%{version} SPHINX_DEBUG=1 sphinx-build-3 \ + -b html doc/source build/html +# Remove empty stub files +find build -type f -name "*.pyi" -size 0 -delete +# rm doc build leftovers +rm -Rf build/html/.buildinfo build/html/.doctrees +# Fix file-not-utf8 +iconv -f iso8859-1 -t utf-8 build/html/objects.inv > build/html/objects.inv.conv && \ + mv -f build/html/objects.inv.conv build/html/objects.inv +# Fix wrong-file-end-of-line-encoding +sed -i 's/\r$//' LICENSE +sed -i 's/\r$//' build/html/objects.inv + +%install +%py3_install + +%check +PYTHON=%{__python3} stestr run + +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/* +%{python3_sitelib}/zuulclient +%{python3_sitelib}/zuul_client*.egg-info + +%files doc +%license LICENSE +%doc build/html + +%changelog +* Thu Oct 1 2020 Matthieu Huin - 0.0.2-1 +- Initial packaging From 6ce3e09014fded237357328fe07554ec8641472e Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Oct 13 2020 08:53:44 +0000 Subject: [PATCH 2/3] Fix URLs in README --- diff --git a/README.md b/README.md index bc9a969..2cadca2 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,15 @@ https://zuul-ci.org/docs/zuul/ There are two Zuul-related mailing lists: -`zuul-announce `_ - A low-traffic announcement-only list to which every Zuul operator or - power-user should subscribe. +[zuul-announce](http://lists.zuul-ci.org/cgi-bin/mailman/listinfo/zuul-announce) +is a low-traffic announcement-only list to which every Zuul operator or power-user +should subscribe. -`zuul-discuss `_ - General discussion about Zuul, including questions about how to use - it, and future development. +[zuul-discuss](http://lists.zuul-ci.org/cgi-bin/mailman/listinfo/zuul-discuss) +is for general discussions about Zuul, including questions about how to use it, +and future development -You will also find Zuul developers in the `#zuul` channel on Freenode -IRC. +You will also find Zuul developers in the `#zuul` channel on Freenode IRC. ## License From 733ea28a15bc6360367ad7fb5ccf78e323074b47 Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Oct 13 2020 09:06:03 +0000 Subject: [PATCH 3/3] Add sources --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bb78106 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zuul-client-0.0.2.tar.gz diff --git a/sources b/sources new file mode 100644 index 0000000..4de263c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zuul-client-0.0.2.tar.gz) = c6c54c97e315d9cbf29374cae84e146c77702577caf093f80b8693a29a8a2c299d7bcbc1aa6c8c4880c4de4f38cc74139cb909c7a51430e5acbb9219d4b8d3aa