Skip to content

Commit 2c0b932

Browse files
ntuckerowais
authored andcommitted
Check if autogenerated README exists, else use version tracked README (django-webpack#97)
1 parent 0d6ea78 commit 2c0b932

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ def rel(*parts):
88
'''returns the relative path to a file wrt to the current directory'''
99
return os.path.abspath(os.path.join(os.path.dirname(__file__), *parts))
1010

11-
README = open('README.rst', 'r').read()
11+
if os.path.isfile('README.rst'):
12+
README = open('README.rst', 'r').read()
13+
else:
14+
README = open('README.md', 'r').read()
1215

1316
with open(rel('webpack_loader', '__init__.py')) as handler:
1417
INIT_PY = handler.read()

0 commit comments

Comments
 (0)