Skip to content

Commit

Permalink
Fix setup, checking if the entry_points section is present.
Browse files Browse the repository at this point in the history
When the example `[entry_points]` section from the package template is
removed from the `setup.cfg`, this breaks.
  • Loading branch information
saimn committed Apr 24, 2017
1 parent 07aa316 commit d691911
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@
# Define entry points for command-line scripts
entry_points = {'console_scripts': []}

entry_point_list = conf.items('entry_points')
for entry_point in entry_point_list:
entry_points['console_scripts'].append('{0} = {1}'.format(entry_point[0],
entry_point[1]))
if conf.has_section('entry_points'):
entry_point_list = conf.items('entry_points')
for entry_point in entry_point_list:
entry_points['console_scripts'].append('{0} = {1}'.format(
entry_point[0], entry_point[1]))

# Include all .c files, recursively, including those generated by
# Cython, since we can not do this in MANIFEST.in with a "dynamic"
Expand Down

0 comments on commit d691911

Please sign in to comment.