From 0071b4942e6fae9f716bce9386d618b5772b86b9 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sun, 25 Jun 2023 12:44:11 +0200 Subject: [PATCH] Add recipe support. --- SConscript | 179 +++++++++++++++++- .../__pycache__/recipe.cpython-311.pyc | Bin 0 -> 2074 bytes recipes/GitBranch/recipe.py | 26 +++ .../SDL/__pycache__/recipe.cpython-311.pyc | Bin 0 -> 2829 bytes recipes/SDL/recipe.py | 40 ++++ .../__pycache__/recipe.cpython-311.pyc | Bin 0 -> 928 bytes recipes/VulkanHeaders/recipe.py | 9 + .../mijin/__pycache__/recipe.cpython-311.pyc | Bin 0 -> 907 bytes recipes/mijin/recipe.py | 8 + requirements.txt | 1 + 10 files changed, 253 insertions(+), 10 deletions(-) create mode 100644 recipes/GitBranch/__pycache__/recipe.cpython-311.pyc create mode 100644 recipes/GitBranch/recipe.py create mode 100644 recipes/SDL/__pycache__/recipe.cpython-311.pyc create mode 100644 recipes/SDL/recipe.py create mode 100644 recipes/VulkanHeaders/__pycache__/recipe.cpython-311.pyc create mode 100644 recipes/VulkanHeaders/recipe.py create mode 100644 recipes/mijin/__pycache__/recipe.cpython-311.pyc create mode 100644 recipes/mijin/recipe.py create mode 100644 requirements.txt diff --git a/SConscript b/SConscript index 81e21dd..d096984 100644 --- a/SConscript +++ b/SConscript @@ -1,11 +1,91 @@ +import copy import os +def _cook(env: Environment, recipe_name: str, *args, **kwargs): + import importlib.util + for folder in env['RECIPES_FOLDERS']: + source_file = f'{folder.abspath}/{recipe_name}/recipe.py' + if os.path.exists(source_file): + break + if not source_file: + raise Exception(f'Could not find recipe {recipe_name}.') + spec = importlib.util.spec_from_file_location(recipe_name, source_file) + recipe = importlib.util.module_from_spec(spec) + spec.loader.exec_module(recipe) + return recipe.cook(env, *args, **kwargs) + +def _parse_lib_conf(env: Environment, lib_conf: dict) -> None: + env.Append(CPPPATH = lib_conf.get('CPPPATH', []), + CPPDEFINES = lib_conf.get('CPPDEFINES', []), + LIBPATH = lib_conf.get('LIBPATH', []), + LIBS = lib_conf.get('LIBS', [])) + +def _inject_list(kwargs: dict, dependency: dict, list_name: str) -> None: + if list_name not in dependency: + return + if list_name not in kwargs: + kwargs[list_name] = [] + kwargs[list_name].extend(dependency[list_name]) # TODO: eliminiate duplicates? + +def _inject_dependency(dependency, kwargs: dict) -> None: + if isinstance(dependency, dict): + _inject_list(kwargs, dependency, 'CPPPATH') + _inject_list(kwargs, dependency, 'CPPDEFINES') + _inject_list(kwargs, dependency, 'LIBPATH') + _inject_list(kwargs, dependency, 'LIBS') + +def _wrap_builder(builder, is_lib: bool = False): + def _wrapped(env, dependencies = [], *args, **kwargs): + if 'CPPPATH' not in kwargs: + kwargs['CPPPATH'] = copy.copy(env['CPPPATH']) + if 'CPPDEFINES' not in kwargs: + kwargs['CPPDEFINES'] = copy.copy(env['CPPDEFINES']) + if 'LIBPATH' not in kwargs: + kwargs['LIBPATH'] = copy.copy(env['LIBPATH']) + for dependency in dependencies: + _inject_dependency(dependency, kwargs) + result = builder(*args, **kwargs) + if is_lib: + # generate a new libconf + return { + 'CPPPATH': kwargs.get('CPPPATH', []), + 'CPPDEFINES': kwargs.get('CPPDEFINES', []), + 'LIBPATH': kwargs.get('LIBPATH', []), + 'LIBS': result + kwargs.get('LIBS', []), + '_target': result + } + return result + return _wrapped + +def _wrap_default(default): + def _wrapped(env, arg): + if isinstance(arg, dict) and '_target' in arg: + default(arg['_target']) + else: + default(arg) + return _wrapped + +def _find_system_cache_dir() -> str: + if os.name == 'posix': + if 'XDG_CACHE_HOME' in os.environ: + return os.environ['XDG_CACHE_HOME'] + else: + return os.path.join(os.environ['HOME'], '.cache') + elif os.name == 'nt': + # TODO: just guessing + return os.environ['LocalAppData'] + else: # fallback + return Dir('#cache').abspath + Import('config') if not config.get('PROJECT_NAME'): config['PROJECT_NAME'] = 'PROJECT' +if not config.get('PREPROCESSOR_PREFIX'): + config['PREPROCESSOR_PREFIX'] = config['PROJECT_NAME'].upper() # TODO: may be nicer? + AddOption( '--build_type', dest = 'build_type', @@ -53,24 +133,41 @@ variant = GetOption('variant') enable_asan = GetOption('enable_asan') config_file = GetOption('config_file') -env = Environment(tools = ['default', 'compilation_db']) +env = Environment(tools = ['default', 'compilation_db', 'unity_build']) +env['RECIPES_FOLDERS'] = [Dir('recipes')] +env['SYSTEM_CACHE_DIR'] = os.path.join(_find_system_cache_dir(), 'spp_cache') +env['CLONE_DIR'] = os.path.join(env['SYSTEM_CACHE_DIR'], 'cloned') + +print(f'Detected system cache directory: {env["SYSTEM_CACHE_DIR"]}') # allow compiling to variant directories (each gets their own bin/lib/cache dirs) if variant: - variant_dir = f'cache/variant/{variant}' - env['BIN_DIR'] = Dir(f'bin_{variant}').abspath - env['LIB_DIR'] = Dir(f'lib_{variant}').abspath - env['UNITY_CACHE_DIR'] = Dir(f'cache/variant/{variant}/unity') - env.Append(CPPDEFINES = [f'{config["PROJECT_NAME"]}_VARIANT={variant}']) + env['BIN_DIR'] = Dir(f'#bin_{variant}').abspath + env['LIB_DIR'] = Dir(f'#lib_{variant}').abspath + env['CACHE_DIR'] = Dir(f'#cache_{variant}').abspath + variant_dir = f'{env["CACHE_DIR"]}/variant' + env.Append(CPPDEFINES = [f'{config["PREPROCESSOR_PREFIX"]}_VARIANT={variant}']) else: variant_dir = None - env.CompilationDatabase() - env['BIN_DIR'] = Dir('bin').abspath - env['LIB_DIR'] = Dir('lib').abspath - env['UNITY_CACHE_DIR'] = Dir('cache/unity') + comp_db = env.CompilationDatabase(target = '#compile_commands.json') + Default(comp_db) + env['BIN_DIR'] = Dir('#bin').abspath + env['LIB_DIR'] = Dir('#lib').abspath + env['CACHE_DIR'] = Dir(f'#cache').abspath +env['UNITY_CACHE_DIR'] = Dir(f'{env["CACHE_DIR"]}/unity') env['BUILD_TYPE'] = build_type env.Append(LIBPATH = [env['LIB_DIR']]) # to allow submodules to link to each other without hassle +# create the cache dir +os.makedirs(env['CACHE_DIR'], exist_ok=True) +cache_gitignore = f'{env["CACHE_DIR"]}/.gitignore' +if not os.path.exists(cache_gitignore): + with open(cache_gitignore, 'w') as f: + f.write('*\n') + +# create the clone and system cache dirs +os.makedirs(env['CLONE_DIR'], exist_ok=True) + # try to detect what compiler we are using compiler_exe = os.path.basename(env['CC']) if 'gcc' in compiler_exe: @@ -89,4 +186,66 @@ elif unity_mode == 'stress': # compile everything in one single file to stress t env['UNITY_MAX_SOURCES'] = 100000 # I'll hopefully never reach this env['UNITY_MIN_FILES'] = 1 +# setup compiler specific options +if env['COMPILER_FAMILY'] == 'gcc' or env['COMPILER_FAMILY'] == 'clang': + env.Append(CCFLAGS = ['-Wall', '-Wextra', '-Werror', '-Wstrict-aliasing', '-pedantic']) + env.Append(CXXFLAGS = ['-std=c++20']) + if build_type != 'release': + env.Append(LINKFLAGS = [f'-Wl,-rpath,{env["LIB_DIR"]}']) + + env['LINKCOM'] = env['LINKCOM'].replace('$_LIBFLAGS', '-Wl,--start-group $_LIBFLAGS -Wl,--end-group') + if env['COMPILER_FAMILY'] == 'gcc': + # GCC complains about missing initializer for "" that doesn't exist :/ + # also GCC complains about some (compiler generated) fields in coroutines not having any linkage + # also -Wdangling-reference seems to produce a lot of false positives + env.Append(CCFLAGS = ['-Wno-missing-field-initializers', '-Wno-subobject-linkage', '-Wno-dangling-reference']) + else: + env.Append(CCFLAGS = ['-Wno-gnu-anonymous-struct']) + if build_type == 'debug': + env.Append(CCFLAGS = ['-g', '-O0'], CPPDEFINES = ['_GLIBCXX_DEBUG']) + elif build_type == 'release_debug' or build_type == 'profile': + env.Append(CCFLAGS = ['-Wno-unused-variable', '-Wno-unused-parameter', '-Wno-unused-but-set-variable', '-Wno-unused-local-typedef', '-Wno-unused-local-typedefs', '-g', '-O2'], CPPDEFINES = ['SEKIEI_RELEASE', 'NDEBUG']) + if build_type == 'profile': + if env['COMPILER_FAMILY'] == 'gcc': + env.Append(CPPDEFINES = ['SEKIEI_GCC_INSTRUMENTING=1']) + env.Append(CCFLAGS = ['-finstrument-functions']) + env.Append(LINKFLAGS = ['-rdynamic']) + + elif build_type == 'release': + env.Append(CCFLAGS = ['-Wno-unused-variable', '-Wno-unused-parameter', '-Wno-unused-but-set-variable', '-Wno-unused-local-typedef', '-Wno-unused-local-typedefs', '-O2'], CPPDEFINES = ['SEKIEI_RELEASE', 'NDEBUG']) + + if enable_asan: + env.Append(CCFLAGS = ['-fsanitize=address', '-fno-omit-frame-pointer']) + env.Append(LINKFLAGS = ['-fsanitize=address']) + +elif env['COMPILER_FAMILY'] == 'cl': + # C4201: nonstandard extension used : nameless struct/union - I use it and want to continue using it + # C4127: conditional expression is constant - some libs (CRC, format) don't compile with this enabled # TODO: fix? + env.Append(CCFLAGS = ['/W4', '/WX', '/wd4201', '/wd4127', '/std:c++20', '/permissive-', '/EHsc', '/FS', '/Zc:char8_t']) + env.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS']) # I'd like to not use MSVC specific versions of functions because they are "safer" ... + if build_type == 'debug': + env.Append(CCFLAGS = ['/Od', '/Zi'], LINKFLAGS = ' /DEBUG') + elif build_type == 'release_debug' or build_type == 'profile': + env.Append(CCFLAGS = ['/O2', '/Zi'], LINKFLAGS = ' /DEBUG') + else: + env.Append(CCFLAGS = ['/O2']) + +if env['COMPILER_FAMILY'] == 'gcc': + env.Append(CCFLAGS = ['-Wno-volatile']) +elif env['COMPILER_FAMILY'] == 'clang': + env.Append(CCFLAGS = ['-Wno-deprecated-volatile', '-Wno-nested-anon-types']) + +env.AddMethod(_cook, 'Cook') +env.AddMethod(_parse_lib_conf, 'ParseLibConf') +env.AddMethod(_wrap_builder(env.Library, is_lib = True), 'Library') +env.AddMethod(_wrap_builder(env.StaticLibrary, is_lib = True), 'StaticLibrary') +env.AddMethod(_wrap_builder(env.SharedLibrary, is_lib = True), 'SharedLibrary') +env.AddMethod(_wrap_builder(env.Program), 'Program') +env.AddMethod(_wrap_default(env.Default), 'Default') + +env.AddMethod(_wrap_builder(env.UnityProgram), 'UnityProgram') +env.AddMethod(_wrap_builder(env.UnityLibrary, is_lib = True), 'UnityLibrary') +env.AddMethod(_wrap_builder(env.UnityStaticLibrary, is_lib = True), 'UnityStaticLibrary') +env.AddMethod(_wrap_builder(env.UnitySharedLibrary, is_lib = True), 'UnitySharedLibrary') + Return('env') diff --git a/recipes/GitBranch/__pycache__/recipe.cpython-311.pyc b/recipes/GitBranch/__pycache__/recipe.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c130ec25c94d4b3955f57e16c364b37efe95f535 GIT binary patch literal 2074 zcmbtUO=ufO6rRg?=$Z)V_-BGdotBzHi6?yx_yx` zlU;#<^ch!5S>50=HE!_$1C@-CEm0n1v}D>ev%rd6o73$KqqAIP)LvjlPH9;!nD7m} zLa$!_``l_#Nd3MARSUUR2O}vP< zK^1o~yAn|x-&?xs4P+>bs3PA$i_-tQDZ9UWQlaCeBUjrQ)m;XO1bRK}9aY0U%B=wj z_G-Nq8SNeRzj41^R7dN@vcBwzL&(woI}VOojdoGG(guiIogu`llMx6NV(o>uPn8g4 z%X{tBYP>DI$w}DJ9C-sWdP`)r*P#9)j;2dcP0=enFg|(p%Ee6j@-;3)VQ_!uW|mQ| znoOV5jpd=shHmTGqQ0yfa|uvLh@!G|+hj|LS(7EE(vyj-op>#cTo+X-HZS`Z?AhVd zFI6~hxori!0@$Ua772B0D#df)bzdv*Ya5_U(|2%fR)eA)69vJr@2avoJlAT> zlo3E;N21kUPo+wLo=v5}P$N}lW`X8xD>Z)fXsVPYW{Os9%8YC=W#vr68ZH+X_DPD- zoL;6@3SPGhENkTQt(lSX5?6AjInR=CjyTKu8nR^t?Z)D3iw~Up&iZ&YTy^hl^PSrQv=k! zy}iFNI&kpO=;N{P#;S7lb2oAP>5*pxzh83GU(}|*+L}V_RKw59jir8?)N%A z<>FH{e5!$?55o7u_o8dj)#xq`u7w^>*6|@1AFAO)4IEy>J9uCl53C=l4sI^i@u-VO zYk2ep{$PEuDf_}|6Z!nA)dx5I%iwtp{i>Z0Tyv;cB_@(Q8S=8Hm9bDHBeat9 zGM0S|%j_T!9-bP95RXjdm|nJd=%R5;XQol2kk7JZLqZWfXM0io8NGrHhJA&9S4*C0h0OQ-2eap literal 0 HcmV?d00001 diff --git a/recipes/GitBranch/recipe.py b/recipes/GitBranch/recipe.py new file mode 100644 index 0000000..03bed71 --- /dev/null +++ b/recipes/GitBranch/recipe.py @@ -0,0 +1,26 @@ + +from git import Repo +from git.exc import GitError +import hashlib +import os +from SCons.Script import * + +def cook(env: Environment, repo_name: str, remote_url: str, git_ref: str = "main") -> dict: + repo_dir = os.path.join(env['CLONE_DIR'], 'git', repo_name, '_bare') + try: + repo = Repo(repo_dir) + origin = repo.remotes['origin'] + except GitError: + print(f'Initializing git repository for SDL at {repo_dir}.') + repo = Repo.init(repo_dir, bare=True) + origin = repo.create_remote('origin', remote_url) + worktree_dir = os.path.join(env['CLONE_DIR'], 'git', repo_name, hashlib.shake_128(git_ref.encode('utf-8')).hexdigest(6)) # TODO: commit hash would be better, right? + if not os.path.exists(worktree_dir): + print(f'Checking out into {worktree_dir}.') + origin.fetch() + os.makedirs(worktree_dir) + repo.git.worktree('add', worktree_dir, git_ref) + return { + 'checkout_root': worktree_dir + } + diff --git a/recipes/SDL/__pycache__/recipe.cpython-311.pyc b/recipes/SDL/__pycache__/recipe.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da8db11a4f65d25e5df66c1e735bd0c80dd25361 GIT binary patch literal 2829 zcmb^zOKcm*b(Z@jDN2+?TehXxO6|g7BZ{q?1acA?p+wmxEGvRU$En+fp>~$kQcEr| zyOd*w3W%Zy!7vcPFkm5Z5S?5F$w9{++FN^H0vmuBK!AZ9g4`ImMuD92W=Yzj69X}j z*_rp5dGp?z_ukI#KSH4Zf_8mq8-F1o^bKRWP3{m6-vr_=!U%H)y4J?rHO}LG*L;9| z2A@V)!Gb1WQ4_JGNjVA2e;2RGm|I3s|94E)LX@N2@2F7B>Lto+rFAOjbvr|}9F>S> zS4c_qbxbnU2ZM+4@Fjtnub~}ae%dgHeVDItUkUd??n@Z$w&AP!uz0k~q7A-=uylYI z>;u*ckLev|^CzvwW4R`Liazt*2gxrVOK*tJsYUr&EfV(QfX?ka_Wqy)y?*21Qy$3A z@IXAMqf0+S_UF$m*5qDW_c=H_jCR{lYKrxZ9qRH3;l9r4dgM4{AJAXumKCarIP_J2 zuLTa_0UXAIFoy04zbGEzUJV<5d+>=z1%H>u!#IKu;lp5cq~>Rt#7FQ^e5@uhy2j@M zcBCtdP$Af*duCZpdJQ}u?X5RB<+JRL)x;d%qvzMu{=%=J9qRA+FRZ^4PsKa%Ts0-( z@!tJ;?m73r`1Jl-0RJZM!zb_YaMhezp#BTGJwvi3b(QkV$@%JUS8cm&y&jLlZL?Zg znN-bU+|XAnY{X2GkAui0tVDV0CtBIel(I#Q28dQPZ7owF27!AK(U7{TscU8h?km%@ zX<+6`YCf4s|7mfKN-GuJz!|FOCCknlMuv)5TdCx$0k8tv&)~^y)!(6kJT$}P^-_Ku z7AMA4vy{{G<7v1Z73~AvvNPry6_ZQ@?O)Q2tKcY*3Ih{zS zW~bj?sD?We7ZXc!$?3PxpRbN|_oWs-pL z7oDm<7VCtEieTmprUFBhhqzE#FR4ZaYm_U3DtSINvzSO*}R%HdEp=y>zc~Sv!>xM-}A$nvC zKr~3$McGcWzzTq{3yn(cv`~LLxuA*$yZL1d%V#F%)rz89872i)(H6FElr^d_0k&?j zmwo(6`{8oD2(D%0$*irF;^13BQ*A3g`|`{2Viucm?E_mQrK}ORzy~W9X5MOz{g`yWXt zJap^&#~4!2NHG`M{w9rFI2Ji8Yj%tHgkKaA>UgLaaG5-W)mI@{5N9Ed=2I0Tk@Nd2&heqyPxI2G)erI%7YeZggBd<8aukJ?< zKc3YaktsJaG^4Gnmi3Xi+Z=yimdz$E&)9o!`oC8k*Y_54|XVyb|X%9UUc#ixC;`Nu# literal 0 HcmV?d00001 diff --git a/recipes/SDL/recipe.py b/recipes/SDL/recipe.py new file mode 100644 index 0000000..4097b90 --- /dev/null +++ b/recipes/SDL/recipe.py @@ -0,0 +1,40 @@ + +import os +import subprocess +import sys +from SCons.Script import * + +def cook(env: Environment, git_ref: str = "main") -> dict: + repo = env.Cook('GitBranch', repo_name = 'SDL', remote_url = 'https://github.com/libsdl-org/SDL.git', git_ref = git_ref) + checkout_root = repo['checkout_root'] + + config = env['BUILD_TYPE'] + build_dir = os.path.join(checkout_root, f'build_{config}') + install_dir = os.path.join(checkout_root, f'install_{config}') + lib_fname = { + 'debug': 'libSDL2d.a' + }.get(env['BUILD_TYPE'], 'libSDL2.a') # TODO: who cares about windows? + is_built = os.path.exists(os.path.join(build_dir, lib_fname)) # TODO! + if not is_built: + print(f'Building SDL, config {config}') + os.makedirs(build_dir, exist_ok=True) + build_type = { + 'debug': 'Debug', + 'release_debug': 'RelWithDebInfo', + 'release': 'Release', + 'profile': 'RelWithDebInfo' + }.get(env['BUILD_TYPE'], 'RelWithDebInfo') + subprocess.run(('cmake', '-G', 'Ninja', '-B', build_dir, f'-DCMAKE_BUILD_TYPE={build_type}', '-DSDL_STATIC=ON', '-DSDL_SHARED=OFF', f'-DCMAKE_INSTALL_PREFIX={install_dir}', checkout_root), stdout=sys.stdout, stderr=sys.stderr, check=True) + subprocess.run(('cmake', '--build', build_dir), stdout=sys.stdout, stderr=sys.stderr, check=True) + subprocess.run(('cmake', '--install', build_dir), stdout=sys.stdout, stderr=sys.stderr, check=True) + + + lib_name = { + 'debug': 'SDL2d' + }.get(env['BUILD_TYPE'], 'SDL2') + return { + 'LIBPATH': [os.path.join(install_dir, 'lib')], + 'CPPPATH': [os.path.join(install_dir, 'include')], + 'LIBS': [lib_name, 'm'] + } + diff --git a/recipes/VulkanHeaders/__pycache__/recipe.cpython-311.pyc b/recipes/VulkanHeaders/__pycache__/recipe.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ceaa869b270806b7100df42588898cc8b2877c57 GIT binary patch literal 928 zcmZ`%&ui2`6rLorn{M0nAVu3ARJ=%Ry8%x{MB3d-e`zW1qEL_}W~SYAlT4gUipmxj z5iDNxWJMJBRF(En{7bgb!!jqqlNVX3r=EPt?iQi=CG)*`kD2$r_ma=qY(E0b|9VRv zDG2?DogVb==4c!?+lU~dxM(G|s;iU`=_8n`Bt6j6%E$o!12E*Xkc zu1f4#jxROpZ%BR35oJzSWtvkFao<+EC1R6?rNKJ-2DFW8r~&pgh(c7N)s#KFgAv+= z)xoA(12H2#7j0^g0a`i@adHQt^|)e!#y`zAO}Iy zeM>Sk>xewJe7hpE_ae7y`E%4Fl!s5RRfGt_>!t}4s6-EQHuKEI3THkGXE}=kvvYi+ zdp-xp3{7S@4OrQ?JSzJ+^_ZaLh`T(Vl+4-{YFAkV17%D|-SKTVA{1t>7nYZor%Q82 zO5y@zRhga+0_qc~vQXl{5*3Npnd2Lnryx@&9ga)!EcjtOh)aOu`=&>UW0^CSpuQP! zwoYvknuW13)3XRO>0?2;Z@Fe@Ge4XN+^9n)r?wN&u-jC(r*1SCJdxN2S^PZIi3NlY zfa<6 dict: + repo = env.Cook('GitBranch', repo_name = 'VulkanHeaders', remote_url = 'https://github.com/KhronosGroup/Vulkan-Headers.git', git_ref = git_ref) + checkout_root = repo['checkout_root'] + env.Append(CPPPATH = [os.path.join(checkout_root, 'include')]) + return {} diff --git a/recipes/mijin/__pycache__/recipe.cpython-311.pyc b/recipes/mijin/__pycache__/recipe.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c3b3de988614bc1d39b459c40b8ae764728e3da GIT binary patch literal 907 zcmaJ=&1=*^6rV|EH{EX6gY-)e>NQq3wWm_5h+FMJtt%CUB9t^U+s!t~gvo5Jvc)}k zC|(p%+T$LiD(#_vMvq(Qp$rIuCvPkD)RQmCZczkZ@_ujLo0<3V3;9$i^dk^$WQ$fX zLf>PjCq{R1d<7Pph$4zTv=Cd(!;cW{ql9TR!*rTuq>`n^tIR@%;(27|e#BSjOsw!_ zmG$jNGNE)9tSV#Km5YK^R8}xq7lEU7i^L`is)HVX1lU9k)B^jjP)s$dH}EdmCJ60- zrn0Uzpq+C)7p?0u&ej!qdJdu5X}tAEw09Dr28^@~o$Z`%bc4QW^K$r4kP+A_JSiuff(rE@Wh86e)4OqWb4yJ92~@ zN~Q5gk1qsIVEbd*2yX7csq+q<8i zv`eCc&`W$r+nD@`(7>$rE5YW>(ctLT#lu0fdH-vE=)=a^4iS%HX2n@BY9L{vIG=Knza6Z)f(Jeeq|zfP6rrvoljgo4 zF$y=tFu+OQw9jeXV>iSFaN(ao(Nlnqjxqj*a?Rv9Lg(APw?lON5O+|F8!M@8l~TJW KQ~Q5Rs{aPLqvT2e literal 0 HcmV?d00001 diff --git a/recipes/mijin/recipe.py b/recipes/mijin/recipe.py new file mode 100644 index 0000000..67e6ac9 --- /dev/null +++ b/recipes/mijin/recipe.py @@ -0,0 +1,8 @@ + +import os +from SCons.Script import * + +def cook(env: Environment, git_ref: str = "master") -> dict: + repo = env.Cook('GitBranch', repo_name = 'mijin', remote_url = 'ssh://git@git.mewin.de:10022/mewin/mijin2.git', git_ref = git_ref) + checkout_root = repo['checkout_root'] + return SConscript(os.path.join(checkout_root, 'LibConf'), exports = ['env']) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5779f39 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +GitPython \ No newline at end of file