Coder Social home page Coder Social logo

pip-install's Introduction

Pip Install Cloud Native Buildpack

The Paketo Buildpack for Pip Install is a Cloud Native Buildpack that installs packages using pip and makes it available to the application.

The buildpack is published for consumption at gcr.io/paketo-buildpacks/pip-install and paketobuildpacks/pip-install.

Behavior

This buildpack participates if requirements.txt exists at the root the app.

The buildpack will do the following:

  • At build time:
    • Installs the application packages to a layer made available to the app.
    • Prepends the layer site-packages onto PYTHONPATH.
    • If a vendor directory is available, will attempt to run pip install in an offline manner.
  • At run time:
    • Does nothing

Integration

The Pip Install CNB provides site-packages as a dependency. Downstream buildpacks can require the site-packages dependency by generating a Build Plan TOML file that looks like the following:

[[requires]]

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

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

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

    # Setting the launch flag to true will ensure that the site-packages
    # dependency is available on the $PYTHONPATH for the running
    # application. If you are writing an application that needs site-packages
    # at runtime, this flag should be set to true.
    launch = 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

Configuration

BP_PIP_DEST_PATH

The BP_PIP_DEST_PATH variable allows you to specify a custom vendor directory. This should be a directory underneath the working directory. Will use ./vendor if not provided.

BP_PIP_DEST_PATH=my/custom/vendor-dir

pip-install's People

Contributors

arjun024 avatar dependabot[bot] avatar emmjohnson avatar foresteckhardt avatar joshuatcasey avatar paketo-bot avatar robdimsdale avatar ryanmoran avatar sophiewigmore avatar thitch97 avatar tisvictress avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pip-install's Issues

Offline integration tests are failing

This is happening on main as well as in PRs (e.g. #238 #239):

            [builder] Paketo Buildpack for Pip Install 1.2.3
            [builder]   Executing build process
            [builder]     Running 'pip install --requirement requirements.txt --ignore-installed --exists-action=w --no-index --find-links=/workspace/vendor --compile --user --disable-pip-version-check'
            [builder]       Looking in links: /workspace/vendor
            [builder]       Processing ./vendor/Flask-2.1.3-py3-none-any.whl (from -r requirements.txt (line 1))
            [builder]       Processing ./vendor/Jinja2-3.1.2-py3-none-any.whl (from -r requirements.txt (line 2))
            [builder]       Processing ./vendor/MarkupSafe-2.1.1.tar.gz (from -r requirements.txt (line 3))
            [builder]         Installing build dependencies: started
            [builder]         Installing build dependencies: finished with status 'error'
            [builder]         error: subprocess-exited-with-error
            [builder]
            [builder]         × pip subprocess to install build dependencies did not run successfully.
            [builder]         │ exit code: 1
            [builder]         ╰─> [4 lines of output]
            [builder]             Looking in links: /workspace/vendor
            [builder]             Processing ./vendor/setuptools-63.2.0-py3-none-any.whl
            [builder]             ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)
            [builder]             ERROR: No matching distribution found for wheel
            [builder]             [end of output]
            [builder]
            [builder]         note: This error originates from a subprocess, and is likely not a problem with pip.
            [builder]       error: subprocess-exited-with-error
            [builder]
            [builder]       × pip subprocess to install build dependencies did not run successfully.
            [builder]       │ exit code: 1
            [builder]       ╰─> See above for output.
            [builder]
            [builder]       note: This error originates from a subprocess, and is likely not a problem with pip.
            [builder] pip install failed:
            [builder] error: exit status 1
            [builder] ERROR: failed to build: exit status 1
            ERROR: failed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 51

Restructure: Create pip-install buildpack

In an effort to fulfill the re-architecture plan laid out in Python RFC paketo-community/python#1 a pip-install Buildpack needs to be created.

As part of this issue an RFC should be generate that outlines the exact pip install process that will be used in this buildpack as well as document the API for this buildpack, which is partially laid out in the restructuring RFC.

This buildpack should be responsible for installing all of the pip dependency for a give application and should be written using the packit library.

pip install of fasttext package is failing

