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

Switch to setuptools_scm instead of versioneer #877

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions datacube/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@
db_username: cube_user

"""
from .version import __version__
from pkg_resources import get_distribution, DistributionNotFound

# Set up the version number first, since some deeper code depends on it
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
__version__ = "Unknown/Not Installed"

from .api import Datacube
from .config import set_options
import warnings
from .utils import xarray_geoextensions


# Ensure deprecation warnings from datacube modules are shown
warnings.filterwarnings('always', category=DeprecationWarning, module=r'^datacube\.')

__all__ = (Datacube, __version__, set_options, xarray_geoextensions)
Loading