-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathrelease.py
More file actions
22 lines (19 loc) · 610 Bytes
/
Copy pathrelease.py
File metadata and controls
22 lines (19 loc) · 610 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, with_statement
import os
import sys
try:
import pypandoc
except ImportError:
print('Please install pypandoc first, run pip install pypandoc.')
sys.exit()
rst = pypandoc.convert('README.md',
to='rst',
extra_args=["--wrap=none",
"--columns=200"],
format='markdown_github')
with open('README.rst', 'w+') as f:
f.write(rst.encode('utf-8'))
os.system("python setup.py release")
os.remove('README.rst')