v1.0 - cleanup
This commit is contained in:
parent
649b5c39d5
commit
7e1dc410b0
|
@ -79,8 +79,6 @@ def load_selected_libs(config_dir, arg_namespace, args, install_all_libs, ignore
|
||||||
if install_all_libs:
|
if install_all_libs:
|
||||||
for config_file in glob.glob(config_dir+"/*.json"):
|
for config_file in glob.glob(config_dir+"/*.json"):
|
||||||
data = load_lib_data(config_file)
|
data = load_lib_data(config_file)
|
||||||
#with open(cf, 'r') as f:
|
|
||||||
#data = json.load(f)
|
|
||||||
data['version'] = data['default version']
|
data['version'] = data['default version']
|
||||||
selected_libs.append(data)
|
selected_libs.append(data)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
# load library data from json file
|
# load library data from json file
|
||||||
def load_lib_data(lib_path):
|
def load_lib_data(lib_path):
|
||||||
with open (lib_path, 'r') as config_file:
|
with open (lib_path, 'r') as config_file:
|
||||||
|
|
27
libinstaller
27
libinstaller
|
@ -8,7 +8,7 @@ from lib.dependency import sort_libs_by_dependencies, load_selected_libs
|
||||||
from lib.installer import install_lib
|
from lib.installer import install_lib
|
||||||
from lib.init import init, check_python_version
|
from lib.init import init, check_python_version
|
||||||
|
|
||||||
SCRIPT_VERSION = "v0.9"
|
SCRIPT_VERSION = "v1.0"
|
||||||
|
|
||||||
# check if Python >=3.3.0 is used
|
# check if Python >=3.3.0 is used
|
||||||
check_python_version()
|
check_python_version()
|
||||||
|
@ -33,31 +33,6 @@ ignore_deps = arg_namespace.ignore_deps
|
||||||
|
|
||||||
# extract libraries and versions selected for installation
|
# extract libraries and versions selected for installation
|
||||||
selected_libs = load_selected_libs(config_dir, arg_namespace, args, install_all_libs, ignore_deps)
|
selected_libs = load_selected_libs(config_dir, arg_namespace, args, install_all_libs, ignore_deps)
|
||||||
'''
|
|
||||||
selected_libs = []
|
|
||||||
if install_all_libs:
|
|
||||||
for config_file in glob.glob(config_dir+"/*.json"):
|
|
||||||
data = load_lib_data(config_file)
|
|
||||||
#with open(cf, 'r') as f:
|
|
||||||
#data = json.load(f)
|
|
||||||
data['version'] = data['default version']
|
|
||||||
selected_libs.append(data)
|
|
||||||
else:
|
|
||||||
ignore_names = ["config", "mpi", "compiler", "prefix", "src", "work", "keep_work", "threads", "verbose", "version", "disable_shared"]
|
|
||||||
for lib_name in args:
|
|
||||||
if lib_name not in ignore_names and "version" not in lib_name:
|
|
||||||
install = getattr(arg_namespace, lib_name)
|
|
||||||
if install:
|
|
||||||
version = getattr(arg_namespace, lib_name+"_version")
|
|
||||||
config_file = config_dir + "/" + lib_name + ".json"
|
|
||||||
data = load_lib_data(config_file)
|
|
||||||
data['version'] = data['default version']
|
|
||||||
selected_libs.append(data)
|
|
||||||
#with open(config_file, 'r') as cf:
|
|
||||||
#data = json.load(cf)
|
|
||||||
#data['version'] = version
|
|
||||||
#selected_libs.append(data)
|
|
||||||
'''
|
|
||||||
|
|
||||||
# set up install directory name
|
# set up install directory name
|
||||||
compiler_version = get_compiler_version(compiler)
|
compiler_version = get_compiler_version(compiler)
|
||||||
|
|
Loading…
Reference in New Issue