orutherfurd / django-easyurls (http://rutherfurd.net/)
Making it easier to read and write Django URL patterns.
Clone this repository (size: 12.7 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/orutherfurd/django-easyurls/
| commit 2: | fb3781931b49 |
| parent 1: | 6bc650ee731f |
| branch: | default |
replace sourcecode directives w/literal blocks in long_description
Changed (Δ160 bytes):
raw changeset »
setup.py (6 lines added, 2 lines removed)
1 |
1 |
from distutils.core import setup |
2 |
import os, |
|
2 |
import os,re,sys |
|
3 |
3 |
|
4 |
4 |
sys.path.insert(0, os.path.dirname(__file__)) |
5 |
5 |
try: |
| … | … | @@ -7,6 +7,10 @@ try: |
7 |
7 |
finally: |
8 |
8 |
del sys.path[0] |
9 |
9 |
|
10 |
def _stripsourcecode(s): |
|
11 |
# replace sourcecode blocks with literal blocks |
|
12 |
return re.sub(r'\.\. sourcecode:: \w+', '::', s.strip()) |
|
13 |
||
10 |
14 |
setup( |
11 |
15 |
name='django-easyurls', |
12 |
16 |
description=easyurls.__doc__.strip().splitlines()[0], |
| … | … | @@ -24,6 +28,6 @@ setup( |
24 |
28 |
'Operating System :: OS Independent', |
25 |
29 |
'Programming Language :: Python', |
26 |
30 |
], |
27 |
long_description= |
|
31 |
long_description=_stripsourcecode(easyurls.__doc__), |
|
28 |
32 |
platforms=['any'], |
29 |
33 |
) |
