diff --git a/.gitignore b/.gitignore index cedb9c3..a816f81 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /catkin_pkg-0.2.5.tar.gz /catkin_pkg-0.2.6.tar.gz /catkin_pkg-0.2.7.tar.gz +/catkin_pkg-4e579b06c8a4dbbd42df93800fbff54d3c7a4c26.tar.gz diff --git a/python-catkin_pkg-0.2.9-license.patch b/python-catkin_pkg-0.2.9-license.patch new file mode 100644 index 0000000..6d001f7 --- /dev/null +++ b/python-catkin_pkg-0.2.9-license.patch @@ -0,0 +1,47 @@ +From 43c7b0ee2fddfff8b8ae40dac64485fd353f6abc Mon Sep 17 00:00:00 2001 +From: Scott K Logan +Date: Tue, 30 Jun 2015 20:47:50 -0700 +Subject: [PATCH] Add LICENSE + +--- + LICENSE | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + create mode 100644 LICENSE + +diff --git a/LICENSE b/LICENSE +new file mode 100644 +index 0000000..7855782 +--- /dev/null ++++ b/LICENSE +@@ -0,0 +1,31 @@ ++Software License Agreement (BSD License) ++ ++Copyright (c) 2012, Willow Garage, Inc. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions ++are met: ++ ++* Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++* Redistributions in binary form must reproduce the above ++ copyright notice, this list of conditions and the following ++ disclaimer in the documentation and/or other materials provided ++ with the distribution. ++* Neither the name of Willow Garage, Inc. nor the names of its ++ contributors may be used to endorse or promote products derived ++ from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ++ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGE. diff --git a/python-catkin_pkg-0.2.9-use-macros-in-doc-makefile.patch b/python-catkin_pkg-0.2.9-use-macros-in-doc-makefile.patch new file mode 100644 index 0000000..701f995 --- /dev/null +++ b/python-catkin_pkg-0.2.9-use-macros-in-doc-makefile.patch @@ -0,0 +1,28 @@ +From 9d44294fbaec260f312ecfaead310b99ad5205b4 Mon Sep 17 00:00:00 2001 +From: Scott K Logan +Date: Tue, 30 Jun 2015 20:56:45 -0700 +Subject: [PATCH] Use macros in doc Makefile + +--- + doc/Makefile | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/doc/Makefile b/doc/Makefile +index ff15a01..64d2ab3 100644 +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -1,10 +1,12 @@ + .PHONY: html apidoc clean upload + ++SPHINXAPIDOC=sphinx-apidoc ++ + html: apidoc +- make -C _build html ++ $(MAKE) -C _build html + + apidoc: +- sphinx-apidoc -F -o _build ../src/catkin_pkg ++ $(SPHINXAPIDOC) -F -o _build ../src/catkin_pkg + sed -i "s/_build/./g" _build/Makefile + + clean: diff --git a/python-catkin_pkg.spec b/python-catkin_pkg.spec index f08e84b..18bb2de 100644 --- a/python-catkin_pkg.spec +++ b/python-catkin_pkg.spec @@ -1,4 +1,6 @@ %global module_name catkin_pkg +%global commit 4e579b06c8a4dbbd42df93800fbff54d3c7a4c26 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) %if 0%{?fedora} > 12 %global with_python3 1 @@ -9,14 +11,18 @@ %endif Name: python-%{module_name} -Version: 0.2.7 -Release: 2%{?dist} +Version: 0.2.9 +Release: 1%{?dist} Summary: Library for retrieving information about catkin packages License: BSD URL: https://github.com/ros-infrastructure/%{module_name} BuildArch: noarch -Source0: https://pypi.python.org/packages/source/c/%{module_name}/%{module_name}-%{version}.tar.gz +Source0: https://github.com/ros-infrastructure/%{module_name}/archive/%{commit}/%{module_name}-%{commit}.tar.gz +# Pulled from upstream +Patch0: python-catkin_pkg-0.2.9-license.patch +# Pulled from upstream +Patch1: python-catkin_pkg-0.2.9-use-macros-in-doc-makefile.patch Requires: python-argparse Requires: python-dateutil @@ -28,6 +34,9 @@ BuildRequires: python-docutils BuildRequires: python-mock BuildRequires: python-nose BuildRequires: python-setuptools +%if !0%{?rhel} || 0%{?rhel} > 6 +BuildRequires: python-sphinx +%endif %if 0%{?with_python3} %package -n python3-%{module_name} @@ -41,6 +50,7 @@ BuildRequires: python3-docutils BuildRequires: python3-mock BuildRequires: python3-nose BuildRequires: python3-setuptools +BuildRequires: python3-sphinx %endif %description @@ -52,22 +62,35 @@ Library for retrieving information about catkin packages %endif %prep -%setup -q -n %{module_name}-%{version} +%setup -qc + +mv %{module_name}-%{commit} python2 +pushd python2 +%patch0 -p1 +%patch1 -p1 +popd %if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' +cp -a python2 python3 +find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %endif -find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' +find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' %build +pushd python2 %{__python2} setup.py build +%if !0%{?rhel} || 0%{?rhel} > 6 +PYTHONPATH=%{_builddir}/%{name}-%{version}/python2/build/lib make %{?_smp_mflags} -C doc html +rm -f doc/_build/html/.buildinfo +%endif +popd %if 0%{?with_python3} -pushd %{py3dir} +pushd python3 %{__python3} setup.py build +PYTHONPATH=%{_builddir}/%{name}-%{version}/python3/build/lib make %{?_smp_mflags} -C doc html SPHINXAPIDOC=sphinx-apidoc-%{python3_version} 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 @@ -75,29 +98,39 @@ popd %endif %install +pushd python2 %{__python2} setup.py install --skip-build --root %{buildroot} +popd %if 0%{?with_python3} -pushd %{py3dir} +pushd python3 %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif %check +pushd python2 %if "%{python2_version}" == "2.6" # Skip tests that use python 2.7 assertions PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w test -e "(test_topological_order_packages_with_duplicates|test_validate_metapackage|test_package_decorator_init|test_create_package_template)" %else PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests-%{python2_version} -w test %endif +popd %if 0%{?with_python3} -pushd %{py3dir} +pushd python3 PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} -w test popd %endif %files +%if !0%{?rhel} || 0%{?rhel} > 6 +%doc python2/doc/_build/html python2/README.rst +%license python2/LICENSE.txt +%else +%doc python2/LICENSE.txt python2/README.rst +%endif %{_bindir}/catkin_create_pkg %{_bindir}/catkin_find_pkg %{_bindir}/catkin_generate_changelog @@ -108,6 +141,8 @@ popd %if 0%{?with_python3} %files -n python3-%{module_name} +%doc python3/doc/_build/html python3/README.rst +%license python3/LICENSE.txt %{_bindir}/python3-catkin_create_pkg %{_bindir}/python3-catkin_find_pkg %{_bindir}/python3-catkin_generate_changelog @@ -118,6 +153,11 @@ popd %endif %changelog +* Tue Jun 30 2015 Scott K Logan - 0.2.9-1 +- Update to 0.2.9 +- Switch to Github upstream to get docs +- Update to latest packaging guidelines + * Thu Jun 18 2015 Fedora Release Engineering - 0.2.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 3a8706d..d69878c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1cf3f16d24d595f086df2adec5f5f2ed catkin_pkg-0.2.7.tar.gz +e37ae1bf503580d61ac01438d29d3bfe catkin_pkg-4e579b06c8a4dbbd42df93800fbff54d3c7a4c26.tar.gz