summarylogtreecommitdiffstats
path: root/setuptools-replace-newlines-in-description.patch
diff options
context:
space:
mode:
authorKartik Mohta2022-01-22 10:47:55 +0530
committerKartik Mohta2022-01-22 10:56:31 +0530
commitb9c95c7213118667bbaabf3a5fc3f762301efe4c (patch)
treee236fa61850786cafe58a6c74b9a63cce719326b /setuptools-replace-newlines-in-description.patch
parentcbb9fc51f8ec4533374cad1b7aa0b9b062a8c7b1 (diff)
downloadaur-b9c95c7213118667bbaabf3a5fc3f762301efe4c.tar.gz
Add patch for compatibility with new setuptools
From https://github.com/ros-infrastructure/catkin_pkg/pull/316
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 000000000000..9482d84150fc
--- /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)