55from changes import attributes , config , probe , version
66from changes .changelog import generate_changelog
77from changes .flow import perform_release
8- from changes .packaging import install_package , upload_package , install_from_pypi
8+ from changes .packaging import build_package , install_package , upload_package , install_from_pypi
99from changes .vcs import tag_and_push
1010from changes .version import increment_version
1111
1212log = logging .getLogger (__name__ )
1313
1414
15-
16-
1715@click .group ()
1816@click .argument ('module_name' )
1917@click .option ('--dry-run' , is_flag = True , default = False , help = 'Prints (instead of executing) the operations to be performed.' )
@@ -57,6 +55,13 @@ def bump_version(context):
5755 increment_version (context .obj )
5856
5957
58+ @click .command ()
59+ @click .pass_context
60+ def build (context ):
61+ """Attempts to build the sdist and wheel."""
62+ build_package (context .obj )
63+
64+
6065@click .command ()
6166@click .option ('--test-command' , help = 'Command to use to test the newly installed package.' )
6267@click .pass_context
@@ -90,6 +95,7 @@ def tag(context):
9095 """Tags your git repo with the new version number"""
9196 tag_and_push (context .obj )
9297
98+
9399@click .command ()
94100@click .option ('--skip-changelog' , is_flag = True , help = 'For the release task: should the changelog be generated and committed?' )
95101@click .pass_context
@@ -101,6 +107,7 @@ def release(context, skip_changelog):
101107
102108main .add_command (changelog )
103109main .add_command (bump_version )
110+ main .add_command (build )
104111main .add_command (install )
105112main .add_command (upload )
106113main .add_command (pypi )
0 commit comments