Blob Blame Raw
%global module_name catkin_pkg
%global with_python3 1
Name:           python-%{module_name}
Version:        0.4.8
Release:        1%{?dist}
Summary:        Library for retrieving information about catkin packages
License:        BSD
URL:            https://github.com/ros-infrastructure/%{module_name}
BuildArch:      noarch
Source0:        https://github.com/ros-infrastructure/%{module_name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  python2-devel
BuildRequires:  python2-dateutil
BuildRequires:  python2-docutils
BuildRequires:  python2-mock
BuildRequires:  python2-nose
BuildRequires:  python2-setuptools
BuildRequires:  python2-pyparsing
BuildRequires:  python2-flake8
%if !0%{?rhel} || 0%{?rhel} > 6
BuildRequires:  python2-sphinx
%endif
%description
Library for retrieving information about catkin packages
%package -n python2-%{module_name}
Summary:        Library for retrieving information about catkin packages
%{?python_provide:%python_provide python2-%{module_name}}
Requires:       python2-dateutil
Requires:       python2-docutils
Requires:       python2-pyparsing
%description -n python2-%{module_name}
Library for retrieving information about catkin packages
%if 0%{?with_python3}
%package -n python3-%{module_name}
Summary:        Library for retrieving information about catkin packages
Requires:       python3-dateutil
Requires:       python3-docutils
Requires:       python3-pyparsing
BuildRequires:  python3-dateutil
BuildRequires:  python3-devel
BuildRequires:  python3-docutils
BuildRequires:  python3-mock
BuildRequires:  python3-nose
BuildRequires:  python3-setuptools
BuildRequires:  python3-sphinx
BuildRequires:  python3-pyparsing
BuildRequires:  python3-flake8
%description -n python3-%{module_name}
Library for retrieving information about catkin packages
%endif
%prep
%setup -qc
mv %{module_name}-%{version} python2
%if 0%{?with_python3}
cp -a python2 python3
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif
find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
sed -i "s/  'catkin_/  'python3-catkin_/g" python3/setup.py
# remove argparse requirement
sed -i '/argparse/ d' python2/setup.py
sed -i '/argparse/ d' python3/setup.py
%build
pushd python2
%{__python2} setup.py build
%if !0%{?rhel} || 0%{?rhel} > 6
PYTHONPATH=%{_builddir}/%{name}-%{version}/python2/build/lib make %{?_smp_mflags} -C doc html
rm -f doc/_build/html/.buildinfo
%endif
popd
%if 0%{?with_python3}
pushd python3
%{__python3} setup.py build
PYTHONPATH=%{_builddir}/%{name}-%{version}/python3/build/lib make %{?_smp_mflags} -C doc html SPHINXAPIDOC=sphinx-apidoc-%{python3_version} SPHINXBUILD=sphinx-build-%{python3_version}
rm -f doc/_build/html/.buildinfo
pushd bin
for f in *; do mv $f python3-$f; done
popd
popd
%endif
%install
pushd python2
%{__python2} setup.py install --skip-build --root %{buildroot}
popd
%if 0%{?with_python3}
pushd python3
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif
# %check
# pushd python2
# %if "%{python2_version}" == "2.6"
# Skip tests that use python 2.7 assertions
# PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w test -e "(test_topological_order_packages_with_duplicates|test_validate_metapackage|test_package_decorator_init|test_create_package_template)"
# %else
# PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests-%{python2_version} -w test
# %endif
# popd
# %if 0%{?with_python3}
# pushd python3
# PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} -w test
# popd
# %endif
%files -n python2-%{module_name}
%if !0%{?rhel} || 0%{?rhel} > 6
%doc python2/doc/_build/html python2/README.rst
%license python2/LICENSE
%else
%doc python2/LICENSE python2/README.rst
%endif
%{_bindir}/catkin_create_pkg
%{_bindir}/catkin_find_pkg
%{_bindir}/catkin_generate_changelog
%{_bindir}/catkin_tag_changelog
%{_bindir}/catkin_test_changelog
%{_bindir}/catkin_package_version
%{_bindir}/catkin_prepare_release
%{python2_sitelib}/%{module_name}/
%{python2_sitelib}/%{module_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{module_name}
%doc python3/doc/_build/html python3/README.rst
%license python3/LICENSE
%{_bindir}/python3-catkin_create_pkg
%{_bindir}/python3-catkin_find_pkg
%{_bindir}/python3-catkin_generate_changelog
%{_bindir}/python3-catkin_tag_changelog
%{_bindir}/python3-catkin_test_changelog
%{_bindir}/python3-catkin_package_version
%{_bindir}/python3-catkin_prepare_release
%{python3_sitelib}/%{module_name}/
%{python3_sitelib}/%{module_name}-%{version}-py?.?.egg-info
%endif
%changelog
* 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