We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9261c18 commit 886ab82Copy full SHA for 886ab82
1 file changed
setup.py
@@ -14,6 +14,7 @@
14
15
import os
16
import re
17
+import runpy
18
import sys
19
import shutil
20
import platform
@@ -131,8 +132,9 @@ def build_extension(self, ext):
131
132
# README file as long_description.
133
long_description = open("README.md", encoding="utf-8").read()
134
-__version__ = ""
135
-exec(open("qsimcirq/_version.py").read())
+__version__ = runpy.run_path("qsimcirq/_version.py")["__version__"]
136
+if not __version__:
137
+ raise ValueError("Version string cannot be empty")
138
139
setup(
140
name="qsimcirq",
0 commit comments