Blob Blame History Raw
%global commit cd86c548c9c4ae024478f49f0cd45c0c8bfeb72f
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           python-bloom
Version:        0.5.26
Release:        2%{?dist}
Summary:        Bloom is a release automation tool

Group:          Development/Tools
License:        BSD
URL:            http://www.ros.org/wiki/bloom
Source0:        https://github.com/ros-infrastructure/bloom/archive/%{commit}/bloom-%{commit}.tar.gz

BuildArch:      noarch

BuildRequires:  python2-nose
BuildRequires:  python3-nose
BuildRequires:  python-pep8
BuildRequires:  python3-pep8
BuildRequires:  python-sphinx
BuildRequires:  python2-devel
BuildRequires:  python3-devel

%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 -n python2-bloom
Summary: Bloom is a release automation tool
%{?python_provide:%python_provide python2-bloom}
Requires:       PyYAML
Requires:       python2-catkin_pkg >= 0.2.2
Requires:       python2-dateutil
Requires:       python-empy
Requires:       python2-rosdep >= 0.10.25
Requires:       python2-rosdistro >= 0.4.0
Requires:       python2-setuptools
Requires:       python2-vcstools >= 0.1.22

%description -n python2-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.

%package -n python3-bloom
Summary: Bloom is a release automation tool
%{?python_provide:%python_provide python3-bloom}
Requires:       python3-PyYAML
Requires:       python3-catkin_pkg >= 0.2.2
Requires:       python3-dateutil
Requires:       python3-empy
Requires:       python3-rosdep >= 0.10.25
Requires:       python3-rosdistro >= 0.4.0
Requires:       python3-setuptools
Requires:       python3-vcstools >= 0.1.22

%description -n python3-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
%setup -qn bloom-%{commit}

%build
%py2_build
%py3_build
PYTHONPATH=%{_builddir}/bloom-%{commit}/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){,-3}
	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 -m0644 -D docs/_build/man/bloom.1 %{buildroot}%{_datadir}/man/man1/bloom.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} nosetests test/test_code_format.py
PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} test/test_code_format.py

%files -n python2-bloom
%doc CHANGELOG.rst LICENSE.txt README.rst docs/_build/html
%{python2_sitelib}/bloom
%{python2_sitelib}/bloom-%{version}-py?.?.egg-info
%{_bindir}/*[!3,%{python3_version}]
%{_datadir}/man/man1/bloom.1.gz

%files -n python3-bloom
%doc CHANGELOG.rst LICENSE.txt README.rst docs/_build/html
%{python3_sitelib}/bloom
%{python3_sitelib}/bloom-%{version}-py?.?.egg-info
%{_bindir}/*-3
%{_bindir}/*-%{python3_version}
%{_datadir}/man/man1/bloom.1.gz

%changelog
* 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