Skip to content

Commit 8e36183

Browse files
authored
Merge pull request #250028 from Homebrew/charm-tools-python
charm-tools: migrate to `[email protected]`
2 parents ff7f9b5 + 6e0ee5d commit 8e36183

File tree

2 files changed

+48
-44
lines changed

2 files changed

+48
-44
lines changed

Formula/c/charm-tools.rb

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,29 @@ class CharmTools < Formula
99
revision 1
1010

1111
bottle do
12-
rebuild 1
13-
sha256 cellar: :any, arm64_tahoe: "4a4569815a50f268b9113fb8777bdbf3f1a828351661e7648aa6bc0947406580"
14-
sha256 cellar: :any, arm64_sequoia: "8576a30162918984c6c883e495a1ce1885aff4114c0fb2b68601d59d0fc95271"
15-
sha256 cellar: :any, arm64_sonoma: "1dff5aa04345b8b75b2d5fe311b87977c73a8ec5a6cecd48a03d43b3f4e41242"
16-
sha256 cellar: :any, arm64_ventura: "f17ad2941a8dd98eb242350fa4fa9416f878ed2285d3ebb0e1c00a8c2aa3b9ac"
17-
sha256 cellar: :any, sonoma: "06c35a003bc05c43207ae751996afe9ab1874bdabbdc10c127769c49e951bc23"
18-
sha256 cellar: :any, ventura: "c61ddd621c082d62017ab87a963361b5381ef659b843a449f0182a6bd2185a4b"
19-
sha256 cellar: :any_skip_relocation, x86_64_linux: "8c687043d251b6fcff20ecb68b04aec794141bf0b1077e4ba5948730f67fb7a2"
12+
rebuild 2
13+
sha256 cellar: :any, arm64_tahoe: "8b7c31459c1d8582047d79f8189c632deb16d126215605f117186d866bee8b07"
14+
sha256 cellar: :any, arm64_sequoia: "b9bf1be845d1f2954c4a718ee1b854222b8bc45dbe165fbd1a5f40cbb0185130"
15+
sha256 cellar: :any, arm64_sonoma: "a3826f2a3b51fcd9677d48ee893a240a719a7f48e56083b5f5f21ec90e57c966"
16+
sha256 cellar: :any, sonoma: "9f20b909364fe5d9d3bdef216eaa78b297e2884fce1354f4b215965df23f0c7f"
17+
sha256 cellar: :any_skip_relocation, x86_64_linux: "7366a0245c76bc92f9b038df28c3f88182e4f7d07e0d2f47472416d2ae29981a"
2018
end
2119

2220
depends_on "certifi"
2321
depends_on "charm"
2422
depends_on "cryptography"
2523
depends_on "libyaml"
26-
depends_on "python@3.13"
24+
depends_on "python@3.14"
2725

2826
on_linux do
2927
depends_on "gmp"
3028
end
3129

30+
# `ruamel-yaml` is manually updated to support Python 3.14
31+
3232
resource "attrs" do
33-
url "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz"
34-
sha256 "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"
33+
url "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz"
34+
sha256 "16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11"
3535
end
3636

3737
resource "blessings" do
@@ -40,39 +40,38 @@ class CharmTools < Formula
4040
end
4141

4242
resource "charset-normalizer" do
43-
url "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz"
44-
sha256 "5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"
45-
end
46-
47-
# missing pypi sdist issue, https://github.com/CheetahTemplate3/cheetah3/issues/69
48-
resource "cheetah3" do
49-
url "https://github.com/CheetahTemplate3/cheetah3/archive/refs/tags/3.4.0.tar.gz"
50-
sha256 "0f1fb60c0df8acec48561ba561d023b55498bd04e7b3763d4ca14adaf3d62405"
43+
url "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz"
44+
sha256 "94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a"
5145
end
5246

5347
resource "colander" do
5448
url "https://files.pythonhosted.org/packages/fa/3c/592bbb25f6199234167d713c220044473e2e57906d7ad7a34e13b7dc1144/colander-1.8.3.tar.gz"
5549
sha256 "259592a0d6a89cbe63c0c5771f9c0c2522387415af8d715f599583eac659f7d4"
5650
end
5751

52+
resource "ct3" do
53+
url "https://files.pythonhosted.org/packages/a4/61/aa8c457288d06dd160e495b9ede433ba847a29cac41d6dfe56746720acff/ct3-3.4.0.tar.gz"
54+
sha256 "ddc493b775b02b09737b1fb628a973dbe9aa91d694045a6764a8e3f5296fa1eb"
55+
end
56+
5857
resource "dict2colander" do
5958
url "https://files.pythonhosted.org/packages/aa/7e/5ed2ba3dc2f06457b76d4bc8c93559179472bf87e6982f9a9e5cea30e84e/dict2colander-0.2.tar.gz"
6059
sha256 "6f668d60896991dcd271465b755f00ffd6f87f81e0d4d054be62a16c086978c7"
6160
end
6261

6362
resource "distlib" do
64-
url "https://files.pythonhosted.org/packages/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz"
65-
sha256 "a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"
63+
url "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz"
64+
sha256 "feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d"
6665
end
6766

6867
resource "filelock" do
69-
url "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz"
70-
sha256 "adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"
68+
url "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz"
69+
sha256 "711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4"
7170
end
7271

7372
resource "idna" do
74-
url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz"
75-
sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"
73+
url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz"
74+
sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"
7675
end
7776

