80f74d3
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8 || 0%{?fedora} >= 32)}
dc26b07
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7}
dc26b07
dc26b07
%global srcname rosdep
dc26b07
dc26b07
Name:           python-%{srcname}
6a13214
Version:        0.22.2
508cebb
Release:        1%{?dist}
0bfcac1
Summary:        ROS System Dependency Installer
0bfcac1
0bfcac1
License:        BSD
dc26b07
URL:            http://ros.org/wiki/%{srcname}
dc26b07
Source0:        https://github.com/ros-infrastructure/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
86bc1a5
0bfcac1
BuildArch:      noarch
0bfcac1
0bfcac1
%description
dc26b07
rosdep is a command-line tool for installing system dependencies. For
dc26b07
end-users, rosdep helps you install system dependencies for software that
dc26b07
you are building from source. For developers, rosdep simplifies the problem
dc26b07
of installing system dependencies on different platforms. Instead of having to
dc26b07
figure out which Debian package on Ubuntu Oneiric contains Boost, you can just
0bfcac1
specify a dependency on 'boost'.
0bfcac1
a81cd5b
dc26b07
%package doc
dc26b07
Summary:        HTML documentation for '%{name}'
f9c034a
BuildRequires:  make
a81cd5b
BuildRequires:  python%{python3_pkgversion}-catkin-sphinx
a81cd5b
BuildRequires:  python%{python3_pkgversion}-sphinx
dc26b07
dc26b07
%description doc
dc26b07
HTML documentation for the '%{srcname}' python module
dc26b07
a81cd5b
dc26b07
%if 0%{?with_python2}
dc26b07
%package -n python2-%{srcname}
dc26b07
Summary:        %{summary}
cbae7fc
BuildRequires:  npm
a81cd5b
BuildRequires:  python2-catkin_pkg >= 0.4.0
dc26b07
BuildRequires:  python2-devel
dc26b07
BuildRequires:  python2-mock
cbae7fc
BuildRequires:  python2-pip
cbae7fc
BuildRequires:  python2-pytest
dc26b07
BuildRequires:  python2-pyyaml >= 3.1
508cebb
BuildRequires:  python2-rosdistro >= 0.7.5
cbae7fc
BuildRequires:  python2-rospkg >= 1.4.0
cbae7fc
BuildRequires:  rubygems
d1260cd
Requires:       python-srpm-macros
dc26b07
%{?python_provide:%python_provide python2-%{srcname}}
dc26b07
a81cd5b
%if %{undefined __pythondist_requires}
a81cd5b
Requires:       python2-catkin_pkg >= 0.4.0
a81cd5b
Requires:       python2-pyyaml >= 3.1
508cebb
Requires:       python2-rosdistro >= 0.7.5
cbae7fc
Requires:       python2-rospkg >= 1.4.0
04098a1
%endif
a81cd5b
04098a1
%if !0%{?rhel} || 0%{?rhel} >= 8
508cebb
Recommends:     python2-pip
dc26b07
Recommends:     python2-rpm
d1260cd
Suggests:       %{name}-doc = %{version}-%{release}
cbae7fc
Suggests:       npm
cbae7fc
Suggests:       rubygems
04098a1
%endif
dc26b07
dc26b07
%description -n python2-%{srcname}
f901563
rosdep is a command-line tool for installing system dependencies. For
f901563
end-users, rosdep helps you install system dependencies for software that
f901563
you are building from source. For developers, rosdep simplifies the problem
f901563
of installing system dependencies on different platforms. Instead of having to
f901563
figure out which Debian package on Ubuntu Oneiric contains Boost, you can just
f901563
specify a dependency on 'boost'.
04098a1
%endif
86bc1a5
a81cd5b
f901563
%if 0%{?with_python3}
dc26b07
%package -n python%{python3_pkgversion}-%{srcname}
dc26b07
Summary:        %{summary}
cbae7fc
BuildRequires:  npm
a81cd5b
BuildRequires:  python%{python3_pkgversion}-catkin_pkg >= 0.4.0
dc26b07
BuildRequires:  python%{python3_pkgversion}-devel
cbae7fc
BuildRequires:  python%{python3_pkgversion}-setuptools
cbae7fc
BuildRequires:  python%{python3_pkgversion}-pip
cbae7fc
BuildRequires:  python%{python3_pkgversion}-pytest
dc26b07
BuildRequires:  python%{python3_pkgversion}-PyYAML >= 3.1
508cebb
BuildRequires:  python%{python3_pkgversion}-rosdistro >= 0.7.5
cbae7fc
BuildRequires:  python%{python3_pkgversion}-rospkg >= 1.4.0
cbae7fc
BuildRequires:  rubygems
d1260cd
Requires:       python-srpm-macros
dc26b07
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
dc26b07
a81cd5b
%if %{undefined __pythondist_requires}
a81cd5b
Requires:       python%{python3_pkgversion}-catkin_pkg >= 0.4.0
a81cd5b
Requires:       python%{python3_pkgversion}-PyYAML >= 3.1
508cebb
Requires:       python%{python3_pkgversion}-rosdistro >= 0.7.5
cbae7fc
Requires:       python%{python3_pkgversion}-rospkg >= 1.4.0
04098a1
%endif
a81cd5b
04098a1
%if !0%{?rhel} || 0%{?rhel} >= 8
508cebb
Recommends:     python%{python3_pkgversion}-pip
dc26b07
Recommends:     python%{python3_pkgversion}-rpm
d1260cd
Suggests:       %{name}-doc = %{version}-%{release}
cbae7fc
Suggests:       npm
cbae7fc
Suggests:       rubygems
04098a1
%endif
dc26b07
dc26b07
%description -n python%{python3_pkgversion}-%{srcname}
dc26b07
rosdep is a command-line tool for installing system dependencies. For
dc26b07
end-users, rosdep helps you install system dependencies for software that
dc26b07
you are building from source. For developers, rosdep simplifies the problem
dc26b07
of installing system dependencies on different platforms. Instead of having to
dc26b07
figure out which Debian package on Ubuntu Oneiric contains Boost, you can just
dc26b07
specify a dependency on 'boost'.
04098a1
%endif
f901563
a81cd5b
dc26b07
%prep
dc26b07
%autosetup -p1 -n %{srcname}-%{version}
0bfcac1
cbae7fc
# Drop unsupported syntax in older setuptools
cbae7fc
sed -i "s/mock; python_version < '3.3'//" setup.py
cbae7fc
a81cd5b
0bfcac1
%build
dc26b07
%if 0%{?with_python2}
dc26b07
%py2_build
04098a1
%endif
0bfcac1
f901563
%if 0%{?with_python3}
dc26b07
%py3_build
04098a1
%endif
0bfcac1
a81cd5b
PYTHONPATH=$PWD/src %make_build -C doc man html SPHINXBUILD=sphinx-build-%{python3_version}
dc26b07
rm doc/_build/html/.buildinfo
dc26b07
a81cd5b
0bfcac1
%install
dc26b07
%if 0%{?with_python2}
a81cd5b
%py2_install -- --install-scripts %{_bindir}/scripts
dc26b07
dc26b07
echo -n > py2_bins
dc26b07
for f in `ls %{buildroot}%{_bindir}/scripts`; do
dc26b07
    mv %{buildroot}%{_bindir}/scripts/$f %{buildroot}%{_bindir}/$f-%{python2_version}
