diff options
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 |