Skip to content

Commit 0f5506f

Browse files
authored
fix: use full path and os.path to version.py in setup.py (#97)
1 parent 1b16907 commit 0f5506f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222

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

3026
# Should be one of:
3127
# 'Development Status :: 3 - Alpha'
@@ -43,6 +39,11 @@
4339

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

42+
version = {}
43+
with open(os.path.join(package_root, "google/cloud/datastore/version.py")) as fp:
44+
exec(fp.read(), version)
45+
version = version["__version__"]
46+
4647
readme_filename = os.path.join(package_root, "README.rst")
4748
with io.open(readme_filename, encoding="utf-8") as readme_file:
4849
readme = readme_file.read()

0 commit comments

Comments
 (0)