7877
resource "iso8601" do
@@ -106,8 +105,8 @@ class CharmTools < Formula
106105
end
107106

108107
resource "more-itertools" do
109-
url "https://files.pythonhosted.org/packages/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz"
110-
sha256 "9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3"
108+
url "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz"
109+
sha256 "f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd"
111110
end
112111

113112
resource "otherstuf" do
@@ -131,8 +130,8 @@ class CharmTools < Formula
131130
end
132131

133132
resource "platformdirs" do
134-
url "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz"
135-
sha256 "3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc"
133+
url "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz"
134+
sha256 "70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312"
136135
end
137136

138137
resource "pyrsistent" do
@@ -141,13 +140,13 @@ class CharmTools < Formula
141140
end
142141

143142
resource "pyyaml" do
144-
url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz"
145-
sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"
143+
url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz"
144+
sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"
146145
end
147146

148147
resource "requests" do
149-
url "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz"
150-
sha256 "27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422"
148+
url "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz"
149+
sha256 "dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"
151150
end
152151

153152
resource "requirements-parser" do
@@ -156,8 +155,8 @@ class CharmTools < Formula
156155
end
157156

158157
resource "ruamel-yaml" do
159-
url "https://files.pythonhosted.org/packages/d1/d6/eb2833ccba5ea36f8f4de4bcfa0d1a91eb618f832d430b70e3086821f251/ruamel.yaml-0.17.40.tar.gz"
160-
sha256 "6024b986f06765d482b5b07e086cc4b4cd05dd22ddcbc758fa23d54873cf313d"
158+
url "https://files.pythonhosted.org/packages/3e/db/f3950f5e5031b618aae9f423a39bf81a55c148aecd15a34527898e752cf4/ruamel.yaml-0.18.15.tar.gz"
159+
sha256 "dbfca74b018c4c3fba0b9cc9ee33e53c371194a9000e694995e620490fd40700"
161160
end
162161

163162
resource "secretstorage" do
@@ -176,8 +175,8 @@ class CharmTools < Formula
176175
end
177176

178177
resource "stuf" do
179-
url "https://files.pythonhosted.org/packages/f0/d6/6779cb5874630c21845d345306f60a7a5ecd9263fa09f85df745c54e3356/stuf-0.9.16.tar.gz"
180-
sha256 "080a88b940ca844474c239cc7aab0c530187e637a9dc6df111a99e2955bb35db"
178+
url "https://files.pythonhosted.org/packages/76/62/171e06b6d2d3072ea333de19632c61a44f83199e20cbf4924d12827cf66a/stuf-0.9.16.tar.bz2"
179+
sha256 "e61d64a2180c19111e129d36bfae66a0cb9392e1045827d6495db4ac9cb549b0"
181180
end
182181

183182
resource "translationstring" do
@@ -186,8 +185,8 @@ class CharmTools < Formula
186185
end
187186

188187
resource "types-setuptools" do
189-
url "https://files.pythonhosted.org/packages/79/66/1b276526aad4696a9519919e637801f2c103419d2c248a6feb2729e034d1/types_setuptools-80.9.0.20250529.tar.gz"
190-
sha256 "79e088ba0cba2186c8d6499cbd3e143abb142d28a44b042c28d3148b1e353c91"
188+
url "https://files.pythonhosted.org/packages/19/bd/1e5f949b7cb740c9f0feaac430e301b8f1c5f11a81e26324299ea671a237/types_setuptools-80.9.0.20250822.tar.gz"
189+
sha256 "070ea7716968ec67a84c7f7768d9952ff24d28b65b6594797a464f1b3066f965"
191190
end
192191

193192
resource "urllib3" do
@@ -201,13 +200,17 @@ class CharmTools < Formula
201200
end
202201

203202
resource "virtualenv" do
204-
url "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz"
205-
sha256 "e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af"
203+
url "https://files.pythonhosted.org/packages/a4/d5/b0ccd381d55c8f45d46f77df6ae59fbc23d19e901e2d523395598e5f4c93/virtualenv-20.35.3.tar.gz"
204+
sha256 "4f1a845d131133bdff10590489610c98c168ff99dc75d6c96853801f7f67af44"
206205
end
207206

208207
def install
209-
venv = virtualenv_install_with_resources without: "cheetah3"
210-
resource("cheetah3").stage do
208+
# Unpin ruamel.yaml to support Python 3.14
209+
# PR ref for 3.13: https://github.com/juju/charm-tools/pull/685
210+
inreplace "setup.py", "ruamel.yaml<0.18", "ruamel.yaml<0.19"
211+
212+
venv = virtualenv_install_with_resources without: "ct3"
213+
resource("ct3").stage do
211214
# Package was renamed due to PyPI 2FA requirement and charm-tools use of
212215
# `pkg_resources` raises an exception on missing requirement
213216
# https://github.com/CheetahTemplate3/cheetah3/commit/673259b2d139b4ea970b1c2da12607b7ac39cbec

pypi_formula_mappings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@
197197
"exclude_packages": ["pycparser"]
198198
},
199199
"charm-tools": {
200-
"exclude_packages": ["certifi", "cryptography"]
200+
"exclude_packages": ["cheetah3", "certifi", "cryptography"],
201+
"extra_packages": ["ct3"]
201202
},
202203
"charmcraft": {
203204
"extra_packages": ["jeepney", "secretstorage"],

0 commit comments

Comments
 (0)