@@ -73,6 +73,9 @@ def main():
7373 gather = subcommands .add_parser (
7474 "gather" , help = "Gather all the files for distribution"
7575 )
76+ release = subcommands .add_parser (
77+ "release" , help = "Build and package for a release"
78+ )
7679 path = subcommands .add_parser (
7780 "path" , help = "Print the path to a build or distribution directory"
7881 )
@@ -96,6 +99,7 @@ def main():
9699 make_host ,
97100 pythoninfo_host ,
98101 build_host ,
102+ release ,
99103 ):
100104 subcommand .add_argument (
101105 "--quiet" ,
@@ -135,7 +139,7 @@ def main():
135139 subcommand .add_argument (
136140 "args" , nargs = "*" , help = "Extra arguments to pass to `configure`"
137141 )
138- for subcommand in build , configure_host , build_host :
142+ for subcommand in build , configure_host , build_host , release :
139143 subcommand .add_argument (
140144 "--wasi-sdk" ,
141145 type = pathlib .Path ,
@@ -162,6 +166,7 @@ def main():
162166 gather ,
163167 package ,
164168 path ,
169+ release ,
165170 ):
166171 subcommand .add_argument (
167172 "--host-triple" ,
@@ -213,6 +218,15 @@ def main():
213218 case "package" :
214219 _package .gather (context )
215220 _package .archive (context )
221+ case "release" :
222+ context .args = ["--without-static-libpython" ]
223+ _build .clean_contents (context )
224+ _build .configure_build_python (context )
225+ _build .make_build_python (context )
226+ _build .configure_wasi_python (context )
227+ _build .make_wasi_python (context )
228+ _package .gather (context )
229+ _package .archive (context )
216230 case "path" :
217231 paths = {
218232 "build-python" : "build_python_path" ,
0 commit comments