commit:     71f6ac45fbebc5efaa00c25b543e34a67f011d82
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 20 20:02:33 2021 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Jan 20 20:02:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71f6ac45

dev-python/catkin_pkg: generate setup.py without newline in description

Closes: https://bugs.gentoo.org/765868
Closes: https://bugs.gentoo.org/765877
Closes: https://bugs.gentoo.org/765772
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 ..._pkg-0.4.23.ebuild => catkin_pkg-0.4.23-r1.ebuild} |  3 ++-
 dev-python/catkin_pkg/catkin_pkg-9999.ebuild          |  3 ++-
 dev-python/catkin_pkg/files/summary_single_line.patch | 19 +++++++++++++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/dev-python/catkin_pkg/catkin_pkg-0.4.23.ebuild 
b/dev-python/catkin_pkg/catkin_pkg-0.4.23-r1.ebuild
similarity index 94%
rename from dev-python/catkin_pkg/catkin_pkg-0.4.23.ebuild
rename to dev-python/catkin_pkg/catkin_pkg-0.4.23-r1.ebuild
index 677f0b8d989..22de5978719 100644
--- a/dev-python/catkin_pkg/catkin_pkg-0.4.23.ebuild
+++ b/dev-python/catkin_pkg/catkin_pkg-0.4.23-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -50,6 +50,7 @@ PATCHES=(
        "${FILESDIR}/catkin_prefix2.patch"
        "${FILESDIR}/ros_packages.patch"
        "${FILESDIR}/infinite_loop4.patch"
+       "${FILESDIR}/summary_single_line.patch"
 )
 
 python_test() {

diff --git a/dev-python/catkin_pkg/catkin_pkg-9999.ebuild 
b/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
index 677f0b8d989..22de5978719 100644
--- a/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
+++ b/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -50,6 +50,7 @@ PATCHES=(
        "${FILESDIR}/catkin_prefix2.patch"
        "${FILESDIR}/ros_packages.patch"
        "${FILESDIR}/infinite_loop4.patch"
+       "${FILESDIR}/summary_single_line.patch"
 )
 
 python_test() {

diff --git a/dev-python/catkin_pkg/files/summary_single_line.patch 
b/dev-python/catkin_pkg/files/summary_single_line.patch
new file mode 100644
index 00000000000..d24c284da9e
--- /dev/null
+++ b/dev-python/catkin_pkg/files/summary_single_line.patch
@@ -0,0 +1,19 @@
+setuptools will disallow newlines in descriptions, so do not generate them
+see e.g. https://bugs.gentoo.org/765868
+
+Index: catkin_pkg-0.4.23/src/catkin_pkg/python_setup.py
+===================================================================
+--- catkin_pkg-0.4.23.orig/src/catkin_pkg/python_setup.py
++++ catkin_pkg-0.4.23/src/catkin_pkg/python_setup.py
+@@ -99,9 +99,9 @@ def generate_distutils_setup(package_xml
+         data['url'] = package.urls[0].url
+ 
+     if len(package.description) <= 200:
+-        data['description'] = package.description
++        data['description'] = package.description.replace('\n', ' ')
+     else:
+-        data['description'] = package.description[:197] + '...'
++        data['description'] = package.description[:197].replace('\n', ' ') + 
'...'
+         data['long_description'] = package.description
+ 
+     data['license'] = ', '.join(package.licenses)

Reply via email to