dc26b07
    ln -s $f-%{python2_version} %{buildroot}%{_bindir}/$f-2
dc26b07
    ln -s $f-%{python2_version} %{buildroot}%{_bindir}/$f
dc26b07
    echo -e "%{_bindir}/$f\n%{_bindir}/$f-2\n%{_bindir}/$f-%{python2_version}" >> py2_bins
dc26b07
done
04098a1
%endif
f4d0361
dc26b07
%if 0%{?with_python3}
a81cd5b
%py3_install -- --install-scripts %{_bindir}/scripts
dc26b07
dc26b07
echo -n > py3_bins
dc26b07
for f in `ls %{buildroot}%{_bindir}/scripts`; do
dc26b07
    mv %{buildroot}%{_bindir}/scripts/$f %{buildroot}%{_bindir}/$f-%{python3_version}
dc26b07
    ln -s $f-%{python3_version} %{buildroot}%{_bindir}/$f-3
dc26b07
%if !(0%{?with_python2})
dc26b07
    ln -s $f-%{python3_version} %{buildroot}%{_bindir}/$f
dc26b07
    echo "%{_bindir}/$f" >> py3_bins
04098a1
%endif
dc26b07
    echo -e "%{_bindir}/$f-3\n%{_bindir}/$f-%{python3_version}" >> py3_bins
