-
Notifications
You must be signed in to change notification settings - Fork 750
Add __version__ #312
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
Add __version__ #312
Conversation
Ideally we would implement `__version__` as a property, but this requires `ModuleFunctionAttribute` to work. Since version is being implemented as a function, using `Version()` instead since __version__ is expected to be a property.
For reference, below is the alternative method I been using to detect the currently installed version. def pythonnet_version():
# Based from: http://stackoverflow.com/a/23885252
import pip
for x in pip.get_installed_distributions():
if x.key == "pythonnet":
return x.version |
Would it be simpler to add __version__ to clr.py (in src/runtime/resources)? Everything in that file gets added to the clr module in Initialize. A small change would be needed as currently Initialize ignores anything starting with an underscore. |
That would make more sense. Let me review and try that out. thanks! |
@tonyroberts thanks for the feedback, it worked |
It would be a lot nicer (and more future proof) if this information was taken during the build process from either a version file or the git repository (e.g. using https://github.com/warner/python-versioneer). |
I agree with @filmor - we need automated way of updating versions. One trigger (e.g. Github release tag) should make changes in setup.py and |
I agree, I was thinking along the same lines and was inclining towards bumpversion. In the interest of separations of concerns though, can we merge this |
If this PR does not conflict with either of these automated versioning
tools, then I agree - we can merge.
…On Sun, Jan 8, 2017, 3:17 PM Vik ***@***.***> wrote:
I agree, I was thinking along the same lines and was inclining towards
bumpversion <https://github.com/peritus/bumpversion>.
In the interest of separations of concerns though, can we merge this pr
and I'll open a ticket to add the automation.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#312 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5f3M5IseJXhnkAkkwsRBLdSWbEkaks5rQVJkgaJpZM4LdXBS>
.
|
Closes #67, #218.