%global commit a6a0ee4c9201e8bd9b7a7e28efb2c826cda7a1b2
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global realname vcstools
%global with_python3 1
Name: python-%{realname}
Version: 0.1.35
Release: 2%{?dist}
Summary: Version Control System tools for Python
License: BSD
URL: http://www.ros.org/wiki/vcstools
Source0: https://github.com/%{realname}/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz
BuildArch: noarch
BuildRequires: python-dateutil
BuildRequires: python-devel
BuildRequires: python-sphinx
BuildRequires: PyYAML
%if 0%{?with_python3}
BuildRequires: python3-dateutil
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-PyYAML
%endif
Requires: python-dateutil
Requires: PyYAML
%description
The vcstools module provides a Python API for interacting with different
version control systems (VCS/SCMs). The VcsClient class provides an API
for seamless interacting with Git, Mercurial (Hg), Bzr and SVN. The focus
of the API is manipulating on-disk checkouts of source-controlled trees.
Its main use is to support the rosinstall tool.
%if 0%{?with_python3}
%package -n python3-%{realname}
Summary: Version Control System tools for Python
Requires: python3-dateutil
Requires: python3-PyYAML
%description -n python3-%{realname}
The vcstools module provides a Python API for interacting with different
version control systems (VCS/SCMs). The VcsClient class provides an API
for seamless interacting with Git, Mercurial (Hg), Bzr and SVN. The focus
of the API is manipulating on-disk checkouts of source-controlled trees.
Its main use is to support the rosinstall tool.
%endif
%prep
%setup -qn %{realname}-%{commit}
sed -i 's/haiku/default/' doc/conf.py
sed -i 's/:special-members://' doc/vcstools.rst
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
popd
%endif # with_python3
pushd doc
make html
make man
popd
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
popd
%endif # with_python3
%{__python} setup.py install --root $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
chmod -x doc/_build/man/vcstools.1
install -p -m 0644 doc/_build/man/vcstools.1 $RPM_BUILD_ROOT%{_mandir}/man1/
rm -rf doc/_build/html/.buildinfo
%files
%doc doc/_build/html LICENSE
%{python_sitelib}/%{realname}
%{python_sitelib}/%{realname}-*.egg-info
%{_mandir}/man1/*.gz
%if 0%{?with_python3}
%files -n python3-%{realname}
%doc doc/_build/html LICENSE
%{python3_sitelib}/%{realname}
%{python3_sitelib}/%{realname}-*.egg-info
%{_mandir}/man1/*.gz
%endif
%changelog
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.1.35-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Mon May 19 2014 Scott K Logan <logans@cottsay.net> - 0.1.35-1
- Update to release 0.1.35
* Sun Feb 09 2014 Rich Mattes <richmattes@gmail.com> - 0.1.32-2
- Added python 3 support
* Sat Feb 08 2014 Rich Mattes <richmattes@gmail.com> - 0.1.32-1
- Update to release 0.1.32
* Mon Aug 19 2013 Rich Mattes <richmattes@gmail.com> - 0.1.31-1
- Update to release 0.1.31
- Update to github sourceurl guidelines
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.30-2.20130318git963c121
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Mar 18 2013 Rich Mattes <richmattes@gmail.com> - 0.1.30-1.20130318git963c121
- Update to release 0.1.30
- Updated upstream URL
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.26-2.20130102gitd41568f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jan 02 2013 Rich Mattes <richmattes@gmail.com> - 0.1.26-1.20130102gitd41568f
- Update to release 0.1.26
* Fri Oct 26 2012 Rich Mattes <richmattes@gmail.com> - 0.1.24-1.20121026gitba30262
- Update to release 0.1.24
* Tue Aug 28 2012 Rich Mattes <richmattes@gmail.com> - 0.1.21-1.20120828hg0fba0588
- Update to release 0.1.21
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.17-4.20120606hg6205f4fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 08 2012 Rich Mattes <richmattes@gmail.com> - 0.1.17-3.20120606hg6205f4fc
- Added el6 support
- Enabled unit tests
* Wed Jun 06 2012 Rich Mattes <richmattes@gmail.com> - 0.1.17-2.20120606hg6205f4fc
- Update package release to include hg checkout info
- Remove el5 specific RPM_BUILD_ROOT removal from install section
* Tue Jun 05 2012 Rich Mattes <richmattes@gmail.com> - 0.1.17-1
- Update to release 0.1.17
* Wed Apr 25 2012 Rich Mattes <richmattes@gmail.com> - 0.1.4-1
- Initial package