File: InstallInfo.tmpl

package info (click to toggle)
esys-particle 2.3.5%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,132 kB
  • sloc: cpp: 81,480; python: 5,872; makefile: 1,259; sh: 313; perl: 225
file content (50 lines) | stat: -rw-r--r-- 1,323 bytes parent folder | download | duplicates (6)
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
47
48
49
50
"""
Provides install path infomation.
"""
import os
from esys.lsm.util.pathSearcher import PathSearcher

installDir   = "{0:s}"
binDir       = os.path.join(installDir, "bin")
libDir       = os.path.join(installDir, "lib")

pythonPkgDir = "{1:s}"
esysPkgDir   = os.path.join(pythonPkgDir, "esys")
lsmPkgDir    = os.path.join(esysPkgDir, "lsm")

pkgName      = "{2:s}"
version      = "{3:s}"
pkgHomePageUrl = "{4:s}"
pkgDataDir   = "{5:s}"
povrayExe    = "{6:s}"

_haveVtk     = {7:s}
_havePovray  = {8:s}

def getPovrayExePath():
    """
    Attempts to return the absolute path of the "povray" executable
    using the "PATH" environment variable. If the exe can't be found
    on the "PATH" then this function returns the "povray" path which
    was found during installation. This function is a workaround for
    for the SGI MPT mpirun, which seems to alter the user "PATH"
    environment.
    """
    absPath=PathSearcher().find("povray")
    if ((absPath == None) or (absPath == "")):
        absPath = povrayExe

    return absPath

def getDataFilePath(dataFileName):
    """
    Returns path for specified data file. Looks on path
    C{{L{{pkgDataDir}}:Data:.}}
    """
    return PathSearcher(pkgDataDir+":Data:.").which(dataFileName)

def haveVtk():
    return _haveVtk

def havePovray():
    return _havePovray