feat: add replication again
feat: non existent config folder
This commit is contained in:
parent
207199adc9
commit
11eb31af98
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "libs/replication"]
|
||||
path = libs/replication
|
||||
[submodule "multi_user/libs/replication"]
|
||||
path = multi_user/libs/replication
|
||||
url = git@gitlab.com:slumber/replication.git
|
||||
|
@ -35,6 +35,7 @@ def save_config(config):
|
||||
import yaml
|
||||
|
||||
logger.info("saving config")
|
||||
|
||||
with open(CONFIG, 'w') as outfile:
|
||||
yaml.dump(config, outfile, default_flow_style=False)
|
||||
|
||||
@ -65,6 +66,9 @@ def install_package(name):
|
||||
subprocess.run([str(PYTHON_PATH), "-m", "pip", "install",
|
||||
name, '--target', target], cwd=SUBPROCESS_DIR)
|
||||
|
||||
def check_dir(dir):
|
||||
if not os.path.exists(dir):
|
||||
os.makedirs(dir)
|
||||
|
||||
def setup(dependencies, python_path):
|
||||
global PYTHON_PATH, SUBPROCESS_DIR
|
||||
@ -72,6 +76,9 @@ def setup(dependencies, python_path):
|
||||
PYTHON_PATH = Path(python_path)
|
||||
SUBPROCESS_DIR = PYTHON_PATH.parent
|
||||
|
||||
check_dir(CACHE_DIR)
|
||||
check_dir(CONFIG_DIR)
|
||||
|
||||
if not module_can_be_imported("pip"):
|
||||
install_pip()
|
||||
|
||||
|
1
multi_user/libs/replication
Submodule
1
multi_user/libs/replication
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7eecb7fe4689649741aa69fff7ef6ec7c0a6ec52
|
Loading…
Reference in New Issue
Block a user