c5ff9fb
%global commit 6b9e328c321c0e11c90e09f01672376683fcd622
c2f8e54
%global shortcommit %(c=%{commit}; echo ${c:0:7})
4918e8f
%global module_name wstool
4918e8f
e8fd82e
%global with_python3 1
e8fd82e
4918e8f
Name:           python-%{module_name}
c5ff9fb
Version:        0.1.17
839c93d
Release:        7%{?dist}
4918e8f
Summary:        Tool for managing a workspace of multiple heterogeneous SCM repositories
4918e8f
4918e8f
License:        BSD
4918e8f
URL:            http://www.ros.org/wiki/%{module_name}
ce98654
Source0:        https://github.com/vcstools/%{module_name}/archive/%{commit}/%{module_name}-%{commit}.tar.gz
831dd19
# Patch to remove a duplicate installed file.  Not submitted upstream
831dd19
Patch0:         %{module_name}-0.1.9-fedora.patch
4918e8f
BuildArch:      noarch
4918e8f
e8fd82e
BuildRequires:  bzr
e8fd82e
BuildRequires:  git
e8fd82e
BuildRequires:  mercurial
42777c4
BuildRequires:  python2-coverage
42777c4
BuildRequires:  python2-dateutil
e8fd82e
BuildRequires:  python2-devel
42777c4
BuildRequires:  python2-mock
42777c4
BuildRequires:  python2-nose
42777c4
BuildRequires:  python2-rosinstall
42777c4
BuildRequires:  python2-setuptools
42777c4
BuildRequires:  python2-sphinx
42777c4
BuildRequires:  python2-vcstools >= 0.1.38
42777c4
BuildRequires:  python2-pyyaml
e8fd82e
BuildRequires:  subversion
e8fd82e
e74d2ca
%global _description\
e74d2ca
wstool provides commands to manage several local SCM repositories (supports\
e74d2ca
git, mercurial, subversion, bazaar) based on a single workspace definition file\
e74d2ca
(.rosinstall).\
e74d2ca
\
e74d2ca
wstool replaces the rosws tool for catkin workspaces. As catkin workspaces\
e74d2ca
create their own setup file and environment, wstool is reduced to version\
e74d2ca
control functions only. So wstool does not have a "regenerate" command, and\
e74d2ca
does not allow adding non-version controlled elements to workspaces. In all\
e74d2ca
other respects, it behaves the same as rosws.
e74d2ca
e74d2ca
%description %_description
e74d2ca
e74d2ca
%package -n python2-%{module_name}
e74d2ca
Summary: %summary
e8fd82e
Requires:       bzr
e8fd82e
Requires:       git
e8fd82e
Requires:       mercurial
42777c4
Requires:       python2-dateutil
42777c4
Requires:       python2-rosinstall
42777c4
Requires:       python2-vcstools >= 0.1.38
42777c4
Requires:       python2-pyyaml
e8fd82e
Requires:       subversion
839c93d
%{?python_provide:%python_provide python2-%{module_name}}
4918e8f
e74d2ca
%description -n python2-%{module_name} %_description
4918e8f
4918e8f
%if 0%{?with_python3}
e8fd82e
%package -n python3-%{module_name}
4918e8f
Summary:        Tool for managing a workspace of multiple heterogeneous SCM repositories
e8fd82e
e8fd82e
BuildRequires:  python3-coverage
e8fd82e
BuildRequires:  python3-dateutil
e8fd82e
BuildRequires:  python3-devel
e8fd82e
BuildRequires:  python3-mock
e8fd82e
BuildRequires:  python3-nose
42777c4
BuildRequires:  python2-rosinstall
e8fd82e
BuildRequires:  python3-setuptools
49b86ee
BuildRequires:  python3-vcstools >= 0.1.38
e8fd82e
BuildRequires:  python3-PyYAML
e8fd82e
e8fd82e
Requires:       bzr
e8fd82e
Requires:       git
e8fd82e
Requires:       mercurial
4918e8f
Requires:       python3-dateutil
42777c4
Requires:       python2-rosinstall
49b86ee
Requires:       python3-vcstools >= 0.1.38
5693f30
Requires:       python3-PyYAML
e8fd82e
Requires:       subversion
839c93d
%{?python_provide:%python_provide python3-%{module_name}}
4918e8f
e8fd82e
%description -n python3-%{module_name}
4918e8f
wstool provides commands to manage several local SCM repositories (supports
4918e8f
git, mercurial, subversion, bazaar) based on a single workspace definition file
4918e8f
(.rosinstall).
4918e8f
4918e8f
wstool replaces the rosws tool for catkin workspaces. As catkin workspaces
4918e8f
create their own setup file and environment, wstool is reduced to version
4918e8f
control functions only. So wstool does not have a "regenerate" command, and
4918e8f
does not allow adding non-version controlled elements to workspaces. In all
4918e8f
other respects, it behaves the same as rosws.
4918e8f
%endif # with_python3
4918e8f
4918e8f
%prep
c2f8e54
%setup -qn %{module_name}-%{commit}
831dd19
%patch0 -p0 -b .fedora
4918e8f
4918e8f
%if 0%{?with_python3}
4918e8f
rm -rf %{py3dir}
4918e8f
cp -a . %{py3dir}
4918e8f
%endif # with_python3
4918e8f
4918e8f
%build
e8fd82e
%{__python2} setup.py build
4918e8f
4918e8f
%if 0%{?with_python3}
4918e8f
pushd %{py3dir}
4918e8f
%{__python3} setup.py build
e8fd82e
mv -v build/scripts-%{python3_version}/%{module_name} build/scripts-%{python3_version}/python3-%{module_name}
4918e8f
popd
4918e8f
%endif # with_python3
4918e8f
4918e8f
%install
831dd19
%{__python2} setup.py install --skip-build --root %{buildroot} --prefix %{_usr}
4918e8f
4918e8f
%if 0%{?with_python3}
4918e8f
pushd %{py3dir}
831dd19
%{__python3} setup.py install --skip-build --root %{buildroot} --prefix %{_usr}
e8fd82e
popd
e8fd82e
%endif # with_python3
e8fd82e
e8fd82e
%check
e8fd82e
export BZR_EMAIL="Foo Bar <foo@example.com>"
e8fd82e
export GIT_AUTHOR_EMAIL="foo@example.com"
e8fd82e
export GIT_AUTHOR_NAME="Foo Bar"
e8fd82e
export GIT_COMMITTER_EMAIL="foo@example.com"
e8fd82e
export GIT_COMMITTER_NAME="Foo Bar"
e8fd82e
e8fd82e
nosetests --with-coverage --cover-package=%{module_name} -w test
e8fd82e
e8fd82e
%if 0%{?with_python3}
e8fd82e
pushd %{py3dir}
e8fd82e
nosetests-%{python3_version} --with-coverage --cover-package=%{module_name} -w test
4918e8f
popd
839c93d
%endif # with_python3
4918e8f
e74d2ca
%files -n python2-%{module_name}
839c93d
%doc README.rst doc/changelog.rst
839c93d
%license LICENSE
4918e8f
%{_bindir}/%{module_name}
6e1e0f7
%{python2_sitelib}/%{module_name}/
6e1e0f7
%{python2_sitelib}/%{module_name}-%{version}-py?.?.egg-info/
831dd19
%{_mandir}/man1/*.1.*
831dd19
# bash completion
831dd19
%config(noreplace) %{_sysconfdir}/bash_completion.d/*
831dd19
# zsh completion
831dd19
%dir %{_datadir}/zsh/
831dd19
%dir %{_datadir}/zsh/site-functions/
831dd19
%{_datadir}/zsh/site-functions/_wstool
831dd19
4918e8f
4918e8f
%if 0%{?with_python3}
e8fd82e
%files -n python3-%{module_name}
839c93d
%doc README.rst doc/changelog.rst
839c93d
%license LICENSE
4918e8f
%{_bindir}/python3-%{module_name}
4918e8f
%{python3_sitelib}/%{module_name}/
4918e8f
%{python3_sitelib}/%{module_name}-%{version}-py?.?.egg-info/
4918e8f
%endif # with_python3
4918e8f
4918e8f
%changelog
839c93d
* Tue Jul 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1.17-7
839c93d
- Correct macro usage
839c93d
6e1e0f7
* Fri Jul 20 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1.17-6
6e1e0f7
- Rebuild for https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
6e1e0f7
22af5fb
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.17-5
22af5fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
22af5fb
11ef0b3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.17-4
11ef0b3
- Rebuilt for Python 3.7
11ef0b3
c829bd7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.17-3
c829bd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c829bd7
42777c4
* Wed Jan 31 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.17-2
42777c4
- Update Python 2 dependency declarations to new packaging standards
42777c4
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
42777c4
c5ff9fb
* Thu Jan 11 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1.17-1
c5ff9fb
- Update to latest release (rhbz#1533303)
c5ff9fb
e74d2ca
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.13-5
e74d2ca
- Python 2 binary package renamed to python2-wstool
e74d2ca
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
e74d2ca
3203ebd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.13-4
3203ebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3203ebd
f84e1d5
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.13-3
f84e1d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f84e1d5
35829ff
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.1.13-2
35829ff
- Rebuild for Python 3.6
35829ff
14176f8
* Sun Aug 28 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1.13-1
14176f8
- Update to lastest upstream release
14176f8
0b43863
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.12-3
0b43863
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0b43863
4a3d549
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.12-2
4a3d549
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
4a3d549
49b86ee
* Tue Oct 20 2015 Rich Mattes <richmattes@gmail.com> - 0.1.12-1
49b86ee
- Update to release 0.1.12 (rhbz#1271029)
49b86ee
c920d37
* Wed Sep 16 2015 Rich Mattes <richmattes@gmail.com> - 0.1.10-1
c920d37
- Update to release 0.1.10 (rhbz#1261684)
c920d37
831dd19
* Sun Sep 13 2015 Rich Mattes <richmattes@gmail.com> - 0.1.9-1
831dd19
- Update to release 0.1.9 (rhbz#1261684)
831dd19
0527a44
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-2
0527a44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0527a44
ce98654
* Wed Mar 04 2015 Rich Mattes <richmattes@gmail.com> - 0.1.6-1
ce98654
- Update to release 0.1.6 (rhbz#1195537)
ce98654
e8fd82e
* Sun Dec 14 2014 Scott K Logan <logans@cottsay.net> - 0.1.5-1
e8fd82e
- Update to 0.1.5
e8fd82e
- Update to python packaging guidelines
e8fd82e
- Add check section
e8fd82e
d495e8b
* Thu Jul 31 2014 Scott K Logan <logans@cottsay.net> - 0.1.4-1
d495e8b
- Update to 0.1.4
d495e8b
7990caa
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-3
7990caa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7990caa
ce346a2
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.1.3-2
ce346a2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
ce346a2
5693f30
* Mon May 19 2014 Scott K Logan <logans@cottsay.net> - 0.1.3-1
5693f30
- Update to 0.1.3
5693f30
- Add depend on PyYAML
5693f30
6ec956f
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.1.1-2
6ec956f
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
6ec956f
c2f8e54
* Sun Jan 12 2014 Rich Mattes <richmattes@gmail.com> - 0.1.1-1
c2f8e54
- Update to 0.1.1
c2f8e54
4918e8f
* Mon Aug 26 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.0.3-1
4918e8f
- Rename python3 bin script
4918e8f
4918e8f
* Sun Aug 25 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.0.3-1
4918e8f
- Update source to github source
4918e8f
- Add py3 support
4918e8f
4918e8f
* Sat Mar 16 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.0.3-1
4918e8f
- Initial rpmbuild
4918e8f