Merge pull request #62 from devxpy/patch-2
Use a valid python package name instead of just NAME to find the __version__.py file
This commit is contained in:
commit
3e54227206
3
setup.py
3
setup.py
@ -48,7 +48,8 @@ except FileNotFoundError:
|
||||
# Load the package's __version__.py module as a dictionary.
|
||||
about = {}
|
||||
if not VERSION:
|
||||
with open(os.path.join(here, NAME, '__version__.py')) as f:
|
||||
project_slug = NAME.lower().replace("-", "_").replace(" ", "_")
|
||||
with open(os.path.join(here, project_slug, '__version__.py')) as f:
|
||||
exec(f.read(), about)
|
||||
else:
|
||||
about['__version__'] = VERSION
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user