X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=setup.py;fp=setup.py;h=4a68053674044a2989855d7c33c9372f9fab1c4d;hb=d4865ec0384cdf636bc05233358a199e9cfe170f;hp=15544732e01a20f1f29cc71093a4ca5cf09be4b4;hpb=7d4e354f25c8524ca0d24977ad3f3499ec9164e1;p=fdroidserver.git diff --git a/setup.py b/setup.py index 15544732..4a680536 100644 --- a/setup.py +++ b/setup.py @@ -12,15 +12,20 @@ else: data_prefix = '.' # PyPI accepts reST not Markdown -if shutil.which('pandoc'): - print('Using reST README') - import subprocess - readme = subprocess.check_output(['pandoc', '--from=markdown', '--to=rst', 'README.md'], - universal_newlines=True) +if os.path.exists('README.md'): + if shutil.which('pandoc'): + print('Using reST README') + import subprocess + subprocess.check_call(['pandoc', '--from=markdown', '--to=rst', 'README.md', + '--output=README.rst'], universal_newlines=True) + with open('README.rst') as fp: + readme = fp.read() + else: + print('Using Markdown README') + with open('README.md') as fp: + readme = fp.read() else: - print('Using Markdown README') - with open('README.md') as fp: - readme = fp.read() + readme = '' setup(name='fdroidserver', version='0.8',