[121189] branches/gsoc14-pip2port/pypi2port.py

gaurav at macports.org gaurav at macports.org
Thu Jun 19 12:44:08 PDT 2014


Revision: 121189
          https://trac.macports.org/changeset/121189
Author:   gaurav at macports.org
Date:     2014-06-19 12:44:08 -0700 (Thu, 19 Jun 2014)
Log Message:
-----------
Updated the regex on license to add matching hyphen

Modified Paths:
--------------
    branches/gsoc14-pip2port/pypi2port.py

Modified: branches/gsoc14-pip2port/pypi2port.py
===================================================================
--- branches/gsoc14-pip2port/pypi2port.py	2014-06-19 17:19:48 UTC (rev 121188)
+++ branches/gsoc14-pip2port/pypi2port.py	2014-06-19 19:44:08 UTC (rev 121189)
@@ -217,6 +217,8 @@
             license = license.split('\n')[0]
             license = re.sub(r'[\[\]\{\}\;\:\$\t\"\'\`\=(--)]+',' ',license)
             license = re.sub(r'\s(\s)+',' ',license)
+            license = re.sub(r'([A-Z]*)([a-z]*)([\s]*)([0-9]\.*[0-9]*)',r'\1\2-\4',license)
+            license = re.sub(r'v-','-',license)
             file.write('license             {0}\n'.format(license))
         else:
             file.write('license             {0}\n'.format(os.getenv('license','None')))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140619/97c249d6/attachment.html>


More information about the macports-changes mailing list