55cadd4
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8)}
55cadd4
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7}
a815645
2a7b6fb
%global srcname rospkg
f680e80
2a7b6fb
Name:           python-%{srcname}
789787a
Version:        1.1.9
9aaad98
Release:        2%{?dist}
f680e80
Summary:        Utilities for ROS package, stack, and distribution information
f680e80
f680e80
License:        BSD
f680e80
URL:            http://ros.org/wiki/rospkg
8b4c782
Source0:        https://github.com/ros-infrastructure/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
cef9eae
55cadd4
BuildArch:      noarch
f680e80
4f1ca62
%description
4f1ca62
The ROS packaging system simplifies development and distribution of code
4f1ca62
libraries. It enables you to easily specify dependencies between code
4f1ca62
libraries, easily interact with those libraries from the command-line, and
4f1ca62
release your code for others to use.
4f1ca62
2a7b6fb
55cadd4
%package doc
55cadd4
Summary:        Documentation for %{name}
55cadd4
BuildRequires:  python%{python3_pkgversion}-catkin-sphinx
55cadd4
BuildRequires:  python%{python3_pkgversion}-sphinx
55cadd4
BuildRequires:  python%{python3_pkgversion}-nose
55cadd4
55cadd4
%description doc
55cadd4
HTML documentation for the '%{srcname}' Python module.
55cadd4
55cadd4
55cadd4
%if 0%{?with_python2}
2a7b6fb
%package -n python2-%{srcname}
55cadd4
Summary:        %{summary}
55cadd4
BuildRequires:  /usr/bin/python
55cadd4
BuildRequires:  python2-catkin_pkg
55cadd4
BuildRequires:  python2-devel
55cadd4
BuildRequires:  python2-mock
55cadd4
BuildRequires:  python2-nose
55cadd4
BuildRequires:  python2-pyyaml
55cadd4
BuildRequires:  python2-setuptools
2a7b6fb
%{?python_provide:%python_provide python2-%{srcname}}
55cadd4
789787a
%if %{undefined __pythondist_requires}
8b4c782
Requires:       python2-catkin_pkg
69e21a3
Requires:       python2-pyyaml
789787a
%endif # __pythondist_requires
55cadd4
55cadd4
%if 0%{?fedora} || 0%{?rhel} >= 8
55cadd4
Suggests:       %{name}-doc = %{version}-%{release}
55cadd4
%endif # fedora || rhel >= 8
2a7b6fb
2a7b6fb
%description -n python2-%{srcname}
2a7b6fb
The ROS packaging system simplifies development and distribution of code
2a7b6fb
libraries. It enables you to easily specify dependencies between code
2a7b6fb
libraries, easily interact with those libraries from the command-line, and
2a7b6fb
release your code for others to use.
55cadd4
%endif # with_python2
2a7b6fb
b71cdf1
55cadd4
%if 0%{?with_python3}
55cadd4
%package -n python%{python3_pkgversion}-%{srcname}
55cadd4
Summary:        %{summary}
55cadd4
BuildRequires:  /usr/bin/python
55cadd4
BuildRequires:  python%{python3_pkgversion}-catkin_pkg
55cadd4
BuildRequires:  python%{python3_pkgversion}-devel
55cadd4
BuildRequires:  python%{python3_pkgversion}-mock
55cadd4
BuildRequires:  python%{python3_pkgversion}-nose
55cadd4
BuildRequires:  python%{python3_pkgversion}-PyYAML
55cadd4
BuildRequires:  python%{python3_pkgversion}-setuptools
55cadd4
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
55cadd4
789787a
%if %{undefined __pythondist_requires}
55cadd4
Requires:       python%{python3_pkgversion}-catkin_pkg
55cadd4
Requires:       python%{python3_pkgversion}-PyYAML
789787a
%endif # __pythondist_requires
55cadd4
55cadd4
%if 0%{?fedora} || 0%{?rhel} >= 8
55cadd4
Suggests:       %{name}-doc = %{version}-%{release}
55cadd4
%endif # fedora || rhel >= 8
55cadd4
55cadd4
%description -n python%{python3_pkgversion}-%{srcname}
b71cdf1
The ROS packaging system simplifies development and distribution of code
b71cdf1
libraries. It enables you to easily specify dependencies between code
b71cdf1
libraries, easily interact with those libraries from the command-line, and
f680e80
release your code for others to use.
55cadd4
%endif # with_python3
2a7b6fb
f680e80
f680e80
%prep
55cadd4
%autosetup -p1 -n %{srcname}-%{version}
b71cdf1
f680e80
f680e80
%build
55cadd4
%if 0%{?with_python2}
55cadd4
%py2_build
55cadd4
%endif # with_python2
cef9eae
b71cdf1
%if 0%{?with_python3}
55cadd4
%py3_build
55cadd4
%endif # with_python3
b71cdf1
55cadd4
%make_build -C doc html man SPHINXBUILD=sphinx-build-%{python3_version}
55cadd4
rm doc/_build/html/.buildinfo
f680e80
b71cdf1
f680e80
%install
55cadd4
%if 0%{?with_python2}
55cadd4
%py2_install
55cadd4
install -p -m0644 -D doc/man/rosversion.1 %{buildroot}%{_mandir}/man1/rosversion.1
55cadd4
%endif # with_python2
f680e80
b71cdf1
%if 0%{?with_python3}
55cadd4
%py3_install -- --install-scripts %{_bindir}/python3
8b4c782
pushd %{buildroot}%{_bindir}/python3
8b4c782
for i in *; do mv $i ../python3-$i; done
8b4c782
popd
8b4c782
rmdir %{buildroot}%{_bindir}/python3
55cadd4
install -p -m0644 -D doc/man/rosversion.1 %{buildroot}%{_mandir}/man1/python3-rosversion.1
55cadd4
%endif # with_python3
b71cdf1
55cadd4
install -p -m0644 -D manifest.xml %{buildroot}%{_datadir}/%{srcname}/manifest.xml
55cadd4
55cadd4
55cadd4
%check
55cadd4
%if 0%{?rhel}
55cadd4
export LANG=en_US.UTF-8
55cadd4
%endif # rhel
55cadd4
55cadd4
%if 0%{?with_python2}
55cadd4
PYTHONPATH=%{buildroot}%{python2_sitelib} \
55cadd4
%if 0%{?fedora}
55cadd4
    LANG=C.UTF-8 \
