b994159
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?fedora} >= 32 || 0%{?rhel} >= 8)}
be354eb
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7}
be354eb
be354eb
%global srcname rosdistro
be354eb
be354eb
Name:           python-%{srcname}
924d309
Version:        0.8.2
45b09d9
Release:        1%{?dist}
fa5f4e5
Summary:        File format for managing ROS Distributions
fa5f4e5
fa5f4e5
License:        BSD and MIT
fa5f4e5
URL:            http://www.ros.org/wiki/rosdistro
be354eb
Source0:        https://github.com/ros-infrastructure/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
fa5f4e5
fa5f4e5
BuildArch:      noarch
45b09d9
be354eb
%description
be354eb
The rosdistro tool allows you to get access to the full dependency tree and
be354eb
the version control system information of all packages and repositories. To
be354eb
increase performance, the rosdistro tool will automatically look for a cache
be354eb
file on your local disk. If no cache file is found locally, it will try to
be354eb
download the latest cache file from the server. The cache files are only used
be354eb
to improve performance, and are not needed to get correct results. rosdistro
be354eb
will automatically go to Github to find any dependencies that are not part
be354eb
of the cache file. Note that operation without a cache file can be very slow,
be354eb
depending on your own internet connection and the response times of Github.
be354eb
The rosdistro tool will always write the latest dependency information to a
be354eb
local cache file, to speed up performance for the next query.
be354eb
be354eb
be354eb
%package doc
be354eb
Summary:        HTML documentation for '%{name}'
be354eb
BuildRequires:  python%{python3_pkgversion}-catkin-sphinx
be354eb
BuildRequires:  python%{python3_pkgversion}-sphinx
be354eb
be354eb
%description doc
be354eb
HTML documentation for the '%{srcname}' python module
be354eb
be354eb
be354eb
%if 0%{?with_python2}
be354eb
%package -n python2-%{srcname}
be354eb
Summary:        %{summary}
45b09d9
BuildRequires:  git
fa5f4e5
BuildRequires:  python2-devel
be354eb
BuildRequires:  python2-catkin_pkg
be354eb
BuildRequires:  python2-nose
be354eb
BuildRequires:  python2-pyyaml
be354eb
BuildRequires:  python2-rospkg
be354eb
BuildRequires:  python2-setuptools
be354eb
%{?python_provide:%python_provide python2-%{srcname}}
be354eb
c03169b
%if %{undefined __pythondist_requires}
be354eb
Requires:       python2-catkin_pkg
be354eb
Requires:       python2-pyyaml
be354eb
Requires:       python2-rospkg
be354eb
Requires:       python2-setuptools
906ab4f
%endif
be354eb
906ab4f
%if !0%{?rhel} || 0%{?rhel} >= 8
be354eb
Suggests:       %{name}-doc = %{version}-%{release}
906ab4f
%endif
be354eb
be354eb
%description -n python2-%{srcname}
be354eb
The rosdistro tool allows you to get access to the full dependency tree and
be354eb
the version control system information of all packages and repositories. To
be354eb
increase performance, the rosdistro tool will automatically look for a cache
be354eb
file on your local disk. If no cache file is found locally, it will try to
be354eb
download the latest cache file from the server. The cache files are only used
be354eb
to improve performance, and are not needed to get correct results. rosdistro
be354eb
will automatically go to Github to find any dependencies that are not part
be354eb
of the cache file. Note that operation without a cache file can be very slow,
be354eb
depending on your own internet connection and the response times of Github.
be354eb
The rosdistro tool will always write the latest dependency information to a
be354eb
local cache file, to speed up performance for the next query.
906ab4f
%endif
45b09d9
7413d4e
45b09d9
%if 0%{?with_python3}
be354eb
%package -n python%{python3_pkgversion}-%{srcname}
be354eb
Summary:        %{summary}
be354eb
BuildRequires:  git
be354eb
BuildRequires:  python%{python3_pkgversion}-catkin_pkg
be354eb
BuildRequires:  python%{python3_pkgversion}-devel
be354eb
BuildRequires:  python%{python3_pkgversion}-nose
be354eb
BuildRequires:  python%{python3_pkgversion}-PyYAML
be354eb
BuildRequires:  python%{python3_pkgversion}-rospkg
be354eb
BuildRequires:  python%{python3_pkgversion}-setuptools
be354eb
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
be354eb
c03169b
%if %{undefined __pythondist_requires}
be354eb
Requires:       python%{python3_pkgversion}-catkin_pkg
be354eb
Requires:       python%{python3_pkgversion}-PyYAML
be354eb
Requires:       python%{python3_pkgversion}-rospkg
be354eb
Requires:       python%{python3_pkgversion}-setuptools
906ab4f
%endif
be354eb
906ab4f
%if !0%{?rhel} || 0%{?rhel} >= 8
be354eb
Suggests:       %{name}-doc = %{version}-%{release}
906ab4f
%endif
be354eb
be354eb
%description -n python%{python3_pkgversion}-%{srcname}
45b09d9
The rosdistro tool allows you to get access to the full dependency tree and
45b09d9
the version control system information of all packages and repositories. To
45b09d9
increase performance, the rosdistro tool will automatically look for a cache
45b09d9
file on your local disk. If no cache file is found locally, it will try to
45b09d9
download the latest cache file from the server. The cache files are only used
45b09d9
to improve performance, and are not needed to get correct results. rosdistro
45b09d9
will automatically go to Github to find any dependencies that are not part
45b09d9
of the cache file. Note that operation without a cache file can be very slow,
45b09d9
depending on your own internet connection and the response times of Github.
45b09d9
The rosdistro tool will always write the latest dependency information to a
45b09d9
local cache file, to speed up performance for the next query.
906ab4f
%endif
45b09d9
fa5f4e5
be354eb
%prep
be354eb
%autosetup -p1 -n %{srcname}-%{version}
45b09d9
45b09d9
fa5f4e5
%build
be354eb
%if 0%{?with_python2}
be354eb
%py2_build
906ab4f
%endif
45b09d9
45b09d9
%if 0%{?with_python3}
be354eb
%py3_build
45b09d9
pushd build/scripts-%{python3_version}
be354eb
for f in *; do mv $f python%{python3_pkgversion}-$f; done
fa5f4e5
popd
906ab4f
%endif
be354eb
be354eb
PYTHONPATH=$PWD/src \
be354eb
  %make_build -C doc html SPHINXBUILD=sphinx-build-%{python3_version} SPHINXAPIDOC=sphinx-apidoc-%{python3_version}
