Currently, the `get_srcdir()` function in cdefs.py tries to find the source directory by walking up the path from it's main module. However, this may not necessarily be located where the src directory actually is depending on how it is ran and imported. However, it also checks the `SRC_DIR` environment variable. This commit ensures this environment variable is always set based on the config, or an override environment variable. This way `cdefs.py` can always find the sources files it requires.