Blob Blame History Raw
%global commit f6f7ad01d518b1f6da19ce0469e6e3257771cd8e
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global with_python3 1
%global module_name wstool

Name:           python-%{module_name}
Version:        0.1.4
Release:        1%{?dist}
Summary:        Tool for managing a workspace of multiple heterogeneous SCM repositories

License:        BSD
URL:            http://www.ros.org/wiki/%{module_name}
Source0:        https://github.com/vcstools/%{module_name}/archive/%{commit}/%{module_name}-%{version}-%{shortcommit}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python-setuptools

%if 0%{?with_python3}
BuildRequires:  python3-devel python3-setuptools
%endif # if with_python3

Requires:       python-vcstools >= 0.1.34
Requires:       python-rosinstall
Requires:       python-dateutil
Requires:       PyYAML

%description
wstool provides commands to manage several local SCM repositories (supports
git, mercurial, subversion, bazaar) based on a single workspace definition file
(.rosinstall).

wstool replaces the rosws tool for catkin workspaces. As catkin workspaces
create their own setup file and environment, wstool is reduced to version
control functions only. So wstool does not have a "regenerate" command, and
does not allow adding non-version controlled elements to workspaces. In all
other respects, it behaves the same as rosws.

%if 0%{?with_python3}
%package -n python3-wstool
Summary:        Tool for managing a workspace of multiple heterogeneous SCM repositories
Requires:       python3-vcstools >= 0.1.34
Requires:       python-rosinstall
Requires:       python3-dateutil
Requires:       python3-PyYAML

%description -n python3-wstool
wstool provides commands to manage several local SCM repositories (supports
git, mercurial, subversion, bazaar) based on a single workspace definition file
(.rosinstall).

wstool replaces the rosws tool for catkin workspaces. As catkin workspaces
create their own setup file and environment, wstool is reduced to version
control functions only. So wstool does not have a "regenerate" command, and
does not allow adding non-version controlled elements to workspaces. In all
other respects, it behaves the same as rosws.
%endif # with_python3

%prep
%setup -qn %{module_name}-%{commit}


%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
mv -v build/scripts-%{python3_version}/wstool build/scripts-%{python3_version}/python3-wstool
popd
%endif # with_python3

%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
popd
%endif # with_python3 

%files
%doc LICENSE README.rst doc/changelog.rst
%{_bindir}/%{module_name}
%{python_sitelib}/%{module_name}/
%{python_sitelib}/%{module_name}-%{version}-py?.?.egg-info/

%if 0%{?with_python3}
%files -n python3-wstool
%doc LICENSE README.rst doc/changelog.rst
%{_bindir}/python3-%{module_name}
%{python3_sitelib}/%{module_name}/
%{python3_sitelib}/%{module_name}-%{version}-py?.?.egg-info/
%endif # with_python3

%changelog
* Thu Jul 31 2014 Scott K Logan <logans@cottsay.net> - 0.1.4-1
- Update to 0.1.4

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Mon May 19 2014 Scott K Logan <logans@cottsay.net> - 0.1.3-1
- Update to 0.1.3
- Add depend on PyYAML

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Sun Jan 12 2014 Rich Mattes <richmattes@gmail.com> - 0.1.1-1
- Update to 0.1.1

* Mon Aug 26 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.0.3-1
- Rename python3 bin script

* Sun Aug 25 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.0.3-1
- Update source to github source
- Add py3 support

* Sat Mar 16 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.0.3-1
- Initial rpmbuild