Blob Blame History Raw
%global source_name catkin_lint

Name:           python-%{source_name}
Version:        1.4.20
Release:        1%{?dist}
Summary:        Check catkin packages for common errors

License:        BSD
URL:            https://pypi.python.org/pypi/%{source_name}
Source0:        https://github.com/fkie/%{source_name}/archive/%{version}/%{source_name}-%{version}.tar.gz


BuildArch:      noarch


%description
catkin_lint checks package configurations for the catkin build system of ROS.
It is part of an ongoing effort to aid developers with their ROS packaging (see
also: issue #153).


%package -n python2-%{source_name}
Summary:        Check catkin packages for common errors
BuildRequires:  python2-devel
BuildRequires:  python2-catkin_pkg
BuildRequires:  python2-mock
BuildRequires:  python2-nose
BuildRequires:  python2-setuptools
Requires:       python2-catkin_pkg
%{?python_provide:%python_provide python2-%{source_name}}


%description -n python2-%{source_name}
catkin_lint checks package configurations for the catkin build system of ROS.
It is part of an ongoing effort to aid developers with their ROS packaging (see
also: issue #153).


%package -n python3-%{source_name}
Summary:        Check catkin packages for common errors
BuildRequires:  python3-catkin_pkg
BuildRequires:  python3-devel
BuildRequires:  python3-mock
BuildRequires:  python3-nose
BuildRequires:  python3-setuptools
Requires:       python3-catkin_pkg
%{?python_provide:%python_provide python3-%{source_name}}


%description -n python3-%{source_name}
catkin_lint checks package configurations for the catkin build system of ROS.
It is part of an ongoing effort to aid developers with their ROS packaging (see
also: issue #153).


%prep
%autosetup -n %{source_name}-%{version}

for lib in src/catkin_lint/*.py src/catkin_lint/checks/*.py; do
  sed -i '1{\@^#!.*python@d}' $lib
done


%build
%py2_build

%py3_build
# TODO: Eventually remove python3-%%{source_name}
mv build/scripts-%{python3_version}/%{source_name} build/scripts-%{python3_version}/python3-%{source_name}


%install
%py2_install
ln -s %{source_name} %{buildroot}%{_bindir}/%{source_name}-%{python2_version}
install -p -D -m0644 bash/%{source_name} %{buildroot}%{_sysconfdir}/bash_completion.d/%{source_name}

%py3_install
ln -s python3-%{source_name} %{buildroot}%{_bindir}/%{source_name}-%{python3_version}
install -p -D -m0644 bash/%{source_name} %{buildroot}%{_sysconfdir}/bash_completion.d/python3-%{source_name}


%check
# Python 3 test failure reported upstream:
# https://github.com/fkie/catkin_lint/issues/37
%{__python3} setup.py test || exit 0
%{__python2} setup.py test


%files -n python2-%{source_name}
%doc changelog.txt README.rst
%{python2_sitelib}/%{source_name}-%{version}-py?.?.egg-info/
%{python2_sitelib}/%{source_name}/
%{_bindir}/%{source_name}
%{_bindir}/%{source_name}-%{python2_version}
%{_sysconfdir}/bash_completion.d/%{source_name}


%files -n python3-%{source_name}
%doc changelog.txt README.rst
%{python3_sitelib}/%{source_name}-%{version}-py?.?.egg-info/
%{python3_sitelib}/%{source_name}/
%{_bindir}/%{source_name}-%{python3_version}
%{_bindir}/python3-%{source_name}
%{_sysconfdir}/bash_completion.d/python3-%{source_name}


%changelog
* Sat Jun 09 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.20-1
- Update to latest release

* Sun Mar 04 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.19-1
- Update to latest release

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Jan 16 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.4.17-2
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Sun Dec 17 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.17-1
- Update to release 1.4.17 (rhbz#1509944)

* Wed Oct 25 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.16-1
- Update to release 1.4.16 (rhbz#1443069)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Apr 09 2017 Rich Mattes <richmattes@gmail.com> - 1.4.13-1
- Update to release 1.4.13 (rhbz#1440346)

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.4.6-3
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Sat Apr 16 2016 Scott K Logan <logans@cottsay.net> - 1.4.6-1
- Update to 1.4.6

* Thu Apr 07 2016 Scott K Logan <logans@cottsay.net> - 1.4.5-1
- Update to 1.4.5
- Update to latest packaging guidelines

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 1.4.3-1
- Update to release 1.4.3 (rhbz#1240452)

* Sat Jul 04 2015 Scott K Logan <logans@cottsay.net> - 1.4.0-1
- Update to 1.4.0
- Update to latest packaging guidelines

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 1.3.11-1
- Update to release 1.3.11 (rhbz#1175223)

* Tue Dec 02 2014 Scott K Logan <logans@cottsay.net> - 1.3.8-1
- Update to release 1.3.8
- Add python3 package
- Enable check section

* Wed Jul 16 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.3.7-1
- Update to latest upstream release

* Mon Jun 09 2014 Scott K Logan <logans@cottsay.net> - 1.3.6-1
- Update to release 1.3.6

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon May 19 2014 Scott K Logan <logans@cottsay.net> 1.3.5-1
- Update to release 1.3.5

* Tue Apr 15 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.3.4-1
- Correct requires

* Sat Apr 05 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.3.4-1
- Initial package build