@@ -71,6 +71,9 @@ def main():
7171 gather = subcommands .add_parser (
7272 "gather" , help = "Gather all the files for distribution"
7373 )
74+ release = subcommands .add_parser (
75+ "release" , help = "Build and package for a release"
76+ )
7477 path = subcommands .add_parser (
7578 "path" , help = "Print the path to a build or distribution directory"
7679 )
@@ -94,6 +97,7 @@ def main():
9497 make_host ,
9598 pythoninfo_host ,
9699 build_host ,
100+ release ,
97101 ):
98102 subcommand .add_argument (
99103 "--quiet" ,
@@ -133,7 +137,7 @@ def main():
133137 subcommand .add_argument (
134138 "args" , nargs = "*" , help = "Extra arguments to pass to `configure`"
135139 )
136- for subcommand in build , configure_host , build_host :
140+ for subcommand in build , configure_host , build_host , release :
137141 subcommand .add_argument (
138142 "--wasi-sdk" ,
139143 type = pathlib .Path ,
@@ -160,6 +164,7 @@ def main():
160164 gather ,
161165 package ,
162166 path ,
167+ release ,
163168 ):
164169 subcommand .add_argument (
165170 "--host-triple" ,
@@ -211,6 +216,15 @@ def main():
211216 case "package" :
212217 _package .gather (context )
213218 _package .archive (context )
219+ case "release" :
220+ context .args = ["--without-static-libpython" ]
221+ _build .clean_contents (context )
222+ _build .configure_build_python (context )
223+ _build .make_build_python (context )
224+ _build .configure_wasi_python (context )
225+ _build .make_wasi_python (context )
226+ _package .gather (context )
227+ _package .archive (context )
214228 case "path" :
215229 paths = {
216230 "build-python" : "build_python_path" ,
0 commit comments