Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version should be in setup.py and pulled from __init__ #190

Closed
sametmax opened this issue Dec 29, 2014 · 1 comment
Closed

Version should be in setup.py and pulled from __init__ #190

sametmax opened this issue Dec 29, 2014 · 1 comment

Comments

@sametmax
Copy link

Version is declared in init, and parsed with a regex in setup.py. You can make it cleaner byt declaring the version in setup.py normally, and add this to init :

try:
    __version__ = get_distribution('crossbar').version
except DistributionNotFound:
    __version__ = ('Unable to read this module metadata. ',
                   'Check manually the setup.py file for version.')
@oberstet
Copy link
Contributor

No, this is by design: get_distribution only works for installed Python packages, e.g. not when running from a directory (importing directly without installation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants