| Crates.io | libpybuild |
| lib.rs | libpybuild |
| version | 0.0.2 |
| created_at | 2025-09-07 17:06:01.421771+00 |
| updated_at | 2025-09-07 17:16:12.082541+00 |
| description | Python src+dependency bundler library |
| homepage | https://github.com/clowdhaus/pybuild |
| repository | https://github.com/clowdhaus/pybuild |
| max_upload_size | |
| id | 1828334 |
| size | 67,999 |
Install command is meant to provide a stopgap solution and is best suited to be handled by other tools. However, fitting those tools easily and natively into the workflows of tools/frameworks for packaging AWS Lambda functions is challenging for users:
esbuild tool - due to the ability to tree-shake any excess code, users can install dependencies once in a central location. esbuild does not concern itself with installing dependencies.esbuild (this step can be spread out and parallelized for multiple artifacts)pipenv, this seems to be the default https://github.com/pypa/pipenv/issues/245poetry, this also seems to be the default when inspecting poetry export -hinstall
This is just a simple wrapper that shells out commands to the cli to ergonomically handle where deps are installed for bundling
✅ --package-manager, -p: one of pip, poetry, or pipfile
pip will use dependencies listed in requirements.txt
pip install -r requirements.txt --target ./.pybuild/site-packages
pipenv
pipenv run pip install -r <(pipenv lock -r) --target ./.pybuild/site-packages
poetry
poetry export -f requirements.txt --without-hashes > requirements.txt & \
poetry run pip install -r requirements.txt -t ./.pybuild/site-packages
✅ --extra-args, -e: extra arguments to pass to package manager install command
✅ --target, -t: Install packages into
--extra-args='--upgrade' to replace existing packages in .pybuild/site-packages since this is where pybuild bundle ... will look--target tha they will also want to change --packages to match when bundling✅ --upgrade, -u: Upgrade all specified packages to the newest available version
--requirements-file, r: path to requirements file (requirements.txt, Pipfile, pyproject.toml, etc.)
--install-in-docker to ensure libraries are compatible for various runtime environments like AWS Lambda--install-in-docker using --container-image--python-version to aid in selecting default container image and archive path, etc.