File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed
Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ Available as `spin.cmds.build.*`:
126126
127127```
128128sdist 📦 Build a source distribution in `dist/`
129+ wheel 📦 Build a wheel distribution in `dist/`
129130```
130131
131132### [ pip] ( https://pip.pypa.io ) (Package Installer for Python)
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ package = 'example_pkg'
2929 " spin.cmds.meson.build" ,
3030 " spin.cmds.meson.test" ,
3131 " spin.cmds.build.sdist" ,
32+ " spin.cmds.build.wheel" ,
3233]
3334"Documentation" = [
3435 " spin.cmds.meson.docs"
Original file line number Diff line number Diff line change @@ -13,3 +13,15 @@ def sdist(pyproject_build_args):
1313 spin sdist -- -x -n
1414 """
1515 run (["pyproject-build" , "." , "--sdist" ] + list (pyproject_build_args ))
16+
17+
18+ @click .command ()
19+ @click .argument ("pyproject-build-args" , metavar = "" , nargs = - 1 )
20+ def wheel (pyproject_build_args ):
21+ """📦 Build a wheel distribution in `dist/`
22+
23+ Extra arguments are passed to `pyproject-build`, e.g.
24+
25+ spin wheel -- -x -n
26+ """
27+ run (["pyproject-build" , "." , "--wheel" ] + list (pyproject_build_args ))
Original file line number Diff line number Diff line change @@ -116,6 +116,12 @@ def test_sdist(example_pkg):
116116 spin ("sdist" )
117117
118118
119+ def test_wheel (example_pkg ):
120+ spin ("wheel" )
121+ wheel_file_list = list (Path ("dist" ).glob ("example_pkg-0.0.dev0-*.whl" ))
122+ assert len (wheel_file_list ) == 1 , "Wheel file not created in dist/"
123+
124+
119125def test_example (example_pkg ):
120126 spin ("example" )
121127
You can’t perform that action at this time.
0 commit comments