Skip to content

paketo-buildpacks/python-package-managers-run

Repository files navigation

Python Packagers Cloud Native Buildpack

The Paketo Buildpack for Python Packagers is a Cloud Native Buildpack that installs packages using the adequate tool selected based on the content of the application sources and makes it available to it.

The buildpack is published for consumption at gcr.io/paketo-buildpacks/python-package-managers-run and paketobuildpacks/python-package-managers-run.

Behavior

This buildpack participates if one of the following detection succeeds:

is present in the root folder.

The buildpack will do the following:

  • At build time:
    • Installs the application packages to a layer made available to the app.
  • At run time:
    • Does nothing

Configuration

BP_ENABLE_PACKAGE_MANAGERS

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=true

Usage

To 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

To speed up local integration tests run you could clone cpython, remove python versions you don't need in buildpack.toml and use the local path to the cpython folder in integration.json. Same thing applies to python-package-managers-install.

About

Buildpack for Python that consolidate all package managers under one roof.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors