Skip to content

Commit

Permalink
Improve version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Jun 19, 2018
1 parent 3053735 commit b7de550
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Expand Up @@ -10,7 +10,8 @@
with open(os.path.join(ROOT, 'src', 'shellingham', '__init__.py')) as f:
for line in f:
if line.startswith('__version__ = '):
VERSION = ast.literal_eval(line[len('__version__ = '):])
VERSION = ast.literal_eval(line[len('__version__ = '):].strip())
break
if VERSION is None:
raise EnvironmentError('failed to read version')

Expand All @@ -23,7 +24,7 @@

# I don't know how to specify an empty key in setup.cfg.
package_data={
'': ['version.txt', 'LICENSE*', 'README*'],
'': ['LICENSE*', 'README*'],
},

# I need this to be dynamic.
Expand Down

0 comments on commit b7de550

Please sign in to comment.