psutil
psutil copied to clipboard
Add cross-platform build ability
Currently it is not possible to build psutil on MacOS for Linux target using external toolchain. It fails due to build script detects build host OS and changes build logic according to detected OS.
This patch allows to redefine os.name and sys.platform using ENV vars TARGET_OS_NAME and TARGET_SYS_PLATFORM. If these variables are not defined then os.name and sys.platform is used as it does currently.
Using this patch it is possible to compile psutil on MacOS with OpenWrt GCC Toolchain (OpenWrt is Linux).
Signed-off-by: Sergey V. Lobanov [email protected]
Summary
- OS: { Build OS: MacOS, Target OS: Linux }
- Bug fix: { yes }
- Type: { scripts }
- Fixes: { }
Description
Please see above