-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
28 lines (22 loc) · 858 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import yaml
import os
print()
print("Setting up paths.")
print()
print("To use this, make sure you fill out 'paths.yaml'")
print("You'll need to know the location of Crystal, Crystal's properties component, QWalk,")
print("and the PySCF library if you want to use any of them in autogen.")
print("Use absolute paths where possible.")
print()
curpaths={}
keys=['crystal','Pcrystal','properties','Pproperties','qwalk','pyscf']
input_paths=yaml.load(open('paths.yaml'))
for key in sorted(keys):
if key in input_paths and os.path.exists(input_paths[key]):
path=input_paths[key]
curpaths[key]=path
else:
print("Didn't find path for %s, either update it in paths.json, or avoid using it with autogen."%key)
with open('autopaths.py','w') as outf:
outf.write('paths={}'.format(curpaths))
print("Done. autopaths.py should now be up-to-date.")