The Paketo Buildpack for Python Installers is a Cloud Native Buildpack that installs python package managers.
The buildpack is published for consumption at
gcr.io/paketo-buildpacks/python-package-managers-install and
paketobuildpacks/python-package-managers-install.
This buildpack participates if one of the following detection succeeds:
- miniconda -> Always
- pip -> Always
- pipenv -> Always
- poetry ->
pyproject.tomlis present in the root folder - uv ->
uv.lockis present in the root folder - pixi ->
pixi.lockis present in the root folder
The buildpack will do the following:
- At build time:
- Installs the package manager
- Makes it available on the
PATH - Adjusts
PYTHONPATHas required
- At run time:
- Does nothing
The BP_ENABLE_PACKAGE_MANAGERS environment variable allows you to force the use
of this buildpack for all the supported package managers. It works in tandem
with python-start. python-start will add a requirement that is fulfilled by
this buildpack.
It is currently used as an opt-in to allow Paketo users to do tests before the old buildpacks get retired.
BP_ENABLE_PACKAGE_MANAGERS=trueTo package this buildpack for consumption:
$ ./scripts/package.sh --version x.x.x
This will create a buildpackage.cnb file under the build directory which you
can use to build your app as follows: pack build <app-name> -p <path-to-app> -b <cpython buildpack> -b <pip buildpack> -b build/buildpackage.cnb -b <other-buildpacks..>.
To run the unit and integration tests for this buildpack:
$ ./scripts/unit.sh && ./scripts/integration.sh