summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 615f6d7b..3a8dab59 100755
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,7 @@ import platform
import re
import shutil
import struct
+import subprocess
import sys
import tempfile
import warnings
@@ -98,9 +99,15 @@ macros.append(('PSUTIL_VERSION', int(VERSION.replace('.', ''))))
def get_description():
- README = os.path.join(HERE, 'README.rst')
- with open(README, 'r') as f:
- return f.read()
+ script = os.path.join(HERE, "scripts", "internal", "convert_readme.py")
+ readme = os.path.join(HERE, 'README.rst')
+ p = subprocess.Popen([sys.executable, script, readme],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ raise RuntimeError(stderr)
+ assert not stderr, stderr
+ return stdout.decode('utf8')
@contextlib.contextmanager