diff --git a/python-rospkg-1.2.3-distro-dep.patch b/python-rospkg-1.2.3-distro-dep.patch new file mode 100644 index 0000000..e4ae779 --- /dev/null +++ b/python-rospkg-1.2.3-distro-dep.patch @@ -0,0 +1,66 @@ +From f3c8e8eacc4e1f5d53c79fb79bdb75e5bcce8faf Mon Sep 17 00:00:00 2001 +From: Scott K Logan +Date: Mon, 20 Apr 2020 14:30:24 -0700 +Subject: [PATCH] Ensure 'distro' dependency is absent for python < 3.8 (#196) + +* Ensure 'distro' dependency is absent for python < 3.8 + +This approach aligns with the existing approach for `argparse`, while +still maintaining the current behavior when +`SKIP_PYTHON_{MODULE,SCRIPTS}` is specified. + +This is a generalized solution to the change made in +e7a154999ffe986b83b4550c516c1b8a79b35142 + +* keep distro for Python 3.8 modules Debian package + +* can't list distro as a dependency in the Debian packages since the same package is used across multiple Python versions + +Co-authored-by: Dirk Thomas +--- + setup.py | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/setup.py b/setup.py +index 19ee4bc..ab629ff 100755 +--- a/setup.py ++++ b/setup.py +@@ -5,14 +5,6 @@ + + from setuptools import setup + +-install_requires = ['catkin_pkg', 'PyYAML'] +- +-if ( +- 'SKIP_PYTHON_MODULES' not in os.environ and +- 'SKIP_PYTHON_SCRIPTS' not in os.environ +-): +- install_requires.append('distro') +- + kwargs = { + 'name': 'rospkg', + # same version as in: +@@ -24,7 +16,7 @@ + 'entry_points': { + 'console_scripts': ['rosversion=rospkg.rosversion:main'], + }, +- 'install_requires': install_requires, ++ 'install_requires': ['catkin_pkg', 'distro', 'PyYAML'], + 'author': 'Ken Conley', + 'author_email': 'kwc@willowgarage.com', + 'url': 'http://wiki.ros.org/rospkg', +@@ -42,6 +34,14 @@ + if sys.version_info[0] == 2 and sys.version_info[1] < 7: + kwargs['install_requires'].append('argparse') + ++if ( ++ sys.version_info[0] < 3 or ++ (sys.version_info[0] == 3 and sys.version_info[1] < 8) or ++ 'SKIP_PYTHON_MODULES' in os.environ or ++ 'SKIP_PYTHON_SCRIPTS' in os.environ ++): ++ kwargs['install_requires'].remove('distro') ++ + if 'SKIP_PYTHON_MODULES' in os.environ: + kwargs['packages'] = [] + kwargs['package_dir'] = {} diff --git a/python-rospkg.rpmlintrc b/python-rospkg.rpmlintrc new file mode 100644 index 0000000..501e5e3 --- /dev/null +++ b/python-rospkg.rpmlintrc @@ -0,0 +1,2 @@ +# MANUAL PAGES +addFilter(r'no-manual-page-for-binary python3-rosversion$') diff --git a/python-rospkg.spec b/python-rospkg.spec index 80160af..9d4470b 100644 --- a/python-rospkg.spec +++ b/python-rospkg.spec @@ -5,13 +5,16 @@ Name: python-%{srcname} Version: 1.2.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utilities for ROS package, stack, and distribution information License: BSD URL: http://ros.org/wiki/rospkg Source0: https://github.com/ros-infrastructure/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz +# Merged upstream as ros-infrastructure/rospkg#196 +Patch0: %{name}-1.2.3-distro-dep.patch + BuildArch: noarch %description @@ -172,6 +175,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %changelog +* Mon Apr 20 2020 Scott K Logan - 1.2.4-2 +- Add upstream patch for distro dependency + * Wed Apr 15 2020 Scott K Logan - 1.2.4-1 - Update to 1.2.4 (rhbz#1775451)