|
1 | 1 | from setuptools import setup |
2 | 2 |
|
3 | | -# Convert README.md to README.rst because PyPI does not support Markdown. |
4 | | -try: |
5 | | - import pypandoc |
6 | | - long_description = pypandoc.convert('README.md', 'rst', format='md') |
7 | | -except: # noqa: E722 |
8 | | - # If unable to convert, try inserting the raw README.md file. |
9 | | - try: |
10 | | - with open('README.md', encoding="utf-8") as f: |
11 | | - long_description = f.read() |
12 | | - except: # noqa: E722 |
13 | | - # If all else fails, use some reasonable string. |
14 | | - long_description = 'BigQuery schema generator.' |
| 3 | +# Slurp in the README.md. PyPI finally supports Markdown, so we no longer need |
| 4 | +# to convert it to RST. |
| 5 | +with open('README.md', encoding="utf-8") as f: |
| 6 | + long_description = f.read() |
15 | 7 |
|
16 | 8 | # Read the version string from bigquery_schema_generator/version.py. |
17 | 9 | # See https://packaging.python.org/guides/single-sourcing-package-version/ |
|
27 | 19 | version=version_string, |
28 | 20 | description='BigQuery schema generator from JSON or CSV data', |
29 | 21 | long_description=long_description, |
| 22 | + long_description_content_type="text/markdown", |
30 | 23 | url='https://github.com/bxparks/bigquery-schema-generator', |
31 | 24 | author='Brian T. Park', |
32 | 25 | |
33 | 26 | license='Apache 2.0', |
34 | 27 | packages=['bigquery_schema_generator'], |
35 | | - python_requires='~=3.6', |
| 28 | + python_requires='>=3.6', |
36 | 29 | entry_points={ |
37 | 30 | 'console_scripts': [ |
38 | 31 | 'generate-schema = bigquery_schema_generator.generate_schema:main' |
|
0 commit comments