[python-rosinstall] Update to release 0.7.5 (rhbz#1195536)
rmattes
rmattes at fedoraproject.org
Wed Mar 4 18:30:21 UTC 2015
commit e519c1adf089d4002f73f312b0bddf2e39c14fc4
Author: Rich Mattes <richmattes at gmail.com>
Date: Wed Mar 4 13:30:16 2015 -0500
Update to release 0.7.5 (rhbz#1195536)
- Add python3 package
.gitignore | 1 +
python-rosinstall.spec | 76 ++++++++++++++++++++++++++++++++++++++++++++------
sources | 2 +-
3 files changed, 69 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7572289..f94f0c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/rosinstall-0.6.29-a9e8e8d.tar.gz
/rosinstall-0.7.3-72e52d6.tar.gz
/rosinstall-0.7.4-e9a57bd.tar.gz
+/rosinstall-0d5fcf2f779125bd84ae1bd7a0ecda0dc5c900ef.tar.gz
diff --git a/python-rosinstall.spec b/python-rosinstall.spec
index 44099df..5d30b21 100644
--- a/python-rosinstall.spec
+++ b/python-rosinstall.spec
@@ -1,22 +1,35 @@
-%global commit e9a57bd4857af8b61cc3e6f15728c20bea11d94c
+%if 0%{?fedora} > 12
+%global with_python3 1
+%else
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
+
+%global commit 0d5fcf2f779125bd84ae1bd7a0ecda0dc5c900ef
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global realname rosinstall
Name: python-rosinstall
-Version: 0.7.4
+Version: 0.7.5
Release: 1%{?dist}
Summary: ROS installation utilities
License: BSD
URL: http://www.ros.org/wiki/rosinstall
BuildArch: noarch
-Source0: https://github.com/vcstools/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz
+Source0: https://github.com/vcstools/%{realname}/archive/%{commit}/%{realname}-%{commit}.tar.gz
-BuildRequires: python-devel
+BuildRequires: python2-devel
BuildRequires: python-rosdistro
BuildRequires: python-setuptools
BuildRequires: python-sphinx
BuildRequires: python-catkin-sphinx
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-rosdistro
+BuildRequires: python3-setuptools
+%endif
+
# install_requires from setup.py
Requires: python-vcstools > 0.1.30
Requires: PyYAML
@@ -30,6 +43,21 @@ from multiple version control repositories and updating these checkouts. Given
a *.rosinstall file that specifies where to get code, rosinstall will check
out a working copy for you.
+%if 0%{?with_python3}
+%package -n python3-%{realname}
+Summary: ROS Installation utilities
+Requires: python3-vcstools > 0.1.30
+Requires: python3-PyYAML
+Requires: python3-rosdistro > 0.3.0
+Requires: python3-catkin_pkg
+Requires: python3-wstool > 0.1.0
+
+%description -n python3-%{realname}
+rosinstall is a tool to check out ROS source code (or any source code, really)
+from multiple version control repositories and updating these checkouts. Given
+a *.rosinstall file that specifies where to get code, rosinstall will check
+out a working copy for you.
+%endif
%prep
%setup -qn %{realname}-%{commit}
@@ -38,27 +66,57 @@ sed -i 's/haiku/default/' doc/conf.py
sed -i 's/:special-members://g' doc/*.rst
%endif
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
%build
-%{__python} setup.py build
+%{__python2} setup.py build
pushd doc
make html
make man
popd
+%if 0%{?with_python3}
+pushd %{py3dir}
+CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
+popd
+%endif # with_python3
+
%install
-%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif
+
+%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m 0644 doc/_build/man/%{realname}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
rm -rf doc/_build/html/.buildinfo
%files
-%doc doc/_build/html LICENSE README.rst
+%license LICENSE
+%doc doc/_build/html README.rst
%{_bindir}/*
-%{python_sitelib}/%{realname}
-%{python_sitelib}/%{realname}-%{version}-py?.?.egg-info
+%{python2_sitelib}/%{realname}
+%{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info
%{_mandir}/man1/%{realname}.1.gz
+%if 0%{?with_python3}
+%files -n python3-%{realname}
+%license LICENSE
+%{python3_sitelib}/%{realname}
+%{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info
+%endif
+
%changelog
+* Wed Mar 04 2015 Rich Mattes <richmattes at gmail.com> - 0.7.5-1
+- Update to release 0.7.5 (rhbz#1195536)
+- Add python3 package
+
* Tue Dec 30 2014 Rich Mattes <richmattes at gmail.com> - 0.7.4-1
- Update to release 0.7.4
diff --git a/sources b/sources
index 5ab2254..8f52602 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a69e64843f87699b8d2fabf9e506d90c rosinstall-0.7.4-e9a57bd.tar.gz
+448b249ae7b51cc0241446a772980988 rosinstall-0d5fcf2f779125bd84ae1bd7a0ecda0dc5c900ef.tar.gz
More information about the scm-commits
mailing list