Exemple #1
0
if "EDNA_HOME" in os.environ:
    if os.environ["EDNA_HOME"] != strEdnaHome:
        print("Warning: EDNA_HOME redefined to %s" % strEdnaHome)
        os.environ["EDNA_HOME"] = strEdnaHome
else:
    os.environ["EDNA_HOME"] = strEdnaHome
sys.path.append(os.path.join(os.environ["EDNA_HOME"], "kernel", "src"))
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller
from EDVerbose import EDVerbose


if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % installDir)
    install = EDUtilsLibraryInstaller(installDir, strArchiveName)
    install.checkPythonVersion()
    install.downloadLibrary()
    install.dependency("numpy", "20090405-Numpy-1.3")
    install.unZipArchive()
    try:
        install.buildSources()
    except Exception:
        EDVerbose.ERROR("Error in the build")
    install.installBuilt()
    if not EDVerbose.isVerboseDebug():
        install.cleanSources()

else:
    EDVerbose.ERROR("This installer program is not made to be imported, please just run it")
Exemple #2
0
        compilerEXE = numpy.distutils.fcompiler.find_executable("g95")
    if compilerEXE is None:
        EDVerbose.ERROR("No Fortran compiler found among g77, gfortran, g95")
    return compilerEXE


if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % scipyLibrary)
    install = EDUtilsLibraryInstaller(installDir, scipyLibrary)
    install.checkPythonVersion()
    install.getArchitecture()
    install.downloadLibrary()
    install.getArchiveName()
    install.dependency("numpy",
                       numpyDir,
                       _tupleVersion=(1, 3, 0),
                       _strMethodToGetVersion="version.version")
    numpyFullPath = os.path.join(os.environ["EDNA_HOME"], "libraries",
                                 numpyDir, install.getArchitecture())
    if os.path.isdir(numpyFullPath):
        sys.path.insert(1, numpyFullPath)
        if "PYTHONPATH" in os.environ:
            os.environ["PYTHONPATH"] = numpyFullPath + os.pathsep + os.environ[
                "PYTHONPATH"]
        else:
            os.environ["PYTHONPATH"] = numpyFullPath

    # Set the lapack library corresponding to the fortran compiler
    fortranCompiler = getFortranCompiler()
    lapackLibrary = lapackLibrary_gfortran
    if fortranCompiler.find("g77") != -1:
Exemple #3
0
if ("EDNA_HOME" in os.environ):
    if (os.environ["EDNA_HOME"] != strEdnaHome):
        print("Warning: EDNA_HOME redefined to %s" % strEdnaHome)
        os.environ["EDNA_HOME"] = strEdnaHome
else:
    os.environ["EDNA_HOME"] = strEdnaHome
sys.path.append(os.path.join(os.environ["EDNA_HOME"], "kernel", "src"))
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller
from EDVerbose import EDVerbose

if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % installDir)
    install = EDUtilsLibraryInstaller(installDir, strArchiveName)
    install.checkPythonVersion()
    install.downloadLibrary()
    install.dependency("numpy", "20090405-Numpy-1.3")
    install.unZipArchive()
    try:
        install.buildSources()
    except Exception:
        EDVerbose.ERROR("Error in the build")
    install.installBuilt()
    if not EDVerbose.isVerboseDebug():
        install.cleanSources()

else:
    EDVerbose.ERROR(
        "This installer program is not made to be imported, please just run it"
    )
Exemple #4
0
    if compilerEXE is None:
        compilerEXE = numpy.distutils.fcompiler.find_executable("g95")
    if compilerEXE is None:
        EDVerbose.ERROR("No Fortran compiler found among g77, gfortran, g95")
    return  compilerEXE


if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % scipyLibrary)
    install = EDUtilsLibraryInstaller(installDir, scipyLibrary)
    install.checkPythonVersion()
    install.getArchitecture()
    install.downloadLibrary()
    install.getArchiveName()
    install.dependency("numpy", numpyDir, _tupleVersion=(1, 4, 0), _strMethodToGetVersion="version.version")
    numpyFullPath = os.path.join(os.environ["EDNA_HOME"], "libraries", numpyDir, install.getArchitecture())
    if os.path.isdir(numpyFullPath):
        sys.path.insert(1, numpyFullPath)
        if "PYTHONPATH" in os.environ:
            os.environ["PYTHONPATH"] = numpyFullPath + os.pathsep + os.environ["PYTHONPATH"]
        else:
                    os.environ["PYTHONPATH"] = numpyFullPath

    fortranCompiler = getFortranCompiler()
    installBlas = EDUtilsLibraryInstaller(installDir, blasLibrary)
    blasPath = installBlas.searchCLib(libblas)
    installLapack = EDUtilsLibraryInstaller(installDir, lapackLibrary)
    lapackPath = installLapack.searchCLib(liblapack)

    if blasPath is None or lapackPath is None: