configure.py.template (875B)
1 # This configure.py file is places in the public domain. 2 3 # Configure the build directory. 4 # This file is invoked by './configure' and should usually not be invoked 5 # manually. 6 7 import talerbuildconfig as tbc 8 import sys 9 import shutil 10 11 if getattr(tbc, "serialversion", 0) < 2: 12 print("talerbuildconfig outdated, please update the build-common submodule and/or bootstrap") 13 sys.exit(1) 14 15 b = tbc.BuildConfig() 16 17 # Enable the --prefix option 18 b.enable_prefix() 19 20 # Enable generation of the "config.mk" include file for the main "Makefile" 21 b.enable_configmk() 22 23 # Declare dependencies 24 b.add_tool(tbc.PosixTool("find")) 25 b.add_tool(tbc.NodeJsTool(version_spec=">=12")) 26 b.add_tool(tbc.GenericTool("npm")) 27 b.add_tool(tbc.GenericTool("pnpm", hint="Use 'sudo npm install -g pnpm' to install.")) 28 29 b.run() 30 31 print("copying Makefile") 32 shutil.copyfile("build-system/Makefile", "Makefile")