Build
To build your package using uv, you should use the uv build command. This will generate the distribution archives (like .tar.gz and .whl files) in the dist/ directory.
You can run this in your terminal:
uv buildWhat this does:
- Builds the wheel and sdist: It creates a source distribution and a compiled wheel file.
- Uses
dist/: By default, the output is placed in thedistfolder, which I can already see in your project structure. - Isolated environments: handles the build environment automatically to ensure a clean and reproducible build.
uv
If you want to clear the old build artifacts before running a new build, you can simply delete the dist/ folder or run:
# On Windows (PowerShell)Remove-Item -Recurse -Force dist
# Then build againuv buildSince you have already generated a wheel file (.whl) in your dist/ directory, you have a few ways to run it depending on whether you want to install it or just test it.
If you want to simulate how a user would install and use your package, you can install the .whl file into your environment:
uv pip install dist/standalone_build-0.1.0-py3-none-any.whlOnce installed, you can run your script. If you haven’t defined a “console script” entry point in your pyproject.toml , you would run it via Python: