Skip to content

Instantly share code, notes, and snippets.

@lighth7015
Created March 18, 2020 17:14
Show Gist options
  • Save lighth7015/6747cc98c5f209087ff713bfcc7d1bcc to your computer and use it in GitHub Desktop.
Save lighth7015/6747cc98c5f209087ff713bfcc7d1bcc to your computer and use it in GitHub Desktop.
sdk.py
#!/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