-
Notifications
You must be signed in to change notification settings - Fork 78
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
Provide __version__ attribute #31
Comments
@shoyer I'm using zest.releaser for version management and they suggest adding this snippet to
in order to still keep one single master version in |
I'm sure that would work fine.
…On Mon, Nov 12, 2018 at 2:57 AM Alessandro Amici ***@***.***> wrote:
@shoyer <https://github.com/shoyer> I'm using zest.releaser
<https://zestreleaser.readthedocs.io/en/stable/> for version management
and they suggest
<https://zestreleaser.readthedocs.io/en/stable/versions.html#using-the-version-number-in-setup-py-or-setup-cfg-as-version>
adding this snippet to cfgrib/__init__.py:
import pkg_resources
__version__ = pkg_resources.get_distribution('cfgib').version
in order to still keep one single master version in setup.py. Would that
work for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABKS1mPR4S9C0jwBSH_CGAgZxRsV6M7Gks5uuVQLgaJpZM4YYsW5>
.
|
Ok, things got a bit more complicated than that, but now Will be in the next release. |
That was too fast. Current |
versioneer is one commonly used tool for this: https://github.com/warner/python-versioneer (We use it in xarray, pandas and dask) |
Looks like I could implement the single-sourcing the package version using method 1 of: https://packaging.python.org/guides/single-sourcing-package-version/ Trying to close again. |
It's a convention for Python projects to set the
__version__
attribute to a string representing the current version. This facilitates debugging and version checking by downstream projects (e.g., xarray).The text was updated successfully, but these errors were encountered: