Skip to content

Commit

Permalink
fix: use full path and os.path to version.py in setup.py (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox committed Oct 6, 2020
1 parent 1b16907 commit 0f5506f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Expand Up @@ -22,10 +22,6 @@

name = "google-cloud-datastore"
description = "Google Cloud Datastore API client library"
version = {}
with open("google/cloud/datastore/version.py") as fp:
exec(fp.read(), version)
version = version["__version__"]

# Should be one of:
# 'Development Status :: 3 - Alpha'
Expand All @@ -43,6 +39,11 @@

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

version = {}
with open(os.path.join(package_root, "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 0f5506f

Please sign in to comment.