mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:42 +01:00
ensure QUACK_ROOT is defined
This commit is contained in:
parent
52894ba30e
commit
3552975cee
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import os
|
import os, sys
|
||||||
import argparse
|
import argparse
|
||||||
import pyscf
|
import pyscf
|
||||||
from pyscf import gto
|
from pyscf import gto
|
||||||
@ -8,6 +8,10 @@ import numpy as np
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
#Find the value of the environnement variable QUACK_ROOT. If not present we use the current repository
|
#Find the value of the environnement variable QUACK_ROOT. If not present we use the current repository
|
||||||
|
if "QUACK_ROOT" not in os.environ:
|
||||||
|
print("Please set the QUACK_ROOT environment variable, for example:\n")
|
||||||
|
print("$ export QUACK_ROOT={0}".format(os.getcwd()))
|
||||||
|
sys.exit(1)
|
||||||
QuAcK_dir=os.environ.get('QUACK_ROOT','./')
|
QuAcK_dir=os.environ.get('QUACK_ROOT','./')
|
||||||
|
|
||||||
#Create the argument parser object and gives a description of the script
|
#Create the argument parser object and gives a description of the script
|
||||||
|
Loading…
Reference in New Issue
Block a user