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

  • module_name (str) – The name of the module

  • package_path (str, optional) – The path to the package, defaults to None


The instance that called this method if it found the module, or None if it didn’t

Return type

RelenvImporter or None


Load the given module


name (str) – The module name to load


The loaded module or the calling instance if importing sysconfigdata

Return type

types.ModuleType or RelenvImporter


Bootstrap the relenv environment.


Prints the provided message if RELENV_DEBUG is truthy in the environment.


string (str) – The message to print