Runtime#
This code is run when initializing the python interperter in a Relenv environment.
Point Relenv’s Openssl to the system installed Openssl certificate path
Make sure pip creates scripts with a shebang that points to the correct python using a relative path.
On linux, provide pip with the proper location of the Relenv toolchain gcc. This ensures when using pip any c dependencies are compiled against the proper glibc version.
- class relenv.runtime.RelenvImporter#
An importer to be added to
sys.meta_path
to handle importing into a relenv environment.- find_module(module_name, package_path=None)#
Find a module for importing into the relenv environment
- Parameters
module_name (str) – The name of the module
package_path (str, optional) – The path to the package, defaults to None
- Returns
The instance that called this method if it found the module, or None if it didn’t
- Return type
RelenvImporter or None
- load_module(name)#
Load the given module
- Parameters
name (str) – The module name to load
- Returns
The loaded module or the calling instance if importing sysconfigdata
- Return type
types.ModuleType or RelenvImporter
- relenv.runtime.bootstrap()#
Bootstrap the relenv environment.
- relenv.runtime.debug(string)#
Prints the provided message if RELENV_DEBUG is truthy in the environment.
- Parameters
string (str) – The message to print