Skip to content

Commit

Permalink
fix: create version.py for package versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox committed Oct 6, 2020
1 parent 798e227 commit e9fb6f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 1 addition & 7 deletions google/cloud/storage/__init__.py
Expand Up @@ -31,13 +31,7 @@
machine).
"""

import pkg_resources

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

from google.cloud.storage import __version__
from google.cloud.storage.batch import Batch
from google.cloud.storage.blob import Blob
from google.cloud.storage.bucket import Bucket
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -22,7 +22,6 @@

name = "google-cloud-storage"
description = "Google Cloud Storage API client library"
version = "1.31.2"
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
Expand All @@ -41,6 +40,11 @@

package_root = os.path.abspath(os.path.dirname(__file__))

version = {}
with open("google/cloud/datastore/version.py") as fp:
exec(fp.read(), version)
version = version["__version__"]

readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
readme = readme_file.read()
Expand Down

0 comments on commit e9fb6f3

Please sign in to comment.