This simple project, https://github.com/src2img/e2e/tree/python-pip-fasttext, is containing a Python project with just one library in its requirements.txt, fastText.

The sample also contains a Dockerfile that mimics the steps that Paketo imo performs = it uses Python 3.10, pip is updated so that it is at version 23.1.2, it runs as non-root then a pip install command with the same arguments that Paketo uses. The Dockerfile succeeds, Paketo does not.

Expected Behavior

pip install succeeds

Current Behavior

It fails like this:

[builder]   Executing build process
[builder]     Running 'pip install --requirement requirements.txt --exists-action=w --cache-dir=/layers/paketo-buildpacks_pip-install/cache --compile --user --disable-pip-version-check'
[builder]       Collecting fasttext==0.9.2 (from -r requirements.txt (line 1))
[builder]         Downloading fasttext-0.9.2.tar.gz (68 kB)
[builder]            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.8/68.8 kB 409.4 kB/s eta 0:00:00
[builder]         Installing build dependencies: started
[builder]         Installing build dependencies: finished with status 'done'
[builder]         Getting requirements to build wheel: started
[builder]         Getting requirements to build wheel: finished with status 'error'
[builder]         error: subprocess-exited-with-error
[builder]         
[builder]         × Getting requirements to build wheel did not run successfully.
[builder]         │ exit code: 1
[builder]         ╰─> [25 lines of output]
[builder]             /layers/paketo-buildpacks_cpython/cpython/bin/python: No module named pip
[builder]             Traceback (most recent call last):
[builder]               File "<string>", line 38, in __init__
[builder]             ModuleNotFoundError: No module named 'pybind11'
[builder]             
[builder]             During handling of the above exception, another exception occurred:
[builder]             
[builder]             Traceback (most recent call last):
[builder]               File "/layers/paketo-buildpacks_pip/pip/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
[builder]                 main()
[builder]               File "/layers/paketo-buildpacks_pip/pip/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
[builder]                 json_out['return_val'] = hook(**hook_input['kwargs'])
[builder]               File "/layers/paketo-buildpacks_pip/pip/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
[builder]                 return hook(config_settings)
[builder]               File "/tmp/pip-build-env-d30ersr5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
[builder]                 return self._get_build_requires(config_settings, requirements=['wheel'])
[builder]               File "/tmp/pip-build-env-d30ersr5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
[builder]                 self.run_setup()
[builder]               File "/tmp/pip-build-env-d30ersr5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
[builder]                 super(_BuildMetaLegacyBackend,
[builder]               File "/tmp/pip-build-env-d30ersr5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
[builder]                 exec(code, locals())
[builder]               File "<string>", line 72, in <module>
[builder]               File "<string>", line 41, in __init__
[builder]             RuntimeError: pybind11 install failed.
[builder]             [end of output]

Possible Solution

Steps to Reproduce

  1. git clone https://github.com/src2img/e2e
  2. cd e2e
  3. it checkout python-pip-fasttext
  4. pack build --builder paketobuildpacks/builder-jammy-full myimage

Motivations

Additional Information

There is a pull request open against fastText that aims to resolve exactly the error from above (facebookresearch/fastText#1331). Though, I am not a Python/Pip expert to assess if it is applicable. So wondering why it works without that fix in the Dockerfile approach.

Pass arguments to pip

Describe the Enhancement

paketo-buildpacks/pip-install checks for the presence of requirements.txt and then install dependencies with pip. A fixed set of optional arguments are passed to pip install:

func onlineArgs(cachePath string) []string {
return []string{
"install",
"--requirement",
"requirements.txt",
"--exists-action=w",
fmt.Sprintf("--cache-dir=%s", cachePath),
"--compile",
"--user",
"--disable-pip-version-check",
}
}

It would be useful to be able to pass additional optional arguments to pip via environment variables. For example, a user may want to provide --index-url to provide an alternative Python Package Index.

It may already be possible to pass arguments to pip by including them in requirements.txt. However, --index-url may contain secrets (e.g. for connecting to a private package index) which should not be in requirements.txt.

Other pip arguments may be useful, including --requirement (but note this will require changes to both detect and build phases).

Possible Solution

Allow passing environment variables (e.g. BP_PIP_INDEX_URL, BP_PIP_REQUIREMENT) which, if provided are appended to the pip arguments.

Vendor directory should be configurable

We should consider making the pip vendor directory configurable through an environment variable. The pip download command supports this through a --dest flag.

Use layer caching

If executing the build process can be bypassed, then we should reuse the layer. Things to consider for the layer being changed or not:

  • requirements.txt
  • pip version
  • cpython version
  • vendored or not
  • any other env variables

We may be able to use pip config to get the answers to some of these being changed or not.

Old packages are not cleaned up

What happened?

  • What were you attempting to do?
    I am rebuilding my Python 3.8 app using Python 3.9. This worked fine, but when I exec into the container, I can see that my modules for Python 3.8 are still there alongside the modules that were installed for Python 3.9.

  • What did you expect to happen?
    I expected that my app wouldn't contain old copies of modules that I'm not using.

  • What was the actual behavior? Please provide log output, if possible.
    Here are the steps I followed, I'm using the integration/testdata/default_app in this case:

  1. Build the app with Python 3.8
    pack build myapp --buildpack paketo-buildpacks/cpython --buildpack paketo-buildpacks/pip --buildpack paketo-buildpacks/pip-install --buildpack paketo-community/build-plan --env BP_CPYTHON_VERSION=3.8.*
    
  2. Build the app with Python 3.9
    pack build myapp --buildpack paketo-buildpacks/cpython --buildpack paketo-buildpacks/pip --buildpack paketo-buildpacks/pip-install --buildpack paketo-community/build-plan --env BP_CPYTHON_VERSION=3.9.*
    
  3. Exec into the container
    docker run -it --entrypoint launcher myapp bash
    
  4. Confirm that the packages layer contains Python 3.8 and 3.9 modules
     ls -al /layers/paketo-buildpacks_pip-install/packages/lib/python3.*/site-packages
    
  5. See output that looks like the following:
    /layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages:
    total 64
    drwxr-xr-x 16 cnb cnb 4096 Jan  1  1980 .
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 ..
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 Flask-0.12.3.dist-info
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 Jinja2-2.7.2-py3.8.egg-info
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 MarkupSafe-0.21-py3.8.egg-info
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 Werkzeug-0.10.4.dist-info
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 click
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 click-8.0.1.dist-info
    drwxr-xr-x  5 cnb cnb 4096 Jan  1  1980 flask
    drwxr-xr-x  8 cnb cnb 4096 Jan  1  1980 gunicorn
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 gunicorn-19.5.0.dist-info
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 itsdangerous
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 itsdangerous-2.0.1.dist-info
    drwxr-xr-x  4 cnb cnb 4096 Jan  1  1980 jinja2
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 markupsafe
    drwxr-xr-x  5 cnb cnb 4096 Jan  1  1980 werkzeug
    
    /layers/paketo-buildpacks_pip-install/packages/lib/python3.9/site-packages:
    total 64
    drwxr-xr-x 16 cnb cnb 4096 Jan  1  1980 .
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 ..
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 Flask-0.12.3.dist-info
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 Jinja2-2.7.2-py3.9.egg-info
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 MarkupSafe-0.21-py3.9.egg-info
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 Werkzeug-0.10.4.dist-info
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 click
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 click-8.0.1.dist-info
    drwxr-xr-x  5 cnb cnb 4096 Jan  1  1980 flask
    drwxr-xr-x  8 cnb cnb 4096 Jan  1  1980 gunicorn
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 gunicorn-19.5.0.dist-info
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 itsdangerous
    drwxr-xr-x  2 cnb cnb 4096 Jan  1  1980 itsdangerous-2.0.1.dist-info
    drwxr-xr-x  4 cnb cnb 4096 Jan  1  1980 jinja2
    drwxr-xr-x  3 cnb cnb 4096 Jan  1  1980 markupsafe
    drwxr-xr-x  5 cnb cnb 4096 Jan  1  1980 werkzeug
    

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

    $ pack version
    0.20.0+git-66a4f32.build-2668
    
  • What buildpacks are you using? Please include versions.

    paketo-buildpacks/cpython     0.7.2
    paketo-buildpacks/pip         0.5.1
    paketo-buildpacks/pip-install 0.1.3
    paketo-community/build-plan   0.0.12
    
  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

    base: Pulling from paketobuildpacks/builder
    Digest: sha256:6c42e7d119ef14742115fb31de8025bb981c7084e3ce4eed3444e3eef9a224cd
    
  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?
    The sample app I used was this one: https://github.com/paketo-buildpacks/pip-install/tree/f0cad81e304b75d04fb0d0f89ae4926572f883db/integration/testdata/default_app.

Checklist

  • I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.

Packages missing compared to when running Pipenv outside of container

What happened?

The example repository at https://github.com/themodernlife/buildpack-issue runs fine when run using Homebrew installed toolchain on my Mac, but the docker container built using pack fails to run due to missing imports.

  • What were you attempting to do?

Here's the main Procfile

web: python -c 'from dateutil import tz'

And the Pipfile

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pandas = ">=0.25"

[dev-packages]

[requires]
python_version = "3.9"

Installing from a new pipenv (installed via Homebrew) from scratch and inspecting the dependencies

pipenv  --python 3.9.7
pipenv install 'pandas>=0.25'
pipenv run python -c 'from dateutil import tz'

Everything succeeds. Reverse dependency tree is

numpy==1.22.0
  - pandas==1.3.5 [requires: numpy>=1.17.3]
pip==21.3.1
pytz==2021.3
  - pandas==1.3.5 [requires: pytz>=2017.3]
setuptools==60.2.0
six==1.16.0
  - python-dateutil==2.8.2 [requires: six>=1.5]
    - pandas==1.3.5 [requires: python-dateutil>=2.7.3]
wheel==0.37.1

But building with pack build buildpack-issue --buildpack gcr.io/paketo-buildpacks/python --builder

paketobuildpacks/builder:base

base: Pulling from paketobuildpacks/builder
Digest: sha256:870c31cc75ff074deaa32da58a8de150c9ba2cbef8a750dd8f0c6b1fd4aa7aaf
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:59aa1da9db6d979e21721e306b9ce99a7c4e3d1663c4c20f74f9b3876cce5192
Status: Image is up to date for paketobuildpacks/run:base-cnb
latest: Pulling from paketo-buildpacks/python
Digest: sha256:1805b6ff5f2b4ef38b40f132a16f571817d75f448c6a25ec0696bf3c9df230aa
Status: Image is up to date for gcr.io/paketo-buildpacks/python:latest
===> DETECTING
7 of 10 buildpacks participating
paketo-buildpacks/ca-certificates 2.4.2
paketo-buildpacks/cpython         0.7.3
paketo-buildpacks/pip             0.7.0
paketo-buildpacks/pipenv          0.2.1
paketo-buildpacks/pipenv-install  0.2.3
paketo-buildpacks/python-start    0.7.0
paketo-buildpacks/procfile        4.4.1
===> ANALYZING
Restoring metadata for "paketo-buildpacks/ca-certificates:helper" from app image
Restoring metadata for "paketo-buildpacks/cpython:cpython" from app image
Restoring metadata for "paketo-buildpacks/pip:pip" from cache
Restoring metadata for "paketo-buildpacks/pipenv:pipenv" from cache
Restoring metadata for "paketo-buildpacks/pipenv-install:packages" from app image
Restoring metadata for "paketo-buildpacks/pipenv-install:cache" from cache
===> RESTORING
Restoring data for "paketo-buildpacks/cpython:cpython" from cache
Restoring data for "paketo-buildpacks/pip:pip" from cache
Restoring data for "paketo-buildpacks/pipenv:pipenv" from cache
Restoring data for "paketo-buildpacks/pipenv-install:cache" from cache
Restoring data for "paketo-buildpacks/pipenv-install:packages" from cache
===> BUILDING

Paketo CA Certificates Buildpack 2.4.2
  https://github.com/paketo-buildpacks/ca-certificates
  Launch Helper: Reusing cached layer
Paketo CPython Buildpack 0.7.3
  Resolving CPython version
    Candidate version sources (in priority order):
      Pipfile.lock -> "3.9"
                   -> ""
      <unknown>    -> ""

    Selected CPython version (using Pipfile.lock): 3.9.7

  Reusing cached layer /layers/paketo-buildpacks_cpython/cpython

Paketo Pip Buildpack 0.7.0
  Resolving Pip version
    Candidate version sources (in priority order):
       -> ""

    Selected Pip version (using ): 21.3.1

  Reusing cached layer /layers/paketo-buildpacks_pip/pip
Paketo Pipenv Buildpack 0.2.1
  Resolving Pipenv version
    Candidate version sources (in priority order):
       -> ""

    Selected Pipenv version (using ): 2021.5.29

  Reusing cached layer /layers/paketo-buildpacks_pipenv/pipenv
Paketo Pipenv Install Buildpack 0.2.3
  Executing build process
    Running 'pipenv install --deploy'
    Running 'pipenv clean'
  Configuring environment
    PATH           -> "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/bin:$PATH"
    PYTHONUSERBASE -> "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd"

      Completed in 6.033s

Paketo Python Start Buildpack 0.7.0
  Assigning launch process
    web: python

Paketo Procfile Buildpack 4.4.1
  https://github.com/paketo-buildpacks/procfile
  Process types:
    web: python -c 'from dateutil import tz'
===> EXPORTING
Reusing layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/cpython:cpython'
Reusing layer 'paketo-buildpacks/pipenv-install:packages'
Reusing 1/1 app layer(s)
Reusing layer 'launcher'
Reusing layer 'config'
Reusing layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
Saving buildpack-issue...
*** Images (c8ace4a0c91e):
      buildpack-issue
Adding cache layer 'paketo-buildpacks/cpython:cpython'
Adding cache layer 'paketo-buildpacks/pip:pip'
Adding cache layer 'paketo-buildpacks/pipenv:pipenv'
Adding cache layer 'paketo-buildpacks/pipenv-install:cache'
Reusing cache layer 'paketo-buildpacks/pipenv-install:packages'
Successfully built image buildpack-issue

Running via docker run -it buildpack-issue fails

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/lib/python3.9/site-packages/dateutil/tz/__init__.py", line 2, in <module>
    from .tz import *
  File "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/lib/python3.9/site-packages/dateutil/tz/tz.py", line 19, in <module>
    import six
ModuleNotFoundError: No module named 'six'

On my Mac, in the virtualenv, I have six.py

➜  buildpack-issue ls -alh /Users/ihummel/.local/share/virtualenvs/buildpack-issue-yEnhB5G3/lib/python3.9/site-packages 
total 104
drwxr-xr-x  27 ihummel  staff   864B Jan 14 08:55 .
drwxr-xr-x   3 ihummel  staff    96B Jan 14 08:54 ..
drwxr-xr-x   3 ihummel  staff    96B Jan 14 08:54 __pycache__
drwxr-xr-x   4 ihummel  staff   128B Jan 14 08:54 _distutils_hack
-rw-r--r--   1 ihummel  staff    18B Jan 14 08:54 _virtualenv.pth
-rw-r--r--   1 ihummel  staff   5.5K Jan 14 08:54 _virtualenv.py
drwxr-xr-x  14 ihummel  staff   448B Jan 14 08:54 dateutil
-rw-r--r--   1 ihummel  staff   152B Jan 14 08:54 distutils-precedence.pth
drwxr-xr-x  39 ihummel  staff   1.2K Jan 14 08:55 numpy
drwxr-xr-x  10 ihummel  staff   320B Jan 14 08:55 numpy-1.22.0.dist-info
drwxr-xr-x  21 ihummel  staff   672B Jan 14 08:55 pandas
drwxr-xr-x  10 ihummel  staff   320B Jan 14 08:55 pandas-1.3.5.dist-info
drwxr-xr-x   7 ihummel  staff   224B Jan 14 08:54 pip
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 pip-21.3.1.dist-info
-rw-r--r--   1 ihummel  staff     0B Jan 14 08:54 pip-21.3.1.virtualenv
drwxr-xr-x   6 ihummel  staff   192B Jan 14 08:54 pkg_resources
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 python_dateutil-2.8.2.dist-info
drwxr-xr-x  10 ihummel  staff   320B Jan 14 08:54 pytz
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 pytz-2021.3.dist-info
drwxr-xr-x  40 ihummel  staff   1.3K Jan 14 08:54 setuptools
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 setuptools-59.6.0.dist-info
-rw-r--r--   1 ihummel  staff     0B Jan 14 08:54 setuptools-59.6.0.virtualenv
drwxr-xr-x   8 ihummel  staff   256B Jan 14 08:54 six-1.16.0.dist-info
-rw-r--r--   1 ihummel  staff    34K Jan 14 08:54 six.py
drwxr-xr-x  12 ihummel  staff   384B Jan 14 08:54 wheel
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 wheel-0.37.0.dist-info
-rw-r--r--   1 ihummel  staff     0B Jan 14 08:54 wheel-0.37.0.virtualenv

six.py module is not installed into the container

cnb@097fd68eee1c:/workspace$ ls -alh /layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/lib/python3.9/site-packages/
total 92K
drwxr-xr-x 19 cnb cnb 4.0K Jan  1  1980 .
drwxr-xr-x  3 cnb cnb 4.0K Jan  1  1980 ..
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 _distutils_hack
-rw-r--r--  1 cnb cnb   18 Jan  1  1980 _virtualenv.pth
-rw-r--r--  1 cnb cnb 5.6K Jan  1  1980 _virtualenv.py
drwxr-xr-x  6 cnb cnb 4.0K Jan  1  1980 dateutil
-rw-r--r--  1 cnb cnb  151 Jan  1  1980 distutils-precedence.pth
drwxr-xr-x 19 cnb cnb 4.0K Jan  1  1980 numpy
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 numpy-1.22.0.dist-info
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 numpy.libs
drwxr-xr-x 16 cnb cnb 4.0K Jan  1  1980 pandas
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 pandas-1.3.5.dist-info
drwxr-xr-x  4 cnb cnb 4.0K Jan  1  1980 pip
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 pip-21.3.1.dist-info
-rw-r--r--  1 cnb cnb    0 Jan  1  1980 pip-21.3.1.virtualenv
drwxr-xr-x  5 cnb cnb 4.0K Jan  1  1980 pkg_resources
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 python_dateutil-2.8.2.dist-info
drwxr-xr-x  4 cnb cnb 4.0K Jan  1  1980 pytz
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 pytz-2021.3.dist-info
drwxr-xr-x  6 cnb cnb 4.0K Jan  1  1980 setuptools
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 setuptools-60.2.0.dist-info
-rw-r--r--  1 cnb cnb    0 Jan  1  1980 setuptools-60.2.0.virtualenv
drwxr-xr-x  4 cnb cnb 4.0K Jan  1  1980 wheel
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 wheel-0.37.1.dist-info
-rw-r--r--  1 cnb cnb    0 Jan  1  1980 wheel-0.37.1.virtualenv
  • What did you expect to happen?

The environments should be the same and the container should run.

  • What was the actual behavior? Please provide log output, if possible.

Container didn't run

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.
➜  buildpack-issue git:(main) pack --version                                                                                                              
0.23.0+git-0db2c77.build-3056

Installed via Homebrew on macOS 11.6.2

  • What buildpacks are you using? Please include versions.

see above

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

Using paketobuildpacks/builder:base

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

see above

Checklist

  • [ x] I have included log output.
  • [ x] The log output includes an error message.
  • [ x] I have included steps for reproduction.

Confirm to RFC RFC0043: Reproducible builds

To confirm to RFC0043 this buildpack should ensure that builds are reproducible. Specifically it should not include a built_at metadata field. In the tests that leverage this field to assert layer reuse, we should instead compare layer SHA values across rebuilds.

See also the tracking issue: paketo-buildpacks/rfcs#165.

Upgrade to packit v2

Please upgrade to the latest packit v2 release to enable new features and extended support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.