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