From 47146b67a223d8e15715a52bd6a35eb444b7b2ac Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Apr 16 2019 19:57:08 +0000 Subject: initial import, review in rhbz#1669793 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a2239f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/python-vpoller-0.7.3.tar.gz diff --git a/python-vpoller.spec b/python-vpoller.spec new file mode 100644 index 0000000..b3444a3 --- /dev/null +++ b/python-vpoller.spec @@ -0,0 +1,131 @@ +%{?python_enable_dependency_generator} + +%global modname vpoller +%global sum Distributed vSphere API Proxy + +Name: python-%{modname} +Version: 0.7.3 +Release: 2%{?dist} +Summary: %{sum} + +# setup.py mentions BSD license +License: BSD +URL: https://github.com/dnaeon/py-%{modname} +# hint: pypi misses several files but github provides +Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildArch: noarch + +%global _description \ +vPoller is a distributed VMware vSphere API Proxy,\ +designed for discovering and polling of vSphere objects.\ +\ +It uses the VMware vSphere API in order to perform discovery\ +and polling of vSphere objects.\ +\ +vPoller uses the ZeroMQ messaging library for distributing\ +tasks to workers and load balancing of client requests.\ +\ +vPoller can be integrated with other systems, which require\ +access to vSphere objects, but do not have native support\ +for it.\ +\ +Possible scenarios where vPoller could be used is integration\ +with monitoring systems as part of the discovery and polling\ +process in order to provide monitoring of your VMware vSphere\ +environment. + +%description +%{_description} + +%package -n python%{python3_pkgversion}-%{modname} +Summary: %{sum} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +#BuildRequires: %%{py3_dist docopt zmq vconnector pyvmomi sphinx} +BuildRequires: python%{python3_pkgversion}-docopt +BuildRequires: python%{python3_pkgversion}-zmq +BuildRequires: python%{python3_pkgversion}-vconnector +BuildRequires: python%{python3_pkgversion}-pyvmomi +# no magic dependencies in epel +%if %{undefined __pythondist_requires} +Requires: python%{python3_pkgversion}-pyvmomi +Requires: python%{python3_pkgversion}-vconnector +Requires: python%{python3_pkgversion}-zmq +Requires: python%{python3_pkgversion}-docopt +%endif + +%description -n python%{python3_pkgversion}-%{modname} +%{_description} + +%package -n %{modname} +Summary: Executable binaries for %{sum} +BuildRequires: help2man +Requires: python%{python3_pkgversion}-%{modname} + +%description -n %{modname} +%{_description} +This pacakge installs the executable binaries. + +%package doc +Summary: Documentation files for %{sum} +BuildRequires: python%{python3_pkgversion}-sphinx + +%description doc +%{_description} +This pacakge installs several documentation files. + +%prep +%autosetup -npy-%{modname}-%{version} + +%build +%py3_build +PYTHONPATH=../src SPHINXBUILD=sphinx-build-3 SPHINXOPTS=%{_smp_mflags} %make_build -C docs html +rm -rf docs/_build/html/.{doctrees,buildinfo} +# wrong-script-interpreter +grep -rl "/usr/bin/env" | xargs chmod 0644 +grep -rl "/usr/bin/env" | xargs sed -i "s|#!/usr/bin/env |/usr/bin/|" + +%install +%py3_install +# manpages +pushd %{buildroot} +install -d .%{_mandir}/man1 +for suffix in client proxy worker ; do +PYTHONPATH=.%{python3_sitelib} help2man --no-discard-stderr \ + -o .%{_mandir}/man1/%{modname}-${suffix}.1 .%{_bindir}/%{modname}-${suffix} +done +popd + + +%files -n python%{python3_pkgversion}-%{modname} +%license LICENSE +%doc README.rst AUTHORS.txt +%{python3_sitelib}/%{modname}/ +%{python3_sitelib}/%{modname}-%{version}-py%{python3_version}.egg-info/ + +%files -n %{modname} +%license LICENSE +%{_bindir}/%{modname}-* +%{_mandir}/man1/%{modname}-*.1* + +%files doc +%license LICENSE +%doc docs/_build/html/ +%doc contrib/ extra/ + + +%changelog +* Sun Apr 14 2019 Raphael Groner - 0.7.3-2 +- split subpackages for doc and bin +- move BR into subpackages + +* Wed Apr 10 2019 Raphael Groner - 0.7.3-1 +- new version +- drop upstreamed license patch +- generate manpages +- fix rpmlint + +* Sat Jan 26 2019 Raphael Groner - 0.7.1-1 +- initial diff --git a/sources b/sources new file mode 100644 index 0000000..b01470f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (python-vpoller-0.7.3.tar.gz) = bb9f4aa7d508a26557b4f2e239997b6add29a19d636b149eb10d70166e16da17ee67ff775cd7b42610bd2293466c54199eeee1d8a7157edde5bc9f599ece60e9