-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoof2.in
More file actions
46 lines (36 loc) · 1.67 KB
/
Copy pathoof2.in
File metadata and controls
46 lines (36 loc) · 1.67 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!@Python3_EXECUTABLE@
# -*- python -*-
####!@Python3_EXECUTABLE@ -W error
# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities associated
# with its operation, modification and maintenance. However, to
# facilitate maintenance we ask that before distributing modified
# versions of this software, you first contact the authors at
# oof_manager@nist.gov.
# This is the start-up script for oof2, created by cmake from oof2.in
# in the oof2 source distribution. It is installed as an executable
# file in the bin directory, *not* the python library. "import oof2"
# statements refer to the oof2 module in the library, not to this
# file.
import sys
import os
# This should make it unnecessary for users to set PYTHONPATH themselves.
sys.path.append("@CMAKE_INSTALL_PREFIX@/@SITE_PACKAGES@")
import oof2
sys.path.append(os.path.dirname(oof2.__file__))
# Test scripts sometimes need to know the location of the source
# (because file paths are part of some error messages). Setting an
# environment variable at run time is a simple way to make the value
# known even when oof is started in different ways.
os.environ["OOFSOURCEDIR"] = "@CMAKE_SOURCE_DIR@"
# All user input is evaluated in this environment, so first import
# useful things like the math library.
from math import *
# The real start-up code is in ooflib.common.oof. Until it is loaded,
# no modules containing oof C++ code can be used. Therefore, don't
# even try loading any other oof code (not even the debug module)
# before here!
from ooflib.common import oof
oof.run()
sys.exit()