Skip to content

Commit

Permalink
[MAINT] Move long description logic from info.py to setup.py (#670)
Browse files Browse the repository at this point in the history
* Try python doc's approach

* Use existing variable for root_dir instead of defining new one

* Remove unused __longdesc__

* Fix over-indent

* Remove unused path
  • Loading branch information
notZaki authored Feb 3, 2021
1 parent 9516608 commit 14be852
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def main():
__maintainer__,
__license__,
__description__,
__longdesc__,
__url__,
DOWNLOAD_URL,
CLASSIFIERS,
Expand All @@ -38,6 +37,9 @@ def main():

root_dir = op.dirname(op.abspath(getfile(currentframe())))

with open(op.join(root_dir, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

version = None
cmdclass = {}
if op.isfile(op.join(root_dir, 'tedana', 'VERSION')):
Expand All @@ -53,7 +55,7 @@ def main():
name=__packagename__,
version=__version__,
description=__description__,
long_description=__longdesc__,
long_description=long_description,
author=__author__,
author_email=__email__,
maintainer=__maintainer__,
Expand Down
1 change: 0 additions & 1 deletion tedana/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
__url__,
__packagename__,
__description__,
__longdesc__
)

import warnings
Expand Down
3 changes: 0 additions & 3 deletions tedana/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"""
Base module variables
"""
from pathlib import Path
readme_path = Path(__file__).parent.parent.joinpath("README.md")

from ._version import get_versions
__version__ = get_versions()['version']
Expand All @@ -23,7 +21,6 @@
__packagename__ = 'tedana'
__description__ = ('TE-Dependent Analysis (tedana) of multi-echo functional '
'magnetic resonance imaging (fMRI) data.')
__longdesc__ = readme_path.open().read()

DOWNLOAD_URL = (
'https://github.com/ME-ICA/{name}/archive/{ver}.tar.gz'.format(
Expand Down

0 comments on commit 14be852

Please sign in to comment.