Exemplo n.º 1
0
if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % installDir)
    installHDF5 = EDUtilsLibraryInstaller(installDir, hdf5Library)
    hdfPath = installHDF5.searchCLib(laFile)
    if hdfPath is None:
        print
        installHDF5.checkPythonVersion()
        installHDF5.getArchitecture()
        installHDF5.downloadLibrary()
        installHDF5.unZipArchive()
        pthreadPath = installHDF5.searchCLib("libpthread.so")
        EDVerbose.DEBUG("Libpthread found in %s" % pthreadPath)
        if pthreadPath is None:
            try:
                installHDF5.configure("--prefix=%s" % (installHDF5.getDestinationDirectory()))
            except:
                EDVerbose.ERROR("Error in the configure step, no pthread")
        else:
            try:
                installHDF5.configure("--prefix=%s --enable-threadsafe --with-pthread=%s" % (installHDF5.getDestinationDirectory(), pthreadPath))
            except:
                EDVerbose.ERROR("Error in the configure step, with pthread")
        try:
            installHDF5.make("-j %i" % EDUtilsParallel.detectNumberOfCPUs())
        except:
            EDVerbose.ERROR("Error in the 'make' step")

        try:
            installHDF5.make("install")
        except:
Exemplo n.º 2
0
if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % installDir)
    installHDF5 = EDUtilsLibraryInstaller(installDir, hdf5Library)
    hdfPath = installHDF5.searchCLib(laFile)
    if hdfPath is None:
        print
        installHDF5.checkPythonVersion()
        installHDF5.getArchitecture()
        installHDF5.downloadLibrary()
        installHDF5.unZipArchive()
        pthreadPath = installHDF5.searchCLib("libpthread.so")
        EDVerbose.DEBUG("Libpthread found in %s" % pthreadPath)
        if pthreadPath is None:
            try:
                installHDF5.configure("--prefix=%s" %
                                      (installHDF5.getDestinationDirectory()))
            except Exception:
                EDVerbose.ERROR("Error in the configure step, no pthread")
        else:
            try:
                installHDF5.configure(
                    "--prefix=%s --enable-threadsafe --with-pthread=%s" %
                    (installHDF5.getDestinationDirectory(), pthreadPath))
            except Exception:
                EDVerbose.ERROR("Error in the configure step, with pthread")
        try:
            installHDF5.make("-j %i" % EDUtilsParallel.detectNumberOfCPUs())
        except Exception:
            EDVerbose.ERROR("Error in the 'make' step")

        try: