@@ -162,37 +162,14 @@ def __init__(self):
162162 self .max_jobs_per_user = 10
163163 self .pdf_printing_allowed = False
164164
165- # Installed or from source?
166- # We declare we are running from installed if the program was
167- # NOT invoked through some python flavor, and the file is in
168- # the prefix (or real_prefix to accommodate virtualenvs).
169- bin_path = os .path .join (os .getcwd (), sys .argv [0 ])
170- bin_name = os .path .basename (bin_path )
171- bin_is_python = bin_name in ["ipython" , "python" , "python3" ]
172- bin_in_installed_path = bin_path .startswith (sys .prefix ) or (
173- hasattr (sys , 'real_prefix' )
174- and bin_path .startswith (sys .real_prefix ))
175- self .installed = bin_in_installed_path and not bin_is_python
176-
177- if self .installed :
178- self .log_dir = os .path .join ("/" , "var" , "local" , "log" , "cms" )
179- self .cache_dir = os .path .join ("/" , "var" , "local" , "cache" , "cms" )
180- self .data_dir = os .path .join ("/" , "var" , "local" , "lib" , "cms" )
181- self .run_dir = os .path .join ("/" , "var" , "local" , "run" , "cms" )
182- paths = [os .path .join ("/" , "usr" , "local" , "etc" , "cms.conf" ),
183- os .path .join ("/" , "etc" , "cms.conf" )]
184- else :
185- self .log_dir = "log"
186- self .cache_dir = "cache"
187- self .data_dir = "lib"
188- self .run_dir = "run"
189- paths = [os .path .join ("." , "config" , "cms.conf" )]
190- if '__file__' in globals ():
191- paths += [os .path .abspath (os .path .join (
192- os .path .dirname (__file__ ),
193- '..' , 'config' , 'cms.conf' ))]
194- paths += [os .path .join ("/" , "usr" , "local" , "etc" , "cms.conf" ),
195- os .path .join ("/" , "etc" , "cms.conf" )]
165+ self .log_dir = os .path .join ("/" , "var" , "local" , "log" , "cms" )
166+ self .cache_dir = os .path .join ("/" , "var" , "local" , "cache" , "cms" )
167+ self .data_dir = os .path .join ("/" , "var" , "local" , "lib" , "cms" )
168+ self .run_dir = os .path .join ("/" , "var" , "local" , "run" , "cms" )
169+ paths = [
170+ os .path .join ("/" , "usr" , "local" , "etc" , "cms.conf" ),
171+ os .path .join ("/" , "etc" , "cms.conf" ),
172+ ]
196173
197174 # Allow user to override config file path using environment
198175 # variable 'CMS_CONFIG'.
0 commit comments