Skip to content

Commit

Permalink
Add check for readthedocs to setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JrGoodle committed Jun 28, 2020
1 parent a639488 commit aada5d2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
Setup file for clowder
"""

import os
from pathlib import Path
from setuptools import setup

# Written according to the docs at
# https://packaging.python.org/en/latest/distributing.html

repo_dir = Path(__file__).resolve().parent.parent.resolve()
process_readme_script = repo_dir / 'script' / 'process_readme.py'
exec(process_readme_script.read_text())
processed_readme = repo_dir / 'README-processed.md'
long_description = processed_readme.read_text()
if 'READTHEDOCS' in os.environ:
long_description = 'Utility for managing multiple git repositories'
else:
repo_dir = Path(__file__).resolve().parent.parent.resolve()
process_readme_script = repo_dir / 'script' / 'process_readme.py'
exec(process_readme_script.read_text())
processed_readme = repo_dir / 'README-processed.md'
long_description = processed_readme.read_text()

setup(
name='clowder-repo',
Expand Down

0 comments on commit aada5d2

Please sign in to comment.