Skip to content

Commit

Permalink
feat(buildpack): ✨ add setup to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
miragecentury committed Jul 31, 2024
1 parent d25d415 commit 0da116a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
42 changes: 42 additions & 0 deletions plan.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[[requires]]

# The name of the dependency provided by the Poetry Install Buildpack is
# "poetry-venv". This value is considered part of the public API for the
# buildpack and will not change without a plan for deprecation.
name = "poetry-venv"

# The Poetry Install buildpack supports some non-required metadata options.
[requires.metadata]

# Setting the build flag to true will ensure that the poetry-venv
# dependency is available on the $PYTHONPATH for subsequent
# buildpacks during their build phase. If you are writing a buildpack that
# needs poetry-venv during its build process, this flag should be
# set to true.
build = true

# Setting the launch flag to true will ensure that the poetry-venv
# dependency is available on the $PYTHONPATH for the running
# application. If you are writing an application that needs poetry-venv
# at runtime, this flag should be set to true.
launch = true
[[requires]]

# The name of the Poetry dependency is "poetry". This value is considered
# part of the public API for the buildpack and will not change without a plan
# for deprecation.
name = "poetry"

# The Poetry buildpack supports some non-required metadata options.
[requires.metadata]

# Optional.
# When not specified, the buildpack will select the latest supported version from buildpack.toml
# This buildpack only supports exact version numbers.
version = "1.8.3"

# Set to true to ensure that `poetry` is avilable on both `$PATH` and `$PYTHONPATH` for subsequent buildpacks.
build = true

# Set to true to ensure that `poetry` is avilable on both `$PATH` and `$PYTHONPATH` for the launch container.
launch = true
9 changes: 9 additions & 0 deletions project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[_]
schema-version = "0.2"

[project]
id = "info.sysunicorns.python-poetry-empty"
version = "0.1.0"

[io.buildpacks]
include = ["pyproject.toml", "src/", "README.md"]
8 changes: 8 additions & 0 deletions scripts/build_with_buildpack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -euo pipefail

pack build \
python-poetry-empty \
--buildpack paketo-buildpacks/python \
--builder paketobuildpacks/builder-jammy-base

0 comments on commit 0da116a

Please sign in to comment.