Created
March 18, 2020 17:14
-
-
Save lighth7015/6747cc98c5f209087ff713bfcc7d1bcc to your computer and use it in GitHub Desktop.
sdk.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Wrapper for mesonbuild""" | |
import mesonbuild.mesonmain as sdk, sys, os, os.path as path | |
sdk_options = [ '--native-file', 'sdk/spec/system.txt', '--cross-file', 'sdk/spec/compiler.txt', 'build' ] | |
misc_params = sys.argv[1:] | |
sys.argv = list(( sys.argv[0], )) + sdk_options + misc_params | |
sys_path = os.environ['PATH'] | |
sdk_path = "%s/build" %( path.dirname(sys.path[ 0 ])) | |
sys_path = sys_path.split(':') | |
sys_path.insert( 1, sdk_path ) | |
os.environ['PATH'] = ':'.join(sys_path) | |
print(sys_path) | |
sdk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment