Skip to content

Commit 3b26b84

Browse files
committed
fix comparison between none and string
Signed-off-by: Ahmad Rezaii <[email protected]>
1 parent fe6cf54 commit 3b26b84

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tools/chapel-py/setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
)
5959
.decode(sys.stdout.encoding)
6060
.strip()
61-
.splitlines()
6261
)
6362

6463
CXXFLAGS = []
@@ -81,7 +80,7 @@
8180
"-lChplFrontendShared",
8281
]
8382

84-
if chpl_install_lib_path is not None:
83+
if chpl_install_lib_path != 'None':
8584
LDFLAGS += [
8685
"-L{}".format(chpl_install_lib_path),
8786
"-Wl,-rpath,{}".format(chpl_install_lib_path),

util/chplenv/chpl_home_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ def get_chpl_configured_install_lib_prefix():
8383
chpl_prefix = None
8484
with open(os.path.join(chpl_home, "configured-prefix"), "r") as f:
8585
chpl_prefix = f.read().strip()
86-
assert chpl_prefix is not None
86+
# Problems with the configured-prefix file - maybe empty
87+
assert chpl_prefix != "" and chpl_prefix is not None
8788
return os.path.join(
8889
chpl_prefix,
8990
"lib",
9091
"chapel",
9192
chpl_version_string,
9293
"compiler",
9394
)
95+
return None
9496

9597
@memoize
9698
def get_chpl_version_from_install():

0 commit comments

Comments
 (0)