55cadd4
%endif # fedora
55cadd4
    nosetests-%{python2_version} test
55cadd4
%endif # with_python2
55cadd4
55cadd4
%if 0%{?with_python3}
55cadd4
PYTHONPATH=%{buildroot}%{python3_sitelib} \
55cadd4
    nosetests-%{python3_version} test
55cadd4
%endif # with_python3
55cadd4
55cadd4
55cadd4
%files doc
cef9eae
%doc doc/_build/html
55cadd4
55cadd4
%if 0%{?with_python2}
55cadd4
%files -n python2-%{srcname}
55cadd4
%doc README.md
55cadd4
%{python2_sitelib}/%{srcname}/
55cadd4
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/
b71cdf1
%{_bindir}/rosversion
2a7b6fb
%{_datadir}/%{srcname}
55cadd4
%{_mandir}/man1/rosversion.1.*
55cadd4
%endif # with_python2
f680e80
b71cdf1
%if 0%{?with_python3}
55cadd4
%files -n python%{python3_pkgversion}-%{srcname}
55cadd4
%doc README.md
55cadd4
%{python3_sitelib}/%{srcname}/
55cadd4
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
b71cdf1
%{_bindir}/python3-rosversion
55cadd4
%{_datadir}/%{srcname}
55cadd4
%{_mandir}/man1/python3-rosversion.1.*
55cadd4
%endif # with_python3
55cadd4
b71cdf1
f680e80
%changelog
9aaad98
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-2
9aaad98
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9aaad98
789787a
* Wed Jul 17 2019 Scott K Logan <logans@cottsay.net> - 1.1.9-1
789787a
- Update to 1.1.9 (rhbz#1700773)
789787a
55cadd4
* Fri Apr 12 2019 Scott K Logan <logans@cottsay.net> - 1.1.8-1
55cadd4
- Update to 1.1.8 (rhbz#1699085)
55cadd4
- Switch to Python 3 Sphinx
55cadd4
- Create a separate 'doc' package
55cadd4
- Handle automatic dependency generation (f30+)
55cadd4
7ab8d29
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.7-3
7ab8d29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7ab8d29
31db579
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.7-2
31db579
- Drop explicit locale setting for python3, use C.UTF-8 for python2
31db579
  See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
31db579
8b4c782
* Thu Sep 13 2018 Scott K Logan <logans@cottsay.net> - 1.1.7-1
8b4c782
- Update to 1.1.7 (rhbz#1441445)
8b4c782
9fd385d
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-6
9fd385d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9fd385d
8e09b56
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-5
8e09b56
- Rebuilt for Python 3.7
8e09b56
69e21a3
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.0-4
69e21a3
- Update Python 2 dependency declarations to new packaging standards
69e21a3
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
69e21a3
923cce3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
923cce3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
923cce3
c4c316b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
c4c316b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c4c316b
7e85a74
* Sun Apr 09 2017 Rich Mattes <richmattes@gmail.com> - 1.1.0-1
7e85a74
- Update to release 1.1.0 (rhbz#1425997)
7e85a74
882844f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.41-2
882844f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
882844f
b0c08ea
* Wed Dec 21 2016 Rich Mattes <richmattes@gmail.com> - 1.0.41-1
b0c08ea
- Update to release 1.0.41 (rhbz#1329031)
b0c08ea
ebbd2bb
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.40-2
ebbd2bb
- Rebuild for Python 3.6
ebbd2bb
2a7b6fb
* Mon Sep 26 2016 Rich Mattes <richmattes@gmail.com> - 1.0.40-1
2a7b6fb
- Update to release 1.0.40 (rhbz#1329031)
2a7b6fb
- Remove dependencies on python-argparse
2a7b6fb
735fa57
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.38-5
735fa57
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
735fa57
fc17d0a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.38-4
fc17d0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
fc17d0a
dcee10f
* Thu Dec 10 2015 Rich Mattes <richmattes@gmail.com> - 1.0.38-3
dcee10f
- Add additional architectures to uname test (rhbz#1290136)
dcee10f
56566e7
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.38-2
56566e7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
56566e7
1f0eed0
* Tue Oct 20 2015 Rich Mattes <richmattes@gmail.com> - 1.0.38-1
1f0eed0
- Update to release 1.0.38 (rhbz#1270086)
1f0eed0
4f1ca62
* Sun Oct 18 2015 Rich Mattes <richmattes@gmail.com> - 1.0.37-1
4f1ca62
- Update to release 1.0.37 (rhbz#1270086)
4f1ca62
864d330
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.35-2
864d330
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
864d330
77744b6
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 1.0.35-1
77744b6
- Update to release 1.0.35
77744b6
- Remove Fedora 12 spec conditionals
77744b6
94e727d
* Tue Dec 30 2014 Rich Mattes <richmattes@gmail.com> - 1.0.33-1
94e727d
- Update to release 1.0.33
94e727d
- Remove upstreamed patch
94e727d
b71cdf1
* Sat Oct 25 2014 Scott K Logan <logans@cottsay.net> - 1.0.31-1
b71cdf1
- Update to release 1.0.31
b71cdf1
- Fix test failure on PPC
b71cdf1
- Remove argparse patch (fixed upstream)
b71cdf1
- Fix sphinx and nose dependencies in el6
b71cdf1
- Add python3 package
b71cdf1
d9dbb39
* Tue Jul 15 2014 Scott K Logan <logans@cottsay.net> - 1.0.29-1
d9dbb39
- Update to release 1.0.29
d9dbb39
- Fix test failure on ARM
d9dbb39
9528764
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.28-2
9528764
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9528764
cef9eae
* Wed Apr 16 2014 Rich Mattes <richmattes@gmail.com> - 1.0.28-1
cef9eae
- Update to release 1.0.28
cef9eae
- Remove argparse from python dependency list (rhbz#1088448)
cef9eae
- Add requirement on python-argparse
cef9eae
- Add check section
cef9eae
- Add html documentation
cef9eae
67a35fc
* Fri Apr 04 2014 Scott K Logan <logans@cottsay.net> - 1.0.27-1
67a35fc
- Update to release 1.0.27
67a35fc
- Added PyYAML BuildRequires and Requires
67a35fc
67b57a0
* Sat Feb 08 2014 Rich Mattes <richmattes@gmail.com> - 1.0.26-1
67b57a0
- Update to release 1.0.26
67b57a0
5dc58d4
* Mon Aug 19 2013 Rich Mattes <richmattes@gmail.com> - 1.0.21-1
5dc58d4
- Update to release 1.0.21
5dc58d4
- Update to github sourceurl guidelines
5dc58d4
89ecb5e
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.20-2.20130318git0a4448e
89ecb5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
89ecb5e
78ed549
* Mon Mar 18 2013 Rich Mattes <richmattes@gmail.com> - 1.0.20-1.20130318git0a4448e
78ed549
- Update to release 1.0.20
78ed549
9299bc7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-2
9299bc7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9299bc7
ea48979
* Wed Jan 02 2013 Rich Mattes <richmattes@gmail.com> - 1.0.18-1
ea48979
- Update to version 1.0.18
ea48979
8f93f39
* Fri Oct 26 2012 Rich Mattes <richmattes@gmail.com> - 1.0.10-1
8f93f39
- Update to version 1.0.10
8f93f39
f680e80
* Sat Sep 22 2012 Rich Mattes <richmattes@gmail.com> - 1.0.6-2
f680e80
- Moved build to build section
f680e80
- Finer-grained filenames in files section
f680e80
f680e80
* Sat Jun 16 2012 Rich Mattes <richmattes@gmail.com> - 1.0.6-1
f680e80
- Update to version 1.0.6
f680e80
f680e80
* Sat Jun 02 2012 Rich Mattes <richmattes@gmail.com> - 1.0.3-1
f680e80
- Update to version 1.0.3
f680e80
f680e80
* Wed Apr 25 2012 Rich Mattes <richmattes@gmail.com> - 1.0.2-1
f680e80
- Initial package