Skip to content
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
8 changes: 6 additions & 2 deletions google/cloud/bigtable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
"""Google Cloud Bigtable API package."""


from pkg_resources import get_distribution
import pkg_resources

try:
__version__ = pkg_resources.get_distribution("google-cloud-bigtable").version
except pkg_resources.DistributionNotFound:
__version__ = None

__version__ = get_distribution("google-cloud-bigtable").version

from google.cloud.bigtable.client import Client

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
from google.protobuf import field_mask_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable",
).version
try:
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable"
).version
except pkg_resources.DistributionNotFound:
_GAPIC_LIBRARY_VERSION = None


class BigtableInstanceAdminClient(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@
from google.protobuf import field_mask_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable",
).version
import pkg_resources

try:
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable"
).version
except pkg_resources.DistributionNotFound:
_GAPIC_LIBRARY_VERSION = None


class BigtableTableAdminClient(object):
Expand Down
9 changes: 6 additions & 3 deletions google/cloud/bigtable_v2/gapic/bigtable_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@
from google.cloud.bigtable_v2.proto import data_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable",
).version
try:
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable"
).version
except pkg_resources.DistributionNotFound:
_GAPIC_LIBRARY_VERSION = None


class BigtableClient(object):
Expand Down