Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions messenger/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Open the configure file and start parsing
config = open(os.path.join(messenger_dir, 'local.cfg'), 'r')

for line in config.decode('utf-8'):
for line in config:
path = line.split('=')

if path[0] == "MATLAB_BIN":
Expand All @@ -47,20 +47,19 @@
lib_path = path[1].rstrip('\r\n')
if lib_path == "":
raise ValueError("Could not find zmq library. Please add its path to local.cfg")

print("zmq library found in " + lib_path)
print("zmq library found in " + lib_path)

config.close()

# Get the extension
if platform == 'win32':
extcmd = '"' + matlab_bin + "\\mexext.bat" + '"'
check_extension = subprocess.Popen(extcmd, stdout = subprocess.PIPE)
extension = check_extension.stdout.readline().rstrip('\r\n')
extension = check_extension.stdout.readline().decode('utf-8').rstrip('\r\n')
else:
extcmd = matlab_bin + "/mexext"
check_extension = subprocess.Popen(extcmd, stdout = subprocess.PIPE)
extension = check_extension.stdout.readline().rstrip('\r\n')
extension = check_extension.stdout.readline().decode('utf-8').rstrip('\r\n')

print("Building messenger." + extension + " ...")

Expand Down