diff --git a/chaind/setup.py b/chaind/setup.py index 0f9d5a7..ef069b5 100644 --- a/chaind/setup.py +++ b/chaind/setup.py @@ -9,6 +9,7 @@ from xdg.BaseDirectory import ( xdg_data_dirs, get_runtime_dir, load_first_config, + save_config_path, ) @@ -27,14 +28,21 @@ class Environment: base_config_dir = load_first_config('chaind') self.runtime_dir = os.path.join(get_runtime_dir(), 'chaind') self.data_dir = os.path.join(xdg_data_dirs[0], 'chaind') - self.config_dir = env.get('CONFINI_DIR', os.path.join(base_config_dir)) + self.config_dir = env.get('CONFINI_DIR', base_config_dir) + if self.config_dir == None: + save_config_path('chaind') + self.config_dir = load_first_config('chaind') self.session_runtime_dir = os.path.join(self.runtime_dir, self.session) if domain: self.runtime_dir = os.path.join(self.runtime_dir, domain) + os.makedirs(self.runtime_dir, exist_ok=True) self.data_dir = os.path.join(self.data_dir, domain) + os.makedirs(self.data_dir, exist_ok=True) self.config_dir = os.path.join(self.config_dir, domain) + os.makedirs(self.config_dir, exist_ok=True) self.session_runtime_dir = os.path.join(self.runtime_dir, self.session) + os.makedirs(self.session_runtime_dir, exist_ok=True) @property def session(self): diff --git a/requirements.txt b/requirements.txt index a6baf1e..1781b63 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -chainlib>0.0.4,<=0.0.5 -chainqueue>=0.0.3a1,<=.0.0.4 -chainsyncer>0.0.4a1,<=0.0.5 +chainlib>=0.0.5a4,<=0.0.5 +chainqueue>=0.0.3a1,<=0.0.3 +chainsyncer>=0.0.4a1,<=0.0.4 confini>=0.3.6rc3,<0.5.0 pyxdg~=0.26