File tree Expand file tree Collapse file tree 4 files changed +26
-11
lines changed Expand file tree Collapse file tree 4 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 15
15
"""Google Cloud Bigtable API package."""
16
16
17
17
18
- from pkg_resources import get_distribution
18
+ import pkg_resources
19
+
20
+ try :
21
+ __version__ = pkg_resources .get_distribution ("google-cloud-bigtable" ).version
22
+ except pkg_resources .DistributionNotFound :
23
+ __version__ = None
19
24
20
- __version__ = get_distribution ("google-cloud-bigtable" ).version
21
25
22
26
from google .cloud .bigtable .client import Client
23
27
Original file line number Diff line number Diff line change 49
49
from google .protobuf import field_mask_pb2
50
50
51
51
52
- _GAPIC_LIBRARY_VERSION = pkg_resources .get_distribution (
53
- "google-cloud-bigtable" ,
54
- ).version
52
+ try :
53
+ _GAPIC_LIBRARY_VERSION = pkg_resources .get_distribution (
54
+ "google-cloud-bigtable"
55
+ ).version
56
+ except pkg_resources .DistributionNotFound :
57
+ _GAPIC_LIBRARY_VERSION = None
55
58
56
59
57
60
class BigtableInstanceAdminClient (object ):
Original file line number Diff line number Diff line change 54
54
from google .protobuf import field_mask_pb2
55
55
56
56
57
- _GAPIC_LIBRARY_VERSION = pkg_resources .get_distribution (
58
- "google-cloud-bigtable" ,
59
- ).version
57
+ import pkg_resources
58
+
59
+ try :
60
+ _GAPIC_LIBRARY_VERSION = pkg_resources .get_distribution (
61
+ "google-cloud-bigtable"
62
+ ).version
63
+ except pkg_resources .DistributionNotFound :
64
+ _GAPIC_LIBRARY_VERSION = None
60
65
61
66
62
67
class BigtableTableAdminClient (object ):
Original file line number Diff line number Diff line change 36
36
from google .cloud .bigtable_v2 .proto import data_pb2
37
37
38
38
39
- _GAPIC_LIBRARY_VERSION = pkg_resources .get_distribution (
40
- "google-cloud-bigtable" ,
41
- ).version
39
+ try :
40
+ _GAPIC_LIBRARY_VERSION = pkg_resources .get_distribution (
41
+ "google-cloud-bigtable"
42
+ ).version
43
+ except pkg_resources .DistributionNotFound :
44
+ _GAPIC_LIBRARY_VERSION = None
42
45
43
46
44
47
class BigtableClient (object ):
You can’t perform that action at this time.
0 commit comments