diff --git a/python-bucky.spec b/python-bucky.spec index 700b87f..702a201 100644 --- a/python-bucky.spec +++ b/python-bucky.spec @@ -1,8 +1,6 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} - Name: python-bucky Version: 2.2.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: CollectD and StatsD adapter for Graphite Group: System Environment/Daemons @@ -14,7 +12,9 @@ Source1: python-bucky-example.conf Source2: python-bucky-supervisord-example.conf BuildArch: noarch + BuildRequires: python2-devel, python2-setuptools +BuildRequires: python3-devel, python3-setuptools %global _description\ Bucky is a small server for collecting and translating metrics for\ @@ -25,23 +25,44 @@ and from StatsD clients. %package -n python2-bucky Summary: %summary -Requires: collectd, python2-setuptools, python2-watchdog, python2-setproctitle +Requires: collectd +Requires: python2-six +Requires: python2-setuptools +Requires: python2-watchdog +Requires: python2-setproctitle +Requires: python2-crypto %{?python_provide:%python_provide python2-bucky} %description -n python2-bucky %_description +%package -n python3-bucky +Summary: %summary +Requires: collectd +Requires: python3-six +Requires: python3-setuptools +Requires: python3-watchdog +Requires: python3-setproctitle +Requires: python3-crypto +%{?python_provide:%python_provide python3-bucky} + +%description -n python3-bucky %_description + %prep %setup -q -n bucky-%{version} %{__install} -m 644 %{SOURCE2} . %build -%{__python} setup.py build +%py2_build +%py3_build %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%py2_install +# Delete the Python 2 executable so that the Python 3 +# version can take it's place. +rm -rf %{_bindir}/bucky +%py3_install %{__mkdir_p} %{buildroot}%{_localstatedir}/log/bucky %{__mkdir_p} %{buildroot}%{_localstatedir}/run/bucky %{__mkdir_p} %{buildroot}%{_sysconfdir}/bucky @@ -63,15 +84,30 @@ fi %files -n python2-bucky -%doc THANKS README.rst LICENSE python-bucky-supervisord-example.conf +%license LICENSE +%doc THANKS README.rst python-bucky-supervisord-example.conf +%attr(-,bucky,bucky) %{_localstatedir}/log/bucky +%attr(-,bucky,bucky) %{_localstatedir}/run/bucky +%config(noreplace) %{_sysconfdir}/bucky/bucky.conf +%{python2_sitelib}/bucky/ +%{python2_sitelib}/bucky-%{version}-py?.?.egg-info + +%files -n python3-bucky +%license LICENSE +%doc THANKS README.rst python-bucky-supervisord-example.conf %{_bindir}/bucky %attr(-,bucky,bucky) %{_localstatedir}/log/bucky %attr(-,bucky,bucky) %{_localstatedir}/run/bucky %config(noreplace) %{_sysconfdir}/bucky/bucky.conf -%{python_sitelib}/* +%{python3_sitelib}/bucky/ +%{python3_sitelib}/bucky-%{version}-py?.?.egg-info %changelog +* Fri Apr 13 2018 Iryna Shcherbina - 2.2.2-11 +- Add Python 3 subpackage and modernize spec file +- Add a missing dependency on python2/3-crypto + * Wed Feb 14 2018 Iryna Shcherbina - 2.2.2-10 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)