mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
directly use README.md for pypi, using new metadata options
* https://packaging.python.org/tutorials/packaging-projects/#description * https://packaging.python.org/specifications/core-metadata/#description-content-type-optional * https://blog.thea.codes/github-flavored-markdown-on-pypi/
This commit is contained in:
parent
dae73be4ab
commit
e986dcf985
1 changed files with 3 additions and 18 deletions
21
setup.py
21
setup.py
|
@ -4,7 +4,7 @@ from setuptools import Command
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,26 +49,11 @@ def get_data_files():
|
||||||
return data_files
|
return data_files
|
||||||
|
|
||||||
|
|
||||||
# PyPI accepts reST not Markdown
|
|
||||||
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:
|
|
||||||
readme = ''
|
|
||||||
|
|
||||||
setup(name='fdroidserver',
|
setup(name='fdroidserver',
|
||||||
version='1.0.5',
|
version='1.0.5',
|
||||||
description='F-Droid Server Tools',
|
description='F-Droid Server Tools',
|
||||||
long_description=readme,
|
long_description='README.md',
|
||||||
|
long_description_content_type='text/markdown',
|
||||||
author='The F-Droid Project',
|
author='The F-Droid Project',
|
||||||
author_email='team@f-droid.org',
|
author_email='team@f-droid.org',
|
||||||
url='https://f-droid.org',
|
url='https://f-droid.org',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue