reworked dependency layout

This commit is contained in:
Paul Fey 2025-07-05 13:52:37 +02:00
parent ac2f7c95e1
commit fd319dc470
2 changed files with 19 additions and 9 deletions

View file

@ -72,15 +72,20 @@ def build(path: str, output: str | None, should_compress: bool, compile_static:
os.chdir(src_directory)
package_dependencies = {}
if "dependencies" in information:
if "build_packages" in information["dependencies"]:
for package in information["dependencies"]["build_packages"]:
if "build" in information["dependencies"]:
if "packages" in information["dependencies"]["build"]:
for package in information["dependencies"]["build"]["packages"]:
if not package in []:
fail(f"The boundaries package {package} could not be found and is a build dependency")
if "build_commands" in information["dependencies"]:
for command in information["dependencies"]["build_commands"]:
fail(f"The rodeo package {package} could not be found or is not loaded.")
if "commands" in information["dependencies"]["build"]:
for command in information["dependencies"]["build"]["commands"]:
if shutil.which(command) is None:
fail(f"The command {command} could not be found and is a build dependency")
if "runtime" in information["dependencies"]:
package_dependencies = information["dependencies"]["runtime"]
if "web_sources" in information and isinstance(information["web_sources"], dict) and len(information["web_sources"]) > 0:
for org_url, org_path in information["web_sources"].items():
@ -121,6 +126,8 @@ def build(path: str, output: str | None, should_compress: bool, compile_static:
json_file["name"] = information["name"]
json_file["version"] = information["version"]
json_file["dependencies"] = package_dependencies
with open("rodeo-package.json", "wt") as f:
json.dump(json_file, f)

View file

@ -4,6 +4,9 @@
"version": "0.1",
"build": "bash build.sh",
"dependencies": {
"build_commands": ["pip"]
"build": { "commands": ["pip"] },
"runtime": {
"python": "*"
}
}
}