dc26b07
done
04098a1
%endif
f901563
dc26b07
rm -rf %{buildroot}%{_bindir}/scripts
dc26b07
install -D -p -m 0644 doc/man/rosdep.1 %{buildroot}%{_mandir}/man1/rosdep.1
dc26b07
install -D -p -m 0644 /dev/null %{buildroot}%{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
0bfcac1
a81cd5b
dc26b07
# Cannot currently run all of the tests because some need to query Github
dc26b07
%check
dc26b07
%if 0%{?with_python2}
cbae7fc
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest test \
cbae7fc
    --ignore test/test_flake8.py \
cbae7fc
    -m 'not online' \
6ebe1ba
    %{nil}
04098a1
%endif
0bfcac1
dc26b07
%if 0%{?with_python3}
cbae7fc
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest test \
cbae7fc
    --ignore test/test_flake8.py \
cbae7fc
    -m 'not online' \
6ebe1ba
    %{nil}
04098a1
%endif
86bc1a5
a81cd5b
dc26b07
%files doc
dc26b07
%license LICENSE
dc26b07
%doc doc/_build/html
86bc1a5
dc26b07
%if 0%{?with_python2}
dc26b07
%files -n python2-%{srcname} -f py2_bins
0e89e14
%license LICENSE
dc26b07
%doc README.md
dc26b07
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/
dc26b07
%{python2_sitelib}/%{srcname}2/
dc26b07
%{_mandir}/man1/%{srcname}.1.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
04098a1
%endif
0bfcac1
f901563
%if 0%{?with_python3}
dc26b07
%files -n python%{python3_pkgversion}-%{srcname} -f py3_bins
f901563
%license LICENSE
dc26b07
%doc README.md
dc26b07
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
dc26b07
%{python3_sitelib}/%{srcname}2/
dc26b07
%{_mandir}/man1/%{srcname}.1.gz
dc26b07
%dir %{_sysconfdir}/ros/rosdep/
dc26b07
%dir %{_sysconfdir}/ros/rosdep/sources.list.d/
dc26b07
%ghost %{_sysconfdir}/ros/rosdep/sources.list.d/20-default.list
04098a1
%endif
0bfcac1
a81cd5b
0bfcac1
%changelog
6a13214
* Tue May 09 2023 Scott K Logan <logans@cottsay.net> - 0.22.2-1
6a13214
- Update to 0.22.2 (rhbz#2180331)
6a13214
cbae7fc
* Fri Jun 24 2022 Scott K Logan <logans@cottsay.net> - 0.22.1-1
cbae7fc
- Update to 0.22.1 (rhbz#2100935)
cbae7fc
6ebe1ba
* Fri Apr 16 2021 Scott K Logan <logans@cottsay.net> - 0.20.1-1
6ebe1ba
- Update to 0.20.1 (rhbz#1950541)
6ebe1ba
f9c034a
* Thu Feb 04 2021 Scott K Logan <logans@cottsay.net> - 0.20.0-1
f9c034a
- Update to 0.20.0 (rhbz#1897764)
f9c034a
04098a1
* Wed Apr 15 2020 Scott K Logan <logans@cottsay.net> - 0.19.0-1
04098a1
- Update to 0.19.0 (rhbz#1774738)
04098a1
508cebb
* Wed Oct 30 2019 Scott K Logan <logans@cottsay.net> - 0.17.1-1
508cebb
- Update to 0.17.1 (rhbz#1763367)
508cebb
- Add a weak pip dependency
508cebb
d1260cd
* Fri Oct 04 2019 Scott K Logan <logans@cottsay.net> - 0.16.1-2
d1260cd
- Add dependency on python-srpm-macros to resolve %%{python3_pkgversion}
d1260cd
- Add weak dependencies for RHEL 8
d1260cd
- Make doc subpackage dependency weaker
d1260cd
80f74d3
* Thu Sep 19 2019 Scott K Logan <logans@cottsay.net> - 0.16.1-1
80f74d3
- Update to 0.16.1
80f74d3
- Drop Python 2 subpackage from f32+ (rhbz#1740997)
80f74d3
a81cd5b
* Sat May 18 2019 Scott K Logan <logans@cottsay.net> - 0.15.2-1
a81cd5b
- Update to 0.15.2 (rhbz#1711473)
a81cd5b
- Handle automatic dependency generation (f30+)
a81cd5b
- Switch to Python 3 sphinx
a81cd5b
dc26b07
* Tue Feb 19 2019 Scott K Logan <logans@cottsay.net> - 0.15.1-1
dc26b07
- Update to 0.15.1
dc26b07
- Add executable links with Python version numbers
dc26b07
- Create a separate 'doc' package
dc26b07
- Co-own man page and sources directories among python2 and python3
dc26b07
- Make python-rpm recommended (will fall back to RPM CLI if not present)
dc26b07
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
cb12106
* Sun Apr 19 2015 Rich Mattes <richmattes@gmail.com> - 0.11.2-2
cb12106
- Make sure scripts in bindir use python2 instead of python3
cb12106
0e89e14
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.11.2-1
0e89e14
- Update to release 0.11.2
0e89e14
- Update to latest github guidelines
0e89e14
- Use license macro for license file
f901563
- Added python3 package
0e89e14
39fae0d
* Tue Dec 30 2014 Rich Mattes <richmattes@gmail.com> - 0.11.0-1
39fae0d
- Update to release 0.11.0
39fae0d
8e6aefc
* Mon Nov 24 2014 Scott K Logan <logans@cottsay.net> - 0.10.33-1
8e6aefc
- Update to release 0.10.33
8e6aefc
86bc1a5
* Sat Oct 18 2014 Scott K Logan <logans@cottsay.net> - 0.10.32-1
86bc1a5
- Update to release 0.10.32
86bc1a5
- Update python macros to packaging spec
86bc1a5
- Remove pythonpip patch, which is not needed for F19+
86bc1a5
e3dd723
* Sat Apr 12 2014 Rich Mattes <richmattes@gmail.com> - 0.10.27-1
e3dd723
- Update to release 0.10.27
e3dd723
- Build html documentation
e3dd723
f2242b6
* Sat Feb 08 2014 Rich Mattes <richmattes@gmail.com> - 0.10.25-1
f2242b6
- Update to release 0.10.25
f2242b6
9b6b2b3
* Mon Aug 19 2013 Rich Mattes <richmattes@gmail.com> - 0.10.21-1
9b6b2b3
- Update to release 0.10.21
9b6b2b3
- Depend on python-catkin_pkg (rhbz#975896)
9b6b2b3
aece001
* Sat Jun 01 2013 Rich Mattes <richmattes@gmail.com> - 0.10.18-1.20130601git91fb6852
aece001
- Update to release 0.10.18
aece001
- Update github source url
aece001
5532251
* Mon Mar 18 2013 Rich Mattes <richmattes@gmail.com> - 0.10.14-1.20130318git76a8fef
5532251
- Update to release 0.10.14
5532251
- Fix installer to look for python-pip instead of pip (rhbz922296)
5532251
- Move rosdep cache to /var/cache instead of /etc
5532251
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