Skip to content

Commit

Permalink
Add get_long_description()
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Mar 1, 2019
1 parent 4fe472f commit 894b3ba
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,10 @@
import subprocess
import sys

import github2pypi


version = '3.7.3'


if not hasattr(github2pypi, '__file__'):
print('Please update submodule:\n\n\tgit submodule update --init')
sys.exit(1)


with open('README.md') as f:
long_description = github2pypi.replace_url(
slug='wkentaro/gdown', content=f.read()
)


if sys.argv[1] == 'release':
if not distutils.spawn.find_executable('twine'):
print(
Expand All @@ -46,13 +33,27 @@
sys.exit(0)


def get_long_description():
with open('README.md') as f:
long_description = f.read()

try:
import github2pypi
except ImportError:
return long_description

return github2pypi.replace_url(
slug='wkentaro/gdown', content=long_description
)


setup(
name='gdown',
version=version,
packages=find_packages(),
install_requires=['filelock', 'requests', 'six', 'tqdm'],
description='Google Drive direct download of big files.',
long_description=long_description,
long_description=get_long_description(),
long_description_content_type='text/markdown',
author='Kentaro Wada',
author_email='[email protected]',
Expand Down

0 comments on commit 894b3ba

Please sign in to comment.