From e2428c7b3427896c0702ff8e35a816c362b2a1fa Mon Sep 17 00:00:00 2001 From: ARI WG Git Bot Date: Wed, 3 Jun 2026 09:35:01 +0000 Subject: [PATCH 1/4] Add pip 26.1.2, remove pip 26.0.1 for stack(s) cflinuxfs4, cflinuxfs5 --- manifest.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/manifest.yml b/manifest.yml index 038923f4..68717873 100644 --- a/manifest.yml +++ b/manifest.yml @@ -83,12 +83,14 @@ dependencies: source: https://files.pythonhosted.org/packages/20/16/650289cd3f43d5a2fadfd98c68bd1e1e7f2550a1a5326768cddfbcedb2c5/pip-25.2.tar.gz source_sha256: 578283f006390f85bb6282dffb876454593d637f5d1be494b5202ce4877e71f2 - name: pip - version: 26.0.1 - uri: https://buildpacks.cloudfoundry.org/dependencies/pip/pip_26.0.1_linux_noarch_any-stack_0750a38b.tgz - sha256: 0750a38b65c6038a0415a4ff15ef2df61fcaa6c1e5ec9d8c6678222dbac91306 - cf_stacks: [] - source: https://files.pythonhosted.org/packages/48/83/0d7d4e9efe3344b8e2fe25d93be44f64b65364d3c8d7bc6dc90198d5422e/pip-26.0.1.tar.gz - source_sha256: c4037d8a277c89b320abe636d59f91e6d0922d08a05b60e85e53b296613346d8 + version: 26.1.2 + uri: https://buildpacks.cloudfoundry.org/dependencies/pip/pip_26.1.2_linux_noarch_cflinuxfs4_fc4720c5.tgz + sha256: fc4720c52cf407083abdb3a6375a3beb29ae6b68f650ed086d25dab4f24d3860 + cf_stacks: + - cflinuxfs4 + - cflinuxfs5 + source: https://files.pythonhosted.org/packages/01/91/47e7d486260f618783899587af63ccf7980fb60245c3e63dd4571c6b57ad/pip-26.1.2.tar.gz + source_sha256: f49cd134c61cf2fd75e0ce2676db03e4054504a5a4986d00f8299ae632dc4605 - name: pipenv version: 2024.4.1 uri: https://buildpacks.cloudfoundry.org/dependencies/pipenv/pipenv_2024.4.1_linux_noarch_cflinuxfs3_b3c74c78.tgz From 88b3f880409be613af13b86d249fab01932c2d36 Mon Sep 17 00:00:00 2001 From: ivanovac Date: Fri, 10 Jul 2026 11:41:36 +0300 Subject: [PATCH 2/4] Restrict pip 25.2 to cflinuxfs3 only to avoid version conflict This fixes the 'more than one version of pip found' error by ensuring each stack has exactly one pip version available: - cflinuxfs3: pip 25.2 - cflinuxfs4: pip 26.1.2 - cflinuxfs5: pip 26.1.2 The buildpack's InstallOnlyVersion() function requires exactly one version per dependency per stack. This follows the same pattern used by pipenv which has different versions for different stacks. Fixes the integration test failure: TestIntegration/integration/Pip/.../when_using_latest_version/uses_latest_from_manifest --- manifest.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifest.yml b/manifest.yml index 68717873..482acfa2 100644 --- a/manifest.yml +++ b/manifest.yml @@ -77,8 +77,6 @@ dependencies: uri: https://buildpacks.cloudfoundry.org/dependencies/pip/pip_25.2_linux_noarch_any-stack_7dc1e988.tgz sha256: 7dc1e9882eb18f53150261c3a0cde7d5a39cdb18843c930ee01db8582f6b4f27 cf_stacks: - - cflinuxfs5 - - cflinuxfs4 - cflinuxfs3 source: https://files.pythonhosted.org/packages/20/16/650289cd3f43d5a2fadfd98c68bd1e1e7f2550a1a5326768cddfbcedb2c5/pip-25.2.tar.gz source_sha256: 578283f006390f85bb6282dffb876454593d637f5d1be494b5202ce4877e71f2 From 75fcd93ff499837ab6649d0792dd0122b87f085e Mon Sep 17 00:00:00 2001 From: ivanovac Date: Fri, 10 Jul 2026 14:21:56 +0300 Subject: [PATCH 3/4] Add flit-core installation for pip 26+ compatibility pip 26+ uses flit-core as its build backend (via PEP 517) instead of setuptools. When installing pip with BP_PIP_VERSION=latest, we need to provide flit-core in the --find-links directory so pip can build itself. Changes: - InstallPip() now downloads flit-core to /tmp/pip alongside pip - Gracefully handles missing flit-core (cflinuxfs3 with pip 25.2) - Only logs warning if flit-core unavailable (doesn't fail) This fixes the error: ERROR: Could not find a version that satisfies the requirement flit-core<4,>=3.11 (from versions: none) Note: flit-core is only in manifest for cflinuxfs4/5, which matches the stacks that use pip 26.1.2 after the previous commit. Related: - pip 26.1.2 pyproject.toml requires: flit-core<4,>=3.11 - Manifest has flit-core 3.12.0 for cflinuxfs4/cflinuxfs5 --- src/python/supply/supply.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/python/supply/supply.go b/src/python/supply/supply.go index 44cb9499..72d32e52 100644 --- a/src/python/supply/supply.go +++ b/src/python/supply/supply.go @@ -341,6 +341,13 @@ func (s *Supplier) InstallPip() error { return err } + // pip 26+ requires flit-core as a build dependency + // Install it to the same tempPath so pip can find it during build + if err := s.Installer.InstallOnlyVersion("flit-core", tempPath); err != nil { + // Log warning but continue - older pip versions don't need flit-core + s.Log.Warning("Could not install flit-core (required for pip 26+): %v", err) + } + if err := s.Command.Execute(s.Stager.BuildDir(), indentWriter(os.Stdout), indentWriter(os.Stderr), "python", "-m", "pip", From c4f88827ac6de9d162840dee5f0f10f6ba035a0b Mon Sep 17 00:00:00 2001 From: ivanovac Date: Fri, 10 Jul 2026 14:23:37 +0300 Subject: [PATCH 4/4] Add flit-core installation for pip 26+ compatibility pip 26+ uses flit-core as its build backend (via PEP 517) instead of setuptools. When installing pip with BP_PIP_VERSION=latest, we need to install flit-core into the Python environment so pip can use it. Changes: - InstallPip() now downloads flit-core to /tmp/pip alongside pip - Installs flit-core using 'python -m pip install' (not runPipInstall) - Uses 'python -m pip' directly since pip isn't in PATH yet - Gracefully handles missing flit-core (cflinuxfs3 with pip 25.2) This fixes the error: ERROR: Could not find a version that satisfies the requirement flit-core<4,>=3.11 (from versions: none) Key insights: 1. flit-core must be INSTALLED into Python environment, not just extracted 2. Must use 'python -m pip' not 'pip' since pip isn't installed yet 3. Extracted source code is not a wheel/sdist for --find-links Related: - pip 26.1.2 pyproject.toml requires: flit-core<4,>=3.11 - Manifest has flit-core 3.12.0 for cflinuxfs4/cflinuxfs5 - Follows pattern from InstallCommonBuildDependencies() --- src/python/supply/supply.go | 14 ++++++++++---- src/python/supply/supply_test.go | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/python/supply/supply.go b/src/python/supply/supply.go index 72d32e52..6bc7d77b 100644 --- a/src/python/supply/supply.go +++ b/src/python/supply/supply.go @@ -342,11 +342,17 @@ func (s *Supplier) InstallPip() error { } // pip 26+ requires flit-core as a build dependency - // Install it to the same tempPath so pip can find it during build - if err := s.Installer.InstallOnlyVersion("flit-core", tempPath); err != nil { - // Log warning but continue - older pip versions don't need flit-core - s.Log.Warning("Could not install flit-core (required for pip 26+): %v", err) + // We need to install it into the Python environment, not just extract it + if err := s.Installer.InstallOnlyVersion("flit-core", tempPath); err == nil { + // flit-core found - install it so pip can use it as a build backend + // Use "python -m pip" directly since pip isn't in PATH yet + s.Log.Info("Installing flit-core (required for pip 26+)") + if err := s.Command.Execute(s.Stager.BuildDir(), indentWriter(os.Stdout), indentWriter(os.Stderr), + "python", "-m", "pip", "install", tempPath, "--no-build-isolation"); err != nil { + s.Log.Warning("Could not install flit-core: %v", err) + } } + // If flit-core not found (e.g., cflinuxfs3), silently continue if err := s.Command.Execute(s.Stager.BuildDir(), indentWriter(os.Stdout), indentWriter(os.Stderr), "python", diff --git a/src/python/supply/supply_test.go b/src/python/supply/supply_test.go index a8d15d41..9e1cc5b8 100644 --- a/src/python/supply/supply_test.go +++ b/src/python/supply/supply_test.go @@ -154,6 +154,8 @@ var _ = Describe("Supply", func() { It("installs latest from manifest", func() { mockInstaller.EXPECT().InstallOnlyVersion("pip", "/tmp/pip") + mockInstaller.EXPECT().InstallOnlyVersion("flit-core", "/tmp/pip") + mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "/tmp/pip", "--no-build-isolation") mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "pip", "--exists-action=w", "--no-index", "--ignore-installed", "--find-links=/tmp/pip") mockStager.EXPECT().LinkDirectoryInDepDir(filepath.Join(filepath.Join(depDir, "python"), "bin"), "bin")