HERA-Team/aipy

get_description() in setup.py returns a blank string

Closed this issue · 1 comments

aipy/setup.py

Lines 30 to 37 in 3a38449

def get_description():
lines = [L.strip() for L in open('README.md').readlines()]
d_start = None
for cnt, L in enumerate(lines):
if L.startswith('## Description'): d_start = cnt + 1
elif not d_start is None:
if len(L) == 0: return ' '.join(lines[d_start:cnt])
raise RuntimeError('Bad README')

Calling get_description() outputs ' '

Changing lines 35 & 36 to :

elif d_start is not None and L.startswith('##') is True:
    return ' '.join(lines[d_start:cnt])

Changes the output to:

' This package collects together tools for radio astronomical interferometry. In addition to pure-python phasing, calibration, imaging, and deconvolution code, this package includes interfaces to MIRIAD (a Fortran interferometry package) and HEALPix (a package for representing spherical data sets).  Instructions, documentation, and a FAQ may be found at [the aipy GitHub page](http://github.com/HERA-Team/aipy). '
pkgw commented

Thanks! I've submitted PR #47 which fixes this in a way that I find to be a bit more elegant. (FWIW, instead of x is True you can usually just write x.)