[python-rosdistro/f21] Update to release 0.3.7

Scott K Logan cottsay at fedoraproject.org
Sun Oct 26 01:49:05 UTC 2014


commit d2fbc860045ed87867d65fd62d5bb054275bc805
Author: Scott K Logan <logans at cottsay.net>
Date:   Sat Oct 25 17:11:18 2014 -0700

    Update to release 0.3.7
    
    Also:
    - Remove argparse patch (fixed upstream)
    - Fix sphinx dependency in el6
    - Add check section
    - Add python3 package

 .gitignore                     |    1 +
 python-rosdistro.spec          |  129 ++++++++++++++++++++++++++++++++++++----
 rosdistro-0.3.5-argparse.patch |   11 ----
 sources                        |    2 +-
 4 files changed, 118 insertions(+), 25 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c1a3f85..d3cfdd5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /rosdistro-0.2.8-6e83551.tar.gz
 /rosdistro-0.3.4-dce80f7.tar.gz
 /rosdistro-0.3.5-1eb929b.tar.gz
+/rosdistro-0.3.7-3b34fbc.tar.gz
diff --git a/python-rosdistro.spec b/python-rosdistro.spec
index a9fe312..f665b55 100644
--- a/python-rosdistro.spec
+++ b/python-rosdistro.spec
@@ -1,29 +1,61 @@
-%global commit 1eb929bb2f715bd6cabf49bad165a31da5f5a589
+%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 3b34fbcd28a67bab3c2d869e367bceac9bc32773
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
 %global realname rosdistro
 
-Name:           python-rosdistro
-Version:        0.3.5
-Release:        2%{?dist}
+Name:           python-%{realname}
+Version:        0.3.7
+Release:        1%{?dist}
 Summary:        File format for managing ROS Distributions
 
 License:        BSD and MIT
 URL:            http://www.ros.org/wiki/rosdistro
 Source0:        https://github.com/ros-infrastructure/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz
-Patch0:         %{realname}-0.3.5-argparse.patch
 
 BuildArch:      noarch
 
 BuildRequires:  PyYAML
 BuildRequires:  git
 BuildRequires:  python2-devel
+BuildRequires:  python-catkin_pkg
 BuildRequires:  python-catkin-sphinx
+BuildRequires:  python-rospkg
+BuildRequires:  python-setuptools
+%if 0%{?rhel} && 0%{?rhel} < 7
+BuildRequires:  python-nose1.1
+BuildRequires:  python-sphinx10
+%else
+BuildRequires:  python-nose
+BuildRequires:  python-sphinx
+%endif
 Requires:       PyYAML
 Requires:       python-argparse
 Requires:       python-catkin_pkg
 Requires:       python-rospkg
 Requires:       python-setuptools
 
+%if 0%{?with_python3}
+%package -n python3-%{realname}
+Summary:        File format for managing ROS Distributions
+BuildRequires:  python3-PyYAML
+BuildRequires:  python3-catkin_pkg
+BuildRequires:  python3-devel
+BuildRequires:  python3-nose
+BuildRequires:  python3-rospkg
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-sphinx
+Requires:       python3-PyYAML
+Requires:       python3-catkin_pkg
+Requires:       python3-rospkg
+Requires:       python3-setuptools
+%endif
+
 %description
 The rosdistro tool allows you to get access to the full dependency tree and 
 the version control system information of all packages and repositories. To 
@@ -37,31 +69,102 @@ depending on your own internet connection and the response times of Github.
 The rosdistro tool will always write the latest dependency information to a 
 local cache file, to speed up performance for the next query. 
 
+%if 0%{?with_python3}
+%description -n python3-%{realname}
+The rosdistro tool allows you to get access to the full dependency tree and
+the version control system information of all packages and repositories. To
+increase performance, the rosdistro tool will automatically look for a cache
+file on your local disk. If no cache file is found locally, it will try to
+download the latest cache file from the server. The cache files are only used
+to improve performance, and are not needed to get correct results. rosdistro
+will automatically go to Github to find any dependencies that are not part
+of the cache file. Note that operation without a cache file can be very slow,
+depending on your own internet connection and the response times of Github.
+The rosdistro tool will always write the latest dependency information to a
+local cache file, to speed up performance for the next query.
+%endif
+
 %prep
 %setup -qn %{realname}-%{commit}
-%patch0 -p1
 sed -i 's|#!/usr/bin/env python||' src/rosdistro/external/appdirs.py
 
+%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|#!%{__python2}|'
+
 %build
-%{__python} setup.py build
-pushd doc
-make html
+%{__python2} setup.py build
+%if 0%{?rhel} && 0%{?rhel} < 7
+make -C doc html SPHINXBUILD=sphinx-1.0-build
+%else
+make -C doc html
+%endif
+rm -f doc/_build/html/.buildinfo
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+# TODO: Disabled until python3-catkin-sphinx is built
+#make -C doc html man SPHINXBUILD=sphinx-build-%{python3_version}
+#rm -f doc/_build/html/.buildinfo
+pushd build/scripts-%{python3_version}
+for f in *; do mv $f python3-$f; done
 popd
+popd
+%endif
 
 %install
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
-rm -f doc/_build/html/.buildinfo
+%{__python2} setup.py install --skip-build --root %{buildroot}
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
+
+%check
+%if 0%{?rhel} && 0%{?rhel} < 7
+PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests1.1 -w test
+%else
+PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w test
+%endif
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} -w test
+popd
+%endif
  
 %files
 %doc README.md LICENSE.txt doc/_build/html
 %{_bindir}/rosdistro_build_cache
 %{_bindir}/rosdistro_reformat
 %{_bindir}/rosdistro_migrate_to_rep_141
-%{python_sitelib}/%{realname}
-%{python_sitelib}/%{realname}-%{version}-py?.?.egg-info
+%{python2_sitelib}/%{realname}
+%{python2_sitelib}/%{realname}-%{version}-py?.?.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-%{realname}
+%doc README.md LICENSE.txt doc/_build/html
+%{_bindir}/python3-rosdistro_build_cache
+%{_bindir}/python3-rosdistro_reformat
+%{_bindir}/python3-rosdistro_migrate_to_rep_141
+%{python3_sitelib}/%{realname}
+%{python3_sitelib}/%{realname}-%{version}-py?.?.egg-info
+%endif
 
 %changelog
+* Sat Oct 25 2014 Scott K Logan <logans at cottsay.net> - 0.3.7-1
+- Update to release 0.3.7
+- Remove argparse patch (fixed upstream)
+- Fix sphinx dependency in el6
+- Add check section
+- Add python3 package
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index a800fc6..79dd893 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9c43baf3df83bfabf9e3b0436f4f2ee7  rosdistro-0.3.5-1eb929b.tar.gz
+63389a0511293249811732f92c3b9e8c  rosdistro-0.3.7-3b34fbc.tar.gz


More information about the scm-commits mailing list