Skip to content

Commit

Permalink
Fix system path for pip install compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sravan953 committed Sep 16, 2019
1 parent 954560d commit 8b4fabc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -13,7 +13,7 @@

setuptools.setup(
name='virtual-scanner',
version='1.0.24',
version='1.0.26',
author='imr-framework',
author_email='imr.framework2018@gmail.com',
description='Virtual Scanner educational tool for MRI',
Expand Down
11 changes: 3 additions & 8 deletions virtualscanner/coms/coms_ui/coms_server_flask.py
Expand Up @@ -2,17 +2,13 @@

import os


def __modify_search_path():
if __name__ == '__main__':
import sys

script_path = os.path.abspath(__file__)
SEARCH_PATH = script_path[:script_path.index('virtual-scanner') + len('virtual-scanner') + 1]
SEARCH_PATH = script_path[:script_path.index('virtualscanner')]
sys.path.insert(0, SEARCH_PATH)


if __name__ == '__main__':
__modify_search_path()

from pathlib import Path

from flask import Flask, render_template, request, redirect, session
Expand Down Expand Up @@ -523,7 +519,6 @@ def launch_virtualscanner():
"""
Runs the server in the specified machine's local network address.
"""
__modify_search_path()
app.run(host='0.0.0.0', debug=True)


Expand Down
16 changes: 8 additions & 8 deletions virtualscanner/server/simulation/bloch/pulseq_bloch_simulator.py
Expand Up @@ -10,14 +10,14 @@
See beginning of the main section for explanations of the command line arguments (line 41-71)
"""
if __name__ == '__main__':
import os
import sys

script_path = os.path.abspath(__file__)
SEARCH_PATH = script_path[:script_path.index('virtual-scanner') + len('virtual-scanner') + 1]
sys.path.insert(0, SEARCH_PATH)

# if __name__ == '__main__':
# import os
# import sys
#
# script_path = os.path.abspath(__file__)
# SEARCH_PATH = script_path[:script_path.index('virtual-scanner') + len('virtual-scanner') + 1]
# sys.path.insert(0, SEARCH_PATH)
#
import matplotlib
import numpy as np

Expand Down

0 comments on commit 8b4fabc

Please sign in to comment.