Skip to content

Commit d426bfd

Browse files
authored
Merge branch 'main' into automation/dependencies/update-from-metadata
2 parents 6e6b575 + 9e777e8 commit d426bfd

8 files changed

Lines changed: 229 additions & 140 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ repos:
3131
- id: go-imports
3232
- id: no-go-testing
3333
- id: golangci-lint
34+
- repo: https://github.com/astral-sh/ruff-pre-commit
35+
rev: v0.16.2
36+
hooks:
37+
- id: ruff-check
38+
args: [--fix]
39+
- id: ruff-format
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2013-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
import sys
6+
from subprocess import check_call
7+
8+
import tomllib
9+
10+
file_path = sys.argv[1]
11+
12+
with open(file_path, "rb") as f:
13+
data = tomllib.load(f)
14+
for entry in data["build-system"]["requires"]:
15+
name, constraints = entry.split(" ")
16+
check_call(
17+
[
18+
"pip3",
19+
"--cache-dir=/tmp-cache/",
20+
"download",
21+
"--no-binary",
22+
":all:",
23+
f"{name}{constraints}",
24+
]
25+
)

dependency/actions/compile/entrypoint

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,23 @@ function main() {
6161
echo "target=${target}"
6262
echo "download_dir=${download_dir}"
6363

64-
pip3 --version
65-
# "pip download pip" with older pips have seen failures that say "has inconsistent name: filename has 'pip', but metadata has 'unknown'"
66-
pip3 install --upgrade pip
6764
pip3 --version
6865
python3 --version
6966

7067
pushd "${download_dir}" > /dev/null
7168
mkdir -p /tmp/pip-cache/
7269
pip3 --cache-dir=/tmp/pip-cache/ download --no-binary :all: pip=="${version}"
73-
pip3 --cache-dir=/tmp/pip-cache/ download --no-binary :all: wheel
74-
pip3 --cache-dir=/tmp/pip-cache/ download --no-binary :all: setuptools
75-
pip3 --cache-dir=/tmp/pip-cache/ download --no-binary :all: flit_core
7670

7771
# Use globbing to detect the pip tarball
7872
# https://github.com/paketo-buildpacks/pip/issues/334
7973
tar --extract \
8074
--strip-components=1 \
8175
--file pip-*.tar.gz
8276

77+
pip3 --cache-dir=/tmp/pip-cache/ download --no-binary :all: wheel
78+
pip3 --cache-dir=/tmp/pip-cache/ download --no-binary :all: setuptools
79+
python3 /constraints.py pyproject.toml
80+
8381
tar --create \
8482
--gunzip \
8583
--verbose \
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
FROM ubuntu:noble
12
# Copyright (c) 2013-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
23
#
34
# SPDX-License-Identifier: Apache-2.0
45

5-
FROM ubuntu:jammy
6-
7-
ENV DEBIAN_FRONTEND noninteractive
8-
ENV LC_CTYPE = 'en_US.UTF'
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
ENV LC_CTYPE='en_US.UTF'
98

109
RUN apt-get update && apt install python3-pip -y
1110

1211
COPY entrypoint /entrypoint
12+
COPY constraints.py /constraints.py
1313

1414
ENTRYPOINT ["/entrypoint"]

dependency/retrieval/go.mod

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
module github.com/paketo-buildpacks/python-package-managers-install/retrieval
22

3-
go 1.26.3
3+
go 1.26.5
44

55
// This is required because of a breaking change in a newer version
66
replace github.com/ekzhu/minhash-lsh => github.com/ekzhu/minhash-lsh v0.0.0-20171225071031-5c06ee8586a1
77

8+
replace github.com/go-enry/go-license-detector/v4 => github.com/go-enry/go-license-detector/v4 v4.3.0
9+
810
require (
911
github.com/Masterminds/semver/v3 v3.5.0
1012
github.com/google/go-github/v81 v81.0.0
1113
github.com/joshuatcasey/libdependency v0.25.0
1214
github.com/nfx/go-htmltable v0.4.0
13-
github.com/paketo-buildpacks/packit/v2 v2.25.6
15+
github.com/paketo-buildpacks/packit/v2 v2.25.7
1416
)
1517

1618
require (
@@ -19,26 +21,26 @@ require (
1921
github.com/Microsoft/go-winio v0.6.3-0.20251027160822-ad3df93bed29 // indirect
2022
github.com/ProtonMail/go-crypto v1.4.1 // indirect
2123
github.com/anchore/packageurl-go v0.2.0 // indirect
22-
github.com/cloudflare/circl v1.6.3 // indirect
23-
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
24+
github.com/cloudflare/circl v1.6.5 // indirect
25+
github.com/cyphar/filepath-securejoin v0.7.0 // indirect
2426
github.com/dgryski/go-minhash v0.0.0-20190315135803-ad340ca03076 // indirect
2527
github.com/ekzhu/minhash-lsh v0.0.0-20190924033628-faac2c6342f8 // indirect
2628
github.com/emirpasic/gods v1.18.1 // indirect
2729
github.com/gabriel-vasile/mimetype v1.4.15 // indirect
28-
github.com/go-enry/go-license-detector/v4 v4.3.1 // indirect
30+
github.com/go-enry/go-license-detector/v4 v4.3.0 // indirect
2931
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
30-
github.com/go-git/go-billy/v5 v5.9.0 // indirect
31-
github.com/go-git/go-git/v5 v5.19.1 // indirect
32+
github.com/go-git/go-billy/v5 v5.9.1 // indirect
33+
github.com/go-git/go-git/v5 v5.19.2 // indirect
3234
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
3335
github.com/google/go-querystring v1.2.0 // indirect
3436
github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b // indirect
3537
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
3638
github.com/jdkato/prose v1.2.1 // indirect
3739
github.com/joshuatcasey/collections v0.5.0 // indirect
3840
github.com/kevinburke/ssh_config v1.6.0 // indirect
39-
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
40-
github.com/moby/sys/mount v0.3.4 // indirect
41-
github.com/montanaflynn/stats v0.7.0 // indirect
41+
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
42+
github.com/moby/sys/mount v0.3.5 // indirect
43+
github.com/montanaflynn/stats v0.12.2 // indirect
4244
github.com/pjbgf/sha1cd v0.6.0 // indirect
4345
github.com/pkg/errors v0.9.1 // indirect
4446
github.com/russross/blackfriday/v2 v2.1.0 // indirect

0 commit comments

Comments
 (0)