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
        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
from EDUtilsPlatform            import EDUtilsPlatform

numpyLibrary = "numpy-1.5.1.tar.gz"

if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % numpyLibrary)
    install = EDUtilsLibraryInstaller(installDir, numpyLibrary)
    install.checkPythonVersion()
    install.getArchitecture()
    install.downloadLibrary()
    install.getArchiveName()
    install.unZipArchive()
    install.buildSources()
    install.installBuilt()
    install.installSources()

    # Install f2py by hand !!!!    
    install.installGeneric(None, os.path.join("numpy", "f2py", "src"))

    install.installGeneric(None, os.path.join("numpy", "core", "include"))

#Install npymath by hand
Exemple #3
0
strEdnaHome = dirname(dirname(dirname(os.path.abspath(sys.argv[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  (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(strEdnaHome, "kernel", "src"))
from EDUtilsLibraryInstaller    import EDUtilsLibraryInstaller
from EDVerbose                  import EDVerbose


strLibrary = "SpecClient.tar.bz2"


if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % strLibrary)
    install = EDUtilsLibraryInstaller(installDir, strLibrary)
    install.checkPythonVersion()
    install.getArchitecture()
    install.downloadLibrary()
    install.getArchiveName()
    install.unZipArchive()
    install.buildSources()
    install.installBuilt()
    install.cleanSources()

else:
    print("This installer program is not made to be imported, please just run it")

Exemple #5
0
        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
from EDUtilsPlatform import EDUtilsPlatform

numpyLibrary = "numpy-1.5.1.tar.gz"

if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % numpyLibrary)
    install = EDUtilsLibraryInstaller(installDir, numpyLibrary)
    install.checkPythonVersion()
    install.getArchitecture()
    install.downloadLibrary()
    install.getArchiveName()
    install.unZipArchive()
    install.buildSources()
    install.installBuilt()
    install.installSources()

    # Install f2py by hand !!!!
    install.installGeneric(None, os.path.join("numpy", "f2py", "src"))

    install.installGeneric(None, os.path.join("numpy", "core", "include"))

    #Install npymath by hand
__copyright__ = "2010, ESRF, Grenoble"

import os, sys

from EDVerbose import EDVerbose
from EDAssert import EDAssert
from EDTestCasePluginExecute import EDTestCasePluginExecute
from EDFactoryPluginStatic import EDFactoryPluginStatic
EDFactoryPluginStatic.loadModule("XSDataPhotov1")
from XSDataPhotov1 import XSDataInputExecDcrawv1, XSDataResultExecDcrawv1
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller, installLibrary

################################################################################
# AutoBuilder for PIL
################################################################################
architecture = EDUtilsLibraryInstaller.getArchitecture()
imagingPath = os.path.join(os.environ["EDNA_HOME"], "libraries",
                           "20091115-PIL-1.1.7", architecture)

###############################################################################
# Import the right version of PIL
###############################################################################
pydictModulesBeforePIL = sys.modules.copy()
try:
    import Image
except Exception:
    if os.path.isdir(imagingPath) and (imagingPath not in sys.path):
        sys.path.insert(1, imagingPath)
    else:
        installLibrary(imagingPath)
    import Image
from EDVerbose                  import EDVerbose
from EDUtilsLibraryInstaller    import EDUtilsLibraryInstaller
from EDUtilsParallel            import  EDUtilsParallel

h5pyLibrary = "h5py-1.3.0.tar.gz"
hdf5Library = "hdf5-1.8.5.tar.bz2"
laFile = "libhdf5.la"

EDVerbose.DEBUG("h5pyLibrary = " + h5pyLibrary)
EDVerbose.DEBUG("hdf5Library = " + hdf5Library)
EDVerbose.DEBUG("laFile = " + laFile)

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:
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
__author__ = "Jerome Kieffer"
__contact__ = "*****@*****.**"
__license__ = "GPLv3+"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"

import os, sys
from EDTestSuite import EDTestSuite
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller, installLibrary

################################################################################
# AutoBuilder for Numpy, PIL and Fabio
################################################################################
architecture = EDUtilsLibraryInstaller.getArchitecture()
fabioPath = os.path.join(os.environ["EDNA_HOME"], "libraries", "Fabio-r5080", architecture)
imagingPath = os.path.join(os.environ["EDNA_HOME"], "libraries", "20091115-PIL-1.1.7", architecture)
numpyPath = os.path.join(os.environ["EDNA_HOME"], "libraries", "20090405-Numpy-1.3", architecture)


###############################################################################
# Import the right version of PIL
###############################################################################
pydictModulesBeforePIL = sys.modules.copy()

try:
    import Image
except Exception:
    if os.path.isdir(imagingPath) and (imagingPath not in sys.path):
        sys.path.insert(1, imagingPath)
Exemple #9
0
        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 EDVerbose import EDVerbose
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller
from EDUtilsParallel import EDUtilsParallel

strLibrary = "PyFFTW3-0.2.1.tar.gz"

if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % strLibrary)
    install = EDUtilsLibraryInstaller(installDir, strLibrary)
    install.checkPythonVersion()
    install.downloadLibrary()
    install.getArchiveName()
    install.unZipArchive()
    install.buildSources()
    install.installBuilt()
    install.cleanSources()

#if os.name == "nt":
#    fftw - 3.2.2.pl1 - dll32.zip
#elif os.name == "posix":
#    fftwLibrary = "hdf5-1.8.5.tar.bz2"
#else:
#    fftwLibrary = None
#laFile = "libfftw3.so"
Exemple #10
0
def getFortranCompiler():
    import numpy.distutils.fcompiler
    compilerEXE = numpy.distutils.fcompiler.find_executable("g77")
    if compilerEXE is None:
        compilerEXE = numpy.distutils.fcompiler.find_executable("gfortran")
    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, 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"]
Exemple #11
0
def getFortranCompiler():
    import numpy.distutils.fcompiler
    compilerEXE = numpy.distutils.fcompiler.find_executable("g77")
    if compilerEXE is None:
        compilerEXE = numpy.distutils.fcompiler.find_executable("gfortran")
    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)
        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"], "edna-kernel", "src"))
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller
from EDVerbose import EDVerbose
from EDUtilsPlatform import EDUtilsPlatform

numpyLibrary = "numpy-1.4.1.tar.gz"

if __name__ == "__main__":
    installDir = os.path.abspath(sys.argv[0]).split(os.sep)[-2]
    EDVerbose.screen("Building %s" % numpyLibrary)
    install = EDUtilsLibraryInstaller(installDir, numpyLibrary)
    install.checkPythonVersion()
    install.getArchitecture()
    install.downloadLibrary()
    install.getArchiveName()
    install.unZipArchive()
    install.buildSources()
    install.installBuilt()
    install.installSources()

    # Install f2py by hand !!!!
    install.installGeneric(None, os.path.join("numpy", "f2py", "src"))

    install.installGeneric(None, os.path.join("numpy", "core", "include"))

    # Install npymath by hand
Exemple #13
0
from EDVerbose import EDVerbose
from EDUtilsLibraryInstaller import EDUtilsLibraryInstaller
from EDUtilsParallel import EDUtilsParallel

h5pyLibrary = "h5py-1.3.0.tar.gz"
hdf5Library = "hdf5-1.8.5.tar.bz2"
laFile = "libhdf5.la"

EDVerbose.DEBUG("h5pyLibrary = " + h5pyLibrary)
EDVerbose.DEBUG("hdf5Library = " + hdf5Library)
EDVerbose.DEBUG("laFile = " + laFile)

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")
Exemple #14
0
def getFortranCompiler():
    import numpy.distutils.fcompiler
    compilerEXE = numpy.distutils.fcompiler.find_executable("g77")
    if compilerEXE is None:
        compilerEXE = numpy.distutils.fcompiler.find_executable("gfortran")
    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)