create osbuild package
This commit is contained in:
parent
70aeaec9ed
commit
23680736bb
3 changed files with 8 additions and 10 deletions
|
|
@ -1,11 +1,8 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import osbuild
|
||||
import subprocess
|
||||
import sys
|
||||
import osbuild
|
||||
|
||||
|
||||
RESET = "\033[0m"
|
||||
|
|
@ -13,7 +10,7 @@ BOLD = "\033[1m"
|
|||
RED = "\033[31m"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Build operating system images")
|
||||
parser.add_argument("pipeline_path", metavar="PIPELINE",
|
||||
help="json file containing the pipeline that should be built")
|
||||
|
|
@ -22,7 +19,7 @@ if __name__ == "__main__":
|
|||
help="the directory where intermediary os trees are stored")
|
||||
requiredNamed = parser.add_argument_group('required named arguments')
|
||||
requiredNamed.add_argument("-o", "--output", dest="output_dir", metavar="DIRECTORY", type=os.path.abspath,
|
||||
help="provide the empty DIRECTORY as output argument to the last stage", required=True)
|
||||
help="provide the empty DIRECTORY as output argument to the last stage", required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
with open(args.pipeline_path) as f:
|
||||
9
setup.py
9
setup.py
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import glob
|
||||
import setuptools
|
||||
|
||||
|
|
@ -6,11 +5,13 @@ setuptools.setup(
|
|||
name="osbuild",
|
||||
version="1",
|
||||
description="A build system for OS images",
|
||||
py_modules=["osbuild"],
|
||||
packages=["osbuild"],
|
||||
entry_points={
|
||||
"console_scripts": ["osbuild = osbuild.executable:main"]
|
||||
},
|
||||
data_files=[
|
||||
("/usr/bin", ["osbuild"]),
|
||||
("/usr/lib/osbuild", ["osbuild-run"]),
|
||||
("/usr/lib/osbuild/stages", glob.glob("./stages/*")),
|
||||
("/usr/lib/osbuild/assemblers", glob.glob("./assemblers/*"))
|
||||
]
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue