[python-catkin_lint/f21] Update to release 1.3.8
Scott K Logan
cottsay at fedoraproject.org
Wed Dec 3 06:03:30 UTC 2014
commit 0b60a0f91cf56c304c61a5c05016686c994feb05
Author: Scott K Logan <logans at cottsay.net>
Date: Tue Dec 2 21:20:39 2014 -0800
Update to release 1.3.8
Also:
- Add python3 package
- Enable check section
.gitignore | 1 +
python-catkin_lint.spec | 102 ++++++++++++++++++++++++++++++++++++++---------
sources | 2 +-
3 files changed, 85 insertions(+), 20 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4bffcbb..3cf2aaf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/catkin_lint-1.3.5.tar.gz
/catkin_lint-1.3.6.tar.gz
/catkin_lint-1.3.7.tar.gz
+/catkin_lint-1.3.8.tar.gz
diff --git a/python-catkin_lint.spec b/python-catkin_lint.spec
index c76cc07..d7f5b03 100644
--- a/python-catkin_lint.spec
+++ b/python-catkin_lint.spec
@@ -1,11 +1,7 @@
-# sitelib for noarch packages, sitearch for others (remove the unneeded one)
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-
%global source_name catkin_lint
Name: python-%{source_name}
-Version: 1.3.7
+Version: 1.3.8
Release: 1%{?dist}
Summary: Check catkin packages for common errors
@@ -14,56 +10,124 @@ URL: https://pypi.python.org/pypi/%{source_name}
Source0: https://pypi.python.org/packages/source/c/%{source_name}/%{source_name}-%{version}.tar.gz
BuildArch: noarch
-BuildRequires: python2-devel python-setuptools
+BuildRequires: python2-devel
+BuildRequires: python-catkin_pkg
+BuildRequires: python-mock
+BuildRequires: python-nose
+BuildRequires: python-setuptools
Requires: python-catkin_pkg
+
+%package -n python3-%{source_name}
+Summary: Check catkin packages for common errors
+BuildRequires: python3-catkin_pkg
+BuildRequires: python3-devel
+BuildRequires: python3-mock
+BuildRequires: python3-nose
+BuildRequires: python3-setuptools
+Requires: python3-catkin_pkg
+
+
%description
catkin_lint checks package configurations for the catkin build system of ROS.
It is part of an ongoing effort to aid developers with their ROS packaging (see
also: issue #153).
+
+%description -n python3-%{source_name}
+catkin_lint checks package configurations for the catkin build system of ROS.
+It is part of an ongoing effort to aid developers with their ROS packaging (see
+also: issue #153).
+
+
%prep
%setup -q -n %{source_name}-%{version}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+
%build
%{__python2} setup.py build
+pushd %{py3dir}
+%{__python3} setup.py build
+pushd build/scripts-%{python3_version}
+for f in *; do mv $f python3-$f; done
+popd
+popd
+
%install
-%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__python2} setup.py install --skip-build --root %{buildroot}
-install -D -m0644 bash/%{source_name} $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/%{source_name}
+install -p -D -m0644 bash/%{source_name} %{buildroot}%{_sysconfdir}/bash_completion.d/%{source_name}
-for lib in $RPM_BUILD_ROOT%{python_sitelib}/%{source_name}/*.py; do
+for lib in %{buildroot}%{python2_sitelib}/%{source_name}/*.py; do
sed '1{\@^#!/usr/bin/env python at d}' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
-for lib in $RPM_BUILD_ROOT%{python_sitelib}/%{source_name}/checks/*.py; do
+for lib in %{buildroot}%{python2_sitelib}/%{source_name}/checks/*.py; do
sed '1{\@^#!/usr/bin/env python at d}' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
-#%check
-#pushd test
-# %{__python2} test_all_checks.py
-#popd
-
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+
+install -p -D -m0644 bash/%{source_name} %{buildroot}%{_sysconfdir}/bash_completion.d/python3-%{source_name}
+
+for lib in %{buildroot}%{python3_sitelib}/%{source_name}/*.py; do
+ sed '1{\@^#!/usr/bin/env python at d}' $lib > $lib.new &&
+ touch -r $lib $lib.new &&
+ mv $lib.new $lib
+done
+
+for lib in %{buildroot}%{python3_sitelib}/%{source_name}/checks/*.py; do
+ sed '1{\@^#!/usr/bin/env python at d}' $lib > $lib.new &&
+ touch -r $lib $lib.new &&
+ mv $lib.new $lib
+done
+popd
+
+
+%check
+PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w test
+
+pushd %{py3dir}
+PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} -w %{py3dir}
+popd
+
+
%files
-%doc changelog.txt README.rst README_API.rst
-%{python_sitelib}/%{source_name}-%{version}-py?.?.egg-info
-%{python_sitelib}/%{source_name}/
+%doc changelog.txt README.rst README_API.rst
+%{python2_sitelib}/%{source_name}-%{version}-py?.?.egg-info
+%{python2_sitelib}/%{source_name}/
%{_bindir}/%{source_name}
-%dir %{_sysconfdir}/bash_completion.d/
%{_sysconfdir}/bash_completion.d/%{source_name}
+%files -n python3-%{source_name}
+%doc changelog.txt README.rst README_API.rst
+%{python3_sitelib}/%{source_name}-%{version}-py?.?.egg-info
+%{python3_sitelib}/%{source_name}/
+%{_bindir}/python3-%{source_name}
+
+%{_sysconfdir}/bash_completion.d/python3-%{source_name}
+
+
%changelog
+* Tue Dec 02 2014 Scott K Logan <logans at cottsay.net> - 1.3.8-1
+- Update to release 1.3.8
+- Add python3 package
+- Enable check section
+
* Wed Jul 16 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 1.3.7-1
- Update to latest upstream release
diff --git a/sources b/sources
index f9ff428..2df9bfc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-85e31c5f38e3544ca3fd9d930f983a76 catkin_lint-1.3.7.tar.gz
+6fdab3d92df5b057eb718cb99df489e0 catkin_lint-1.3.8.tar.gz
More information about the scm-commits
mailing list