Commits

Ollie Rutherfurd committed fb37819

replace sourcecode directives w/literal blocks in long_description

  • Participants
  • Parent commits 6bc650e

Comments (0)

Files changed (1)

 from distutils.core import setup
-import os,sys
+import os,re,sys
 
 sys.path.insert(0, os.path.dirname(__file__))
 try:
 finally:
     del sys.path[0]
 
+def _stripsourcecode(s):
+    # replace sourcecode blocks with literal blocks
+    return re.sub(r'\.\. sourcecode:: \w+', '::', s.strip())
+
 setup(
     name='django-easyurls',
     description=easyurls.__doc__.strip().splitlines()[0],
         'Operating System :: OS Independent',
         'Programming Language :: Python',
     ],
-    long_description=easyurls.__doc__,
+    long_description=_stripsourcecode(easyurls.__doc__),
     platforms=['any'],
 )