[120935] branches/gsoc14-pip2port/tester.py
gaurav at macports.org
gaurav at macports.org
Wed Jun 11 14:17:51 PDT 2014
Revision: 120935
https://trac.macports.org/changeset/120935
Author: gaurav at macports.org
Date: 2014-06-11 14:17:51 -0700 (Wed, 11 Jun 2014)
Log Message:
-----------
Added regex for updating long description
Modified Paths:
--------------
branches/gsoc14-pip2port/tester.py
Modified: branches/gsoc14-pip2port/tester.py
===================================================================
--- branches/gsoc14-pip2port/tester.py 2014-06-11 21:08:04 UTC (rev 120934)
+++ branches/gsoc14-pip2port/tester.py 2014-06-11 21:17:51 UTC (rev 120935)
@@ -21,6 +21,7 @@
import textwrap
import string
import shutil
+import re
client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
@@ -236,11 +237,12 @@
# file.write('long_description '+dict['description']+'\n\n')
description = dict['description']
if description:
- description = string.replace(description,';',' ')
- description = string.replace(description,'[',' ')
- description = string.replace(description,']',' ')
- description = string.replace(description,'{',' ')
- description = string.replace(description,'}',' ')
+# description = string.replace(description,';',' ')
+# description = string.replace(description,'[',' ')
+# description = string.replace(description,']',' ')
+# description = string.replace(description,'{',' ')
+# description = string.replace(description,'}',' ')
+ description = re.sub(r'[\[\]\{\}\;\:\$]',' ',description)
# lines = textwrap.wrap(dict['description'],width=70)
lines = textwrap.wrap(description,width=70)
file.write('long_description ')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140611/e975ac4b/attachment.html>
More information about the macports-changes
mailing list