Module EDUtilsLibraryInstaller :: Class EDUtilsLibraryInstaller
[hide private]
[frames] | no frames]

Class EDUtilsLibraryInstaller

source code

This class helps to install to install an external library within EDNA

Instance Methods [hide private]
 
__init__(self, _strLibraryDirectory, _strArchiveName=None, _strSourceDir=None)
Constructor of the class EDUtilsLibraryInstaller,
source code
 
dependency(self, _strLibraryName, _strLibraryDirectory, _tupleVersion=None, _strMethodToGetVersion=None)
Tries to resolve a dependency on an external library like numpy
source code
python string
getArchiveName(self)
Tries to guess the name of the archive from it's extension
source code
 
unZipArchive(self)
Uncompress the archived installer by using tar or zip
source code
 
cleanSources(self)
Remove the source tree and clean up the installation directory to save some place
source code
 
buildSources(self, _strOptions='')
Runs the setup.py to install the program within EDNA
source code
 
installGeneric(self, _strPrefix, _strStartSubDir=None)
Install/Move the source/build/prefix to the library directory very specific to EDNA
source code
 
installBuilt(self)
Install/Move the source/build/arch to the library directory very specific to EDNA
source code
 
installSources(self)
Install/Move the source/build/src.arch to the library directory very specific to EDNA
source code
 
configure(self, _strOptions='')
Run the configure program to configure the set-up
source code
 
make(self, _strOptions='')
Run the make program configure program to compile the library
source code
 
downloadLibrary(self, _strServer='http://www.edna-site.org/pub/libraries')
Download the given library from edna-site by default or another server if provided.
source code
string
getDestinationDirectory(self)
Getter for the distinationDirectory:
source code
string
getSourceDirectory(self)
Getter for the source directory:
source code
string
getLibraryDirectory(self)
Getter for the Libary Path:
source code
Static Methods [hide private]
 
checkPythonVersion()
Checks that we are using at least python2.5 as zip and tarfiles modules are required to uncompress archive even if those modules exists since python2.3 their API has changed in python2.5.
source code
string or None
searchCLib(_strLibName)
Search in the LD_PRELOAD, LD_LIBRARY_PATH and subsequently in /etc/ld.so.conf & /etc/ld.so.conf.d/* for a library named
source code
string
getArchitecture()
here only fro compatibility reason ...
source code
Class Variables [hide private]
  iMAX_DOWNLOAD_TIME = 60
Method Details [hide private]

__init__(self, _strLibraryDirectory, _strArchiveName=None, _strSourceDir=None)
(Constructor)

source code 

Constructor of the class EDUtilsLibraryInstaller,

Parameters:
  • _strLibraryDirectory (python string) - the name of the directory where the library is, like "20090711-SciPy-0.7.1"
  • _strArchiveName (python string) - the name of the archive file. if None, the system will try to guess it, searching in _strLibraryDirectory for a tar.gz, tar.bz2 or a .zip
  • _strSourceDir (python string) - the name of the directory where the setup.py file is, this could be guessed as well is None.

dependency(self, _strLibraryName, _strLibraryDirectory, _tupleVersion=None, _strMethodToGetVersion=None)

source code 

Tries to resolve a dependency on an external library like numpy

Parameters:
  • _strLibraryName (Python string) - name of the library, "numpy" for example
  • _strLibraryDirectory (Python string) - the name of the directory where the dependency library is, like "20090405-Numpy-1.3"
  • _tupleVersion - the minimum version of the library to be installed.
  • _strMethodToGetVersion (string) - for numpy it would be "version.version"

searchCLib(_strLibName)
Static Method

source code 

Search in the LD_PRELOAD, LD_LIBRARY_PATH and subsequently in /etc/ld.so.conf & /etc/ld.so.conf.d/* for a library named

Parameters:
  • _strLibName (python string) - name of the file or library to look for
Returns: string or None
the name of the path where the library is (or None if it was not found

getArchiveName(self)

source code 

Tries to guess the name of the archive from it's extension

Returns: python string
Name of the archive

buildSources(self, _strOptions='')

source code 

Runs the setup.py to install the program within EDNA

Parameters:
  • _strOptions (python string) - options to be passed to setup.py (beside build)

installGeneric(self, _strPrefix, _strStartSubDir=None)

source code 

Install/Move the source/build/prefix to the library directory very specific to EDNA

Parameters:
  • _strPrefix (string) - prefix of the path like "build/lib.linux-x86_64-2.5"
  • _strStartSubDir (string) - prefix of the path like "numpy/core/include/numpy"

configure(self, _strOptions='')

source code 

Run the configure program to configure the set-up

Parameters:
  • _strOptions (python string) - options to be passed to configure

make(self, _strOptions='')

source code 

Run the make program configure program to compile the library

Parameters:
  • _strOptions (python string) - options to be passed to make program

downloadLibrary(self, _strServer='http://www.edna-site.org/pub/libraries')

source code 

Download the given library from edna-site by default or another server if provided.

Parameters:
  • _strServer (python string) - optionally, the name of the server

getDestinationDirectory(self)

source code 

Getter for the distinationDirectory:

Returns: string
/$EDNA_HOME/libraries/libName/lib.linux-x86_64-2.x

getSourceDirectory(self)

source code 

Getter for the source directory:

Returns: string
/$EDNA_HOME/libraries/libName/myLib/

getLibraryDirectory(self)

source code 

Getter for the Libary Path:

Returns: string
....

getArchitecture()
Static Method

source code 

here only fro compatibility reason ... please use EDUtilsPlatform.architecture

@return lib.linux-i386-2.6

Returns: string