summarylogtreecommitdiffstats
path: root/setuptools-replace-newlines-in-description.patch
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools-replace-newlines-in-description.patch')
-rw-r--r--setuptools-replace-newlines-in-description.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/setuptools-replace-newlines-in-description.patch b/setuptools-replace-newlines-in-description.patch
new file mode 100644
index 00000000000..9482d84150f
--- /dev/null
+++ b/setuptools-replace-newlines-in-description.patch
@@ -0,0 +1,31 @@
+--- catkin_pkg-0.4.24/src/catkin_pkg/python_setup.py
++++ catkin_pkg-0.4.24/src/catkin_pkg/python_setup.py
+@@ -58,7 +58,10 @@
+
+ The "description" is taken from the eponymous tag if it does not
+ exceed 200 characters. If it does "description" contains the
+- truncated text while "description_long" contains the complete.
++ truncated text while "long_description" contains the complete.
++
++ The description shouldn't contain newlines, remove them automatically
++ here and leave them in long_description.
+
+ All licenses are merged into the "license" field.
+
+@@ -98,10 +101,13 @@
+ elif package.urls:
+ data['url'] = package.urls[0].url
+
+- if len(package.description) <= 200:
+- data['description'] = package.description
++ description = package.description.replace('\n', ' ')
++ if len(description) <= 200:
++ data['description'] = description
+ else:
+- data['description'] = package.description[:197] + '...'
++ data['description'] = description[:197] + '...'
++
++ if data['description'] != package.description:
+ data['long_description'] = package.description
+
+ data['license'] = ', '.join(package.licenses)