diff --git a/.gitignore b/.gitignore index 3bccb197..dda5ae97 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ env/ fdroidserver.egg-info/ pylint.parseable /.testfiles/ -docs/html/ +README.rst # files generated by tests tmp/ diff --git a/MANIFEST.in b/MANIFEST.in index 031fccc6..10f4c7ce 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -27,7 +27,7 @@ include examples/template.yml include fdroid include LICENSE include makebuildserver -include README.md +include README.rst include tests/androguard_test.py include tests/bad-unicode-*.apk include tests/build.TestCase 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',