%{?!_without_doc:%global with_doc 0%{?_with_doc:1} || !0%{?rhel} || 0%{?rhel} >= 7}
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?fedora} >= 32 || 0%{?rhel} >= 8)}
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7}
%global srcname catkin_pkg
Name: python-%{srcname}
Version: 0.4.14
Release: 1%{?dist}
Summary: Library for retrieving information about catkin packages
License: BSD
URL: https://github.com/ros-infrastructure/%{srcname}
Source0: https://github.com/ros-infrastructure/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
%description
%{summary}
%if 0%{?with_doc}
%package doc
Summary: HTML documentation for %{name}
BuildRequires: python%{python3_pkgversion}-sphinx
%description doc
HTML API documentation for the Python module '%{srcname}'
%endif # with_doc
%if 0%{?with_python2}
%package -n python2-%{srcname}
Summary: %{summary}
BuildRequires: python2-dateutil
BuildRequires: python2-devel
BuildRequires: python2-docutils
BuildRequires: python2-mock
BuildRequires: python2-nose
BuildRequires: python2-pyparsing
BuildRequires: python2-setuptools
%{?python_provide:%python_provide python2-%{srcname}}
%if %{undefined __pythondist_requires}
Requires: python2-dateutil
Requires: python2-docutils
Requires: python2-pyparsing
%endif # __pythondist_requires
%if (0%{?fedora} || 0%{?rhel} >= 8) && (0%{?with_doc})
Suggests: %{name}-doc = %{version}-%{release}
%endif # (fedora || rhel >= 8) && with_doc
%description -n python2-%{srcname}
%{summary}
%endif # with_python2
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-%{srcname}
Summary: %{summary}
BuildRequires: python%{python3_pkgversion}-dateutil
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-docutils
BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-pyparsing
BuildRequires: python%{python3_pkgversion}-setuptools
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%if %{undefined __pythondist_requires}
Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-docutils
Requires: python%{python3_pkgversion}-pyparsing
%endif # __pythondist_requires
%if (0%{?fedora} || 0%{?rhel} >= 8) && (0%{?with_doc})
Suggests: %{name}-doc = %{version}-%{release}
%endif # (fedora || rhel >= 8) && with_doc
%description -n python%{python3_pkgversion}-%{srcname}
%{summary}
%endif # with_python3
%prep
%autosetup -p1 -n %{srcname}-%{version}
%build
%if 0%{?with_python2}
%py2_build
%endif # with_python2
%if 0%{?with_python3}
%py3_build
%endif # with_python3
%if 0%{?with_doc}
PYTHONPATH=$PWD/build/lib \
PYTHONDONTWRITEBYTECODE=1 \
%make_build -C doc html SPHINXBUILD=sphinx-build-%{python3_version} SPHINXAPIDOC=sphinx-apidoc-%{python3_version}
rm doc/_build/html/.buildinfo
%endif # with_doc
%install
%if 0%{?with_python2}
%py2_install
%endif # with_python2
%if 0%{?with_python3}
%py3_install -- --install-scripts %{_bindir}/python%{python3_pkgversion}
pushd %{buildroot}%{_bindir}/python%{python3_pkgversion}
for i in *; do mv $i ../python%{python3_pkgversion}-$i; done
popd
rmdir %{buildroot}%{_bindir}/python%{python3_pkgversion}
%endif # with_python3
%check
%if 0%{?with_python2}
%if "%{python2_version}" == "2.6"
# Skip tests that use python 2.7 assertions
PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w test \
-e "(test_check_known_attributes|test_create_package_template|test_flake8|test_package_decorator_init|test_topological_order_packages_with_duplicates|test_validate_metapackage|test_validate_package)"
%else # python-2.6
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m nose -w test -e "(test_flake8)"
%endif # python-2.6
%endif # with_python2
%if 0%{?with_python3}
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m nose -w test -e "(test_flake8)"
%endif # with_python3
%if 0%{?with_doc}
%files doc
%license LICENSE
%doc doc/_build/html
%endif # with_doc
%if 0%{?with_python2}
%files -n python2-%{srcname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info/
%{_bindir}/catkin_create_pkg
%{_bindir}/catkin_find_pkg
%{_bindir}/catkin_generate_changelog
%{_bindir}/catkin_package_version
%{_bindir}/catkin_prepare_release
%{_bindir}/catkin_tag_changelog
%{_bindir}/catkin_test_changelog
%endif # with_python2
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
%{_bindir}/python%{python3_pkgversion}-catkin_create_pkg
%{_bindir}/python%{python3_pkgversion}-catkin_find_pkg
%{_bindir}/python%{python3_pkgversion}-catkin_generate_changelog
%{_bindir}/python%{python3_pkgversion}-catkin_package_version
%{_bindir}/python%{python3_pkgversion}-catkin_prepare_release
%{_bindir}/python%{python3_pkgversion}-catkin_tag_changelog
%{_bindir}/python%{python3_pkgversion}-catkin_test_changelog
%endif # with_python3
%changelog
* Wed Oct 30 2019 Scott K Logan <logans@cottsay.net> - 0.4.14-1
- Update to 0.4.14 (rhbz#1762232)
* Fri Jul 26 2019 Scott K Logan <logans@cottsay.net> - 0.4.13-1
- Update to 0.4.13
* Wed Jul 17 2019 Scott K Logan <logans@cottsay.net> - 0.4.12-1
- Update to 0.4.12 (rhbz#1702118)
* Mon Mar 25 2019 Scott K Logan <logans@cottsay.net> - 0.4.11-1
- Update to 0.4.11
- Switch to Python 3 Sphinx
- Handle automatic dependency generation (f30+)
- Make doc subpackage a weaker dependency
* Sat Jan 12 2019 Scott K Logan <logans@cottsay.net> - 0.4.10-2
- Add patch for argparse on Python 2.7
* Fri Jan 11 2019 Scott K Logan <logans@cottsay.net> - 0.4.10-1
- Update to 0.4.10
- Modernize spec
- Separate doc package
* Thu Sep 13 2018 Scott K Logan <logans@cottsay.net> - 0.4.8-1
- Update to 0.4.8 (rhbz#1597686)
- Add runtime requirement for pyparsing (rhbz#1628751)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.5-2
- Rebuilt for Python 3.7
* Fri Jun 29 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.5-1
- Update to 0.4.5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.3-3
- Rebuilt for Python 3.7
* Sat Jun 09 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.3-2
- Fix build
- Add new bin scripts.
* Sat Jun 09 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.3-1
- Update to new upstream version
* Sat May 19 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.2-1
- Update to latest upstream release
- Tests fail. Disabling
* Sun Mar 04 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-2
- Add BR to fix tests
* Sun Mar 04 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-1
- Update to latest upstream release
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.9-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Dec 17 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.9-2
- Remove patch, use sed instead to make it version independent
* Sun Dec 17 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.9-1
- Update to latest releas 0.3.9 (rhbz#1508241)
* Sat Dec 02 2017 Till Hofmann <thofmann@fedoraproject.org> - 0.3.8-2
- Add patch to remove argparse from the requirements
* Wed Oct 25 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.8-1
- Update to new release 0.3.8 (rhbz#1455183)
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sun Apr 09 2017 Rich Mattes <richmattes@gmail.com> - 0.3.1-1
- Update to release 0.3.1 (rhbz#1422069)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.10-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.2.10-6
- Rebuild for Python 3.6
* Tue Sep 27 2016 Rich Mattes <richmattes@gmail.com> - 0.2.10-5
- Remove argparse requirement
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 0.2.10-1
- Update to release 0.2.10 (rhbz#1250758)
- Remove upstreamed patches
- Fix spec file layout so spectool can parse it
* Tue Jun 30 2015 Scott K Logan <logans@cottsay.net> - 0.2.9-1
- Update to 0.2.9
- Switch to Github upstream to get docs
- Update to latest packaging guidelines
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Mar 12 2015 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.2.7-1
- Update to 0.2.7
* Sat Oct 25 2014 Scott K Logan <logans@cottsay.net> - 0.2.6-1
- Update to 0.2.6
* Sat Oct 18 2014 Scott K Logan <logans@cottsay.net> - 0.2.5-1
- Update to 0.2.5
- Add python3 package
- Exclude tests which are not compatible with python 2.6
* Thu Jul 31 2014 Scott K Logan <logans@cottsay.net> - 0.2.4-1
- Update to 0.2.4
- Remove README.rst (not present in Pypi sources)
* Wed Jul 16 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.2.3-1
- Update to latest upstream release
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat May 10 2014 Scott K Logan <logans@cottsay.net> - 0.2.2-1
- Update to 0.2.2
* Thu Feb 06 2014 Scott K Logan <logans@cottsay.net> - 0.1.28-1
- Update to 0.1.28
* Thu Feb 06 2014 Scott K Logan <logans@cottsay.net> - 0.1.25-1
- Update to 0.1.25
- Added check section
- Added python-dateutil Requires/BuildRequires
- Added python-docutils Requires/BuildRequires
- Added python-nose BuildRequires
- Added python-mock BuildRequires
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 17 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.1.18-1
- Update to 1.18
- https://bugzilla.redhat.com/show_bug.cgi?id=926034
* Sat Mar 16 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.1.10-1
- Initial rpm build