be354eb
rm doc/_build/html/.buildinfo
be354eb
fa5f4e5
fa5f4e5
%install
be354eb
%if 0%{?with_python2}
be354eb
%py2_install
906ab4f
%endif
45b09d9
45b09d9
%if 0%{?with_python3}
be354eb
%py3_install
906ab4f
%endif
be354eb
fa5f4e5
45b09d9
%check
be354eb
%if 0%{?with_python2}
be354eb
PYTHONPATH=%{buildroot}%{python2_sitelib} \
be354eb
  %{__python2} -m nose \
be354eb
  -e test_get_index_from_http_with_query_parameters \
be354eb
  -e test_manifest_providers* \
be354eb
  test
906ab4f
%endif
45b09d9
45b09d9
%if 0%{?with_python3}
be354eb
PYTHONPATH=%{buildroot}%{python3_sitelib} \
be354eb
  %{__python3} -m nose \
be354eb
  -e test_get_index_from_http_with_query_parameters \
be354eb
  -e test_manifest_providers* \
be354eb
  test
906ab4f
%endif
be354eb
be354eb
be354eb
%files doc
be354eb
%license LICENSE.txt
be354eb
%doc doc/_build/html
be354eb
be354eb
%if 0%{?with_python2}
be354eb
%files -n python2-%{srcname}
be354eb
%license LICENSE.txt
be354eb
%doc README.md
be354eb
%{python2_sitelib}/%{srcname}/
be354eb
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/
fa5f4e5
%{_bindir}/rosdistro_build_cache
be354eb
%{_bindir}/rosdistro_freeze_source
db0e778
%{_bindir}/rosdistro_migrate_to_rep_141
950906b
%{_bindir}/rosdistro_migrate_to_rep_143
be354eb
%{_bindir}/rosdistro_reformat
906ab4f
%endif
45b09d9
45b09d9
%if 0%{?with_python3}
be354eb
%files -n python%{python3_pkgversion}-%{srcname}
be354eb
%license LICENSE.txt
be354eb
%doc README.md
be354eb
%{python3_sitelib}/%{srcname}/
be354eb
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
be354eb
%{_bindir}/python%{python3_pkgversion}-rosdistro_build_cache
be354eb
%{_bindir}/python%{python3_pkgversion}-rosdistro_freeze_source
be354eb
%{_bindir}/python%{python3_pkgversion}-rosdistro_migrate_to_rep_141
be354eb
%{_bindir}/python%{python3_pkgversion}-rosdistro_migrate_to_rep_143
be354eb
%{_bindir}/python%{python3_pkgversion}-rosdistro_reformat
906ab4f
%endif
be354eb
fa5f4e5
fa5f4e5
%changelog
924d309
* Fri May 29 2020 Scott K Logan <logans@cottsay.net> - 0.8.2-1
924d309
- Update to 0.8.2 (rhbz#1838293)
924d309
34baa4b
* Sat May 09 2020 Scott K Logan <logans@cottsay.net> - 0.8.1-1
34baa4b
- Update to 0.8.1 (rhbz#1824379)
34baa4b
906ab4f
* Wed Apr 15 2020 Scott K Logan <logans@cottsay.net> - 0.8.0-1
906ab4f
- Update to 0.8.0 (rhbz#1782354)
906ab4f
b994159
* Fri Oct 11 2019 Scott K Logan <logans@cottsay.net> - 0.7.5-1
b994159
- Update to 0.7.5 (rhbz#1761003)
b994159
c03169b
* Wed Jul 17 2019 Scott K Logan <logans@cottsay.net> - 0.7.4-1
c03169b
- Update to 0.7.4 (rhbz#1702421)
c03169b
be354eb
* Wed Mar 27 2019 Scott K Logan <logans@cottsay.net> - 0.7.3-1
be354eb
- Update to 0.7.3 (rhbz#1693483)
be354eb
- Switch to Python 3 Sphinx
be354eb
- Handle automatic dependency generation (f30+)
be354eb
- Make doc subpackage a weaker dependency
be354eb
7413d4e
* Wed May 27 2015 Rich Mattes <richmattes@gmail.com> - 0.4.2-1
7413d4e
- Update to release 0.4.2 (#1207455)
7413d4e
fd6f32b
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.4.1-1
fd6f32b
- Update to release 0.4.1
fd6f32b
950906b
* Mon Dec 15 2014 Scott K Logan <logans@cottsay.net> - 0.4.0-1
950906b
- Update to release 0.4.0
950906b
45b09d9
* Sat Oct 25 2014 Scott K Logan <logans@cottsay.net> - 0.3.7-1
45b09d9
- Update to release 0.3.7
45b09d9
- Remove argparse patch (fixed upstream)
45b09d9
- Fix sphinx dependency in el6
45b09d9
- Add check section
45b09d9
- Add python3 package
45b09d9
eb02d04
* Tue Apr 08 2014 Rich Mattes <richmattes@gmail.com> - 0.3.4-2
eb02d04
- Depend on setuptools instead of distribute
eb02d04
db0e778
* Sat Feb 08 2014 Rich Mattes <richmattes@gmail.com> - 0.3.4-1
db0e778
- Update to release 0.3.4
db0e778
b5502ce
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-3.20130602git6e83551
b5502ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b5502ce
fa5f4e5
* Fri Jun 07 2013 Rich Mattes <richmattes@gmail.com> - 0.2.8-2.20130602git6e83551
fa5f4e5
- Update BuildRequires to python2-devel
fa5f4e5
- Remove cleanup of buildroot in install
fa5f4e5
fa5f4e5
* Sun Jun 02 2013 Rich Mattes <richmattes@gmail.com> - 0.2.8-1.20130602git6e83551
fa5f4e5
- Initial package