e5dd781
%if 0%{?fedora} > 12
e5dd781
%global with_python3 1
e5dd781
%else
e5dd781
%{!?__python2: %global __python2 /usr/bin/python2}
e5dd781
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
e5dd781
%endif
e5dd781
21812ff
%global commit 6cdef863382f5c812030ee1c15e43c4f0b98149e
8439138
%global shortcommit %(c=%{commit}; echo ${c:0:7})
0bfcac1
%global realname rosdep
8439138
11db547
Name:           python-%{realname}
21812ff
Version:        0.11.4
de5b4d3
Release:        4%{?dist}
0bfcac1
Summary:        ROS System Dependency Installer
0bfcac1
0bfcac1
License:        BSD
11db547
URL:            http://ros.org/wiki/%{realname}
e702e88
Source0:        https://github.com/ros-infrastructure/%{realname}/archive/%{commit}/%{realname}-%{commit}.tar.gz
15ac5e9
0bfcac1
BuildArch:      noarch
e5dd781
# Documentation
e5dd781
BuildRequires:  python-catkin-sphinx
e5dd781
BuildRequires:  python-sphinx
0bfcac1
e5dd781
# Build Deps
ff47a36
BuildRequires:  PyYAML
6801389
BuildRequires:  python-catkin_pkg
ff6b777
BuildRequires:  python2-devel
ad9ba56
BuildRequires:  python-nose
29ceb65
BuildRequires:  python-rosdistro >= 0.4.0
e702e88
BuildRequires:  python-rospkg >= 1.0.34
ff47a36
289c1b5
Requires:       PyYAML >= 3.1
6801389
Requires:       python-catkin_pkg
e5dd781
Requires:       python-rosdistro >= 0.4.0
e5dd781
Requires:       python-rospkg >= 1.0.34
e5dd781
e5dd781
%if 0%{?with_python3}
e5dd781
BuildRequires:  python3-PyYAML
e5dd781
BuildRequires:  python3-catkin_pkg
e5dd781
BuildRequires:  python3-devel
e5dd781
BuildRequires:  python3-nose
e5dd781
BuildRequires:  python3-rosdistro >= 0.4.0
e5dd781
BuildRequires:  python3-rospkg >= 1.0.34
e5dd781
%endif 
0bfcac1
0bfcac1
%description
0bfcac1
rosdep is a command-line tool for installing system dependencies. For 
0bfcac1
end-users, rosdep helps you install system dependencies for software that 
0bfcac1
you are building from source. For developers, rosdep simplifies the problem 
0bfcac1
of installing system dependencies on different platforms. Instead of having to 
0bfcac1
figure out which Debian package on Ubuntu Oneiric contains Boost, you can just 
0bfcac1
specify a dependency on 'boost'.
0bfcac1
e5dd781
%if 0%{?with_python3}
e5dd781
%package -n python3-%{realname}
e5dd781
Summary: ROS System Dependency Installer
e5dd781
Requires:       python3-PyYAML >= 3.1
e5dd781
Requires:       python3-catkin_pkg
e5dd781
Requires:       python3-rosdistro >= 0.4.0
e5dd781
Requires:       python3-rospkg >= 1.0.34
e5dd781
e5dd781
%description -n python3-%{realname}
e5dd781
rosdep is a command-line tool for installing system dependencies. For
e5dd781
end-users, rosdep helps you install system dependencies for software that
e5dd781
you are building from source. For developers, rosdep simplifies the problem
e5dd781
of installing system dependencies on different platforms. Instead of having to
e5dd781
figure out which Debian package on Ubuntu Oneiric contains Boost, you can just
e5dd781
specify a dependency on 'boost'.
e5dd781
%endif
0bfcac1
0bfcac1
%prep
8439138
%setup -qn %{realname}-%{commit}
ff6b777
e5dd781
%if 0%{?with_python3}
e5dd781
rm -rf %{py3dir}
e5dd781
cp -a . %{py3dir}
e5dd781
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
e5dd781
%endif # with_python3
e5dd781
e5dd781
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
0bfcac1
0bfcac1
%build
ff6b777
%{__python2} setup.py build
0bfcac1
pushd doc
0bfcac1
make man
1bd0fa6
make html
ff6b777
rm -f html/.buildinfo
0bfcac1
popd
0bfcac1
e5dd781
%if 0%{?with_python3}
e5dd781
pushd %{py3dir}
e5dd781
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
e5dd781
popd
e5dd781
%endif # with_python3
0bfcac1
0bfcac1
%install
0bfcac1
rm -rf $RPM_BUILD_ROOT
e5dd781
%if 0%{?with_python3}
e5dd781
pushd %{py3dir}
60ca9ea
%{__python3} setup.py install --force --skip-build --root $RPM_BUILD_ROOT
e5dd781
popd
2a07d6d
2a07d6d
sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}2/*.py
2a07d6d
sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}2/*.py
e5dd781
%endif # with_python3
e5dd781
60ca9ea
%{__python2} setup.py install --force --skip-build --root $RPM_BUILD_ROOT
0bfcac1
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
0bfcac1
install -p -m 0644 doc/man/rosdep.1 $RPM_BUILD_ROOT%{_mandir}/man1
0bfcac1
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ros/rosdep/sources.list.d/
0bfcac1
touch $RPM_BUILD_ROOT%{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
0bfcac1
0bfcac1
# Get rid of non-executable-script errors from rpmlint
11db547
sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python2_sitelib}/%{realname}2/*.py
11db547
sed -i 's|#!/usr/bin/env python||' $RPM_BUILD_ROOT%{python2_sitelib}/%{realname}2/platforms/*.py
0bfcac1
1bd0fa6
# Get rid of hidden file in documentation folder
1bd0fa6
rm -f doc/_build/.buildinfo
0bfcac1
ff6b777
ff6b777
# Cannot currently run tests because they need to query Github
ff6b777
# %check
ff6b777
# PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitelib} nosetests -w test
ff6b777
ff6b777
0bfcac1
%files
e702e88
%license LICENSE
e702e88
%doc README.md doc/_build/html
0bfcac1
%{_bindir}/*
ff6b777
%{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info
ff6b777
%{python2_sitelib}/%{realname}2
0bfcac1
%{_mandir}/man1/*.gz
0bfcac1
%dir %{_sysconfdir}/ros/rosdep/
0bfcac1
%dir %{_sysconfdir}/ros/rosdep/sources.list.d/
0bfcac1
%ghost %{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
0bfcac1
e5dd781
%if 0%{?with_python3}
e5dd781
%files -n python3-%{realname}
e5dd781
%license LICENSE
e5dd781
%{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info
e5dd781
%{python3_sitelib}/%{realname}2
e5dd781
%endif
0bfcac1
0bfcac1
%changelog
de5b4d3
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.4-4
de5b4d3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
de5b4d3
b1e866a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.4-3
b1e866a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b1e866a
d8080e3
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.4-2
d8080e3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
d8080e3
21812ff
* Sun Oct 18 2015 Rich Mattes <richmattes@gmail.com> - 0.11.4-1
21812ff
- Update to release 0.11.4
21812ff
- Remove upstream patches
21812ff
fe787a4
* Sun Sep 13 2015 Scott K Logan <logans@cottsay.net> - 0.11.2-4
fe787a4
- Add upstream patches for DNF
fe787a4
e69024b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-3
e69024b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e69024b
1a4bddf
* Sun Apr 19 2015 Rich Mattes <richmattes@gmail.com> - 0.11.2-2
1a4bddf
- Make sure scripts in bindir use python2 instead of python3
1a4bddf
e702e88
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.11.2-1
e702e88
- Update to release 0.11.2
e702e88
- Update to latest github guidelines
e702e88
- Use license macro for license file
e5dd781
- Added python3 package
e702e88
29ceb65
* Tue Dec 30 2014 Rich Mattes <richmattes@gmail.com> - 0.11.0-1
29ceb65
- Update to release 0.11.0
29ceb65
11db547
* Mon Nov 24 2014 Scott K Logan <logans@cottsay.net> - 0.10.33-1
11db547
- Update to release 0.10.33
11db547
4ab61a8
* Sat Oct 18 2014 Scott K Logan <logans@cottsay.net> - 0.10.32-1
4ab61a8
- Update to release 0.10.32
4ab61a8
6d206f1
* Thu Jul 31 2014 Scott K Logan <logans@cottsay.net> - 0.10.30-1
6d206f1
- Update to release 0.10.30
6d206f1
8b513b2
* Mon Jul 28 2014 Scott K Logan <logans@cottsay.net> - 0.10.29-1
8b513b2
- Update to release 0.10.29
8b513b2
15ac5e9
* Tue Jul 01 2014 Scott K Logan <logans@cottsay.net> - 0.10.28-1
15ac5e9
- Update to release 0.10.28
15ac5e9
2094895
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.27-3
2094895
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2094895
ff6b777
* Mon May 19 2014 Scott K Logan <logans@cottsay.net> - 0.10.27-2
ff6b777
- Fix for F19 release name in exceptions
ff6b777
- Update python macros to packaging spec
ff6b777
- Remove pythonpip patch, which is not needed for F19+
ff6b777
1bd0fa6
* Sat Apr 12 2014 Rich Mattes <richmattes@gmail.com> - 0.10.27-1
1bd0fa6
- Update to release 0.10.27
1bd0fa6
- Build html documentation
1bd0fa6
2758a32
* Sat Feb 08 2014 Rich Mattes <richmattes@gmail.com> - 0.10.25-1
2758a32
- Update to release 0.10.25
2758a32
6801389
* Mon Aug 19 2013 Rich Mattes <richmattes@gmail.com> - 0.10.21-1
6801389
- Update to release 0.10.21
6801389
- Depend on python-catkin_pkg (rhbz#975896)
6801389
7c1fd95
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.18-2.20130601git91fb685
7c1fd95
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7c1fd95
8439138
* Sat Jun 01 2013 Rich Mattes <richmattes@gmail.com> - 0.10.18-1.20130601git91fb6852
8439138
- Update to release 0.10.18
8439138
- Update github source url
8439138
c1a9788
* Mon Mar 18 2013 Rich Mattes <richmattes@gmail.com> - 0.10.14-1.20130318git76a8fef
c1a9788
- Update to release 0.10.14
c1a9788
- Fix installer to look for python-pip instead of pip (rhbz922296)
c1a9788
- Move rosdep cache to /var/cache instead of /etc
c1a9788
0bfcac1
* Sun Oct 28 2012 Rich Mattes <richmattes@gmail.com> - 0.10.7-1.20121028gita9d29d2
0bfcac1
- Update to 0.10.7
0bfcac1
- Depend on /etc/ros from ros-release
0bfcac1
- Separate build and install steps
0bfcac1
0bfcac1
* Mon Sep 17 2012 Rich Mattes <richmattes@gmail.com> - 0.9.7-1.20120917git5e1ecef
0bfcac1
- Update to 0.9.7
0bfcac1
0bfcac1
* Sat Jun 16 2012 Rich Mattes <richmattes@gmail.com> - 0.9.5-1
0bfcac1
- Update to 0.9.5
0bfcac1
0bfcac1
* Sun Apr 29 2012 Rich Mattes <richmattes@gmail.com> - 0.9.3-1
0bfcac1
- Initial package