%{?python_enable_dependency_generator}
%global srcname bloom
Name: python-%{srcname}
Version: 0.7.0
Release: 2%{?dist}
Summary: Bloom is a release automation tool
License: BSD
URL: http://www.ros.org/wiki/bloom
Source0: https://github.com/ros-infrastructure/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
Patch0: %{name}-0.6.6-py3.patch
BuildArch: noarch
%description
Bloom provides tools for releasing software on top of a git repository
and leverages tools and patterns from git-buildpackage. Additionally,
bloom leverages meta and build information from catkin
(https://github.com/ros/catkin) to automate release branching and the
generation of platform specific source packages, like debian's src-debs.
%package doc
Summary: HTML documentation for '%{name}'
BuildRequires: python2-sphinx
%description doc
HTML documentation for the '%{srcname}' python module
%package -n python2-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python2-bloom}
Requires: python2-pyyaml
Requires: python2-catkin_pkg >= 0.4.3
Requires: python2-dateutil
Requires: python2-empy
Requires: python2-rosdep >= 0.10.25
Requires: python2-rosdistro >= 0.7.0
Requires: python2-setuptools
Requires: python2-vcstools >= 0.1.22
BuildRequires: python2-devel
BuildRequires: python2-nose
BuildRequires: python2-pep8
Recommends: %{name}-doc = %{version}-%{release}
%description -n python2-%{srcname}
Bloom provides tools for releasing software on top of a git repository
and leverages tools and patterns from git-buildpackage. Additionally,
bloom leverages meta and build information from catkin
(https://github.com/ros/catkin) to automate release branching and the
generation of platform specific source packages, like debian's src-debs.
%package -n python%{python3_pkgversion}-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-bloom}
%if %{undefined __pythondist_requires}
Requires: python%{python3_pkgversion}-PyYAML
Requires: python%{python3_pkgversion}-catkin_pkg >= 0.4.3
Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-empy
Requires: python%{python3_pkgversion}-rosdep >= 0.10.25
Requires: python%{python3_pkgversion}-rosdistro >= 0.7.0
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-vcstools >= 0.1.22
%endif
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-pep8
Recommends: %{name}-doc = %{version}-%{release}
%description -n python%{python3_pkgversion}-bloom
Bloom provides tools for releasing software on top of a git repository
and leverages tools and patterns from git-buildpackage. Additionally,
bloom leverages meta and build information from catkin
(https://github.com/ros/catkin) to automate release branching and the
generation of platform specific source packages, like debian's src-debs.
%prep
%autosetup -p1 -n %{srcname}-%{version}
%build
%py2_build
%py3_build
PYTHONPATH=build/lib make -C docs html man
rm -f docs/_build/html/.buildinfo
%install
# Make the python2 versions of the binaries the default for now.
# Create versioned symlinks as per python packaging guidelines.
%py3_install
for f in %{buildroot}%{_bindir}/*;
do
mv %{buildroot}%{_bindir}/$(basename $f){,-%{python3_pkgversion}}
ln -s %{_bindir}/$(basename $f)-3 %{buildroot}%{_bindir}/$(basename $f)-%{python3_version}
done
%py2_install
for f in %{buildroot}%{_bindir}/*[!3,%{python3_version}];
do
ln -s %{_bindir}/$(basename $f) %{buildroot}%{_bindir}/$(basename $f)-2
ln -s %{_bindir}/$(basename $f) %{buildroot}%{_bindir}/$(basename $f)-%{python2_version}
done
# Test directory should NOT be installed
rm -rf %{buildroot}%{python2_sitelib}/test
rm -rf %{buildroot}%{python3_sitelib}/test
# Scripts don't install the manpage - do it manually.
install -p -m0644 -D docs/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1
%check
# Many of the tests require rosdep to be functioning, which requires sudo.
# Run only the tests that don't.
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m nose test/test_code_format.py
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m nose test/test_code_format.py
%files doc
%license LICENSE.txt
%doc docs/_build/html
%files -n python2-%{srcname}
%license LICENSE.txt
%doc CHANGELOG.rst README.rst
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/
%{_bindir}/*[!%{python3_pkgversion},%{python3_version}]
%{_bindir}/*-%{python2_version}
%{_mandir}/man1/%{srcname}.1.gz
%files -n python3-bloom
%license LICENSE.txt
%doc CHANGELOG.rst README.rst
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
%{_bindir}/*-%{python3_pkgversion}
%{_bindir}/*-%{python3_version}
%{_mandir}/man1/%{srcname}.1.gz
%changelog
* Fri Jan 11 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.0-2
- Enable python dependency generator
* Thu Jan 10 2019 Scott K Logan <logans@cottsay.net> - 0.7.0-1
- Update to 0.7.0
* Thu Nov 15 2018 Scott K Logan <logans@cottsay.net> - 0.6.9-1
- Update to 0.6.9
* Wed Nov 07 2018 Scott K Logan <logans@cottsay.net> - 0.6.8-1
- Update to 0.6.8
- Use python3_pkgversion
- Use srcname
- Create a separate 'doc' package
* Fri Aug 10 2018 Rich Mattes <richmattes@gmail.com> - 0.6.6-1
- Update to release 0.6.6 (rhbz#1504444)
- Fix rahwhide FTBFS (rhbz#1605618)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.26-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.26-5
- Rebuilt for Python 3.7
* Sun Feb 11 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.26-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.26-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sun Apr 09 2017 Rich Mattes <richmattes@gmail.com> - 0.5.26-1
- Update to release 0.5.26 (rhbz#1426464)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.23-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Dec 21 2016 Rich Mattes <richmattes@gmail.com> - 0.5.23-1
- Update to release 0.5.23 (rhbz#1315529)
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.5.22-4
- Rebuild for Python 3.6
* Sun Nov 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.5.22-3
- Fix PyYAML dependency
* Mon Oct 24 2016 Rich Mattes <richmattes@gmail.com> - 0.5.22-2
- Fix Requires for rawhide
* Thu Oct 20 2016 Rich Mattes <richmattes@gmail.com> - 0.5.22-1
- Update to 0.5.22 (rhbz#1370774)
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.21-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Sun Apr 03 2016 Scott K Logan <logans@cottsay.net> - 0.5.21-1
- Update to 0.5.21
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.20-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Apr 24 2015 Rich Mattes <richmattes@gmail.com> - 0.5.20-1
- Update to 0.5.20 (rhbz#1214972)
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.5.19-1
- Update to 0.5.19
* Mon Dec 15 2014 Scott K Logan <logans@cottsay.net> - 0.5.16-1
- Update to 0.5.16
* Sat Dec 13 2014 Scott K Logan <logans@cottsay.net> - 0.5.15-1
- Update to 0.5.15
* Fri Nov 28 2014 Scott K Logan <logans@cottsay.net> - 0.5.14-1
- Update to 0.5.14
* Thu Sep 25 2014 Scott K Logan <logans@cottsay.net> - 0.5.12-1
- Update to 0.5.12
* Thu Jul 24 2014 Scott K Logan <logans@cottsay.net> - 0.5.11-1
- Update to 0.5.11
* Mon Jun 09 2014 Scott K Logan <logans@cottsay.net> - 0.5.9-1
- Update to 0.5.9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon May 19 2014 Scott K Logan <logans@cottsay.net> - 0.5.8-1
- Update to 0.5.8
* Fri Apr 11 2014 Scott K Logan <logans@cottsay.net> - 0.5.4-1
- Update to 0.5.4
- Removed setuptools patch
* Mon Apr 07 2014 Scott K Logan <logans@cottsay.net> - 0.5.2-1
- Update to 0.5.2
- Changed source URL to Github
- Added HTML to docs
- Added man page
- Added LICENSE.txt
- Added setuptools patch
* Tue Mar 04 2014 Scott K Logan <logans@cottsay.net> - 0.5.1-1
- Initial package