Linux command
poetry-build 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Build package
poetry build
Build wheel only
poetry build -f wheel
Build sdist only
poetry build -f sdist
说明
poetry build creates distributable Python packages from the current project. By default it generates both a wheel (.whl) and a source distribution (sdist/tarball) in the dist/ directory. Use -f wheel to build only the wheel format or -f sdist for only the source distribution. The build process uses the project metadata from pyproject.toml including name, version, dependencies, and entry points.
参数
- -f, --format _FORMAT_
- Build format (wheel, sdist).
FAQ
What is the poetry-build command used for?
poetry build creates distributable Python packages from the current project. By default it generates both a wheel (.whl) and a source distribution (sdist/tarball) in the dist/ directory. Use -f wheel to build only the wheel format or -f sdist for only the source distribution. The build process uses the project metadata from pyproject.toml including name, version, dependencies, and entry points.
How do I run a basic poetry-build example?
Run `poetry build` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --format _FORMAT_ do in poetry-build?
Build format (wheel, sdist).