Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charm-tools: migrate to [email protected] #193904

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions Formula/c/charm-tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CharmTools < Formula
depends_on "charm"
depends_on "cryptography"
depends_on "libyaml"
depends_on "python@3.12"
depends_on "python@3.13"

on_linux do
depends_on "gmp"
Expand All @@ -43,9 +43,10 @@ class CharmTools < Formula
sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"
end

# Using unreleased version for python 3.13 compatibility.
resource "cheetah3" do
url "https://files.pythonhosted.org/packages/23/33/ace0250068afca106c1df34348ab0728e575dc9c61928d216de3e381c460/Cheetah3-3.2.6.post1.tar.gz"
sha256 "58b5d84e5fbff6cf8e117414b3ea49ef51654c02ee887d155113c5b91d761967"
url "https://github.com/CheetahTemplate3/cheetah3/archive/8d82736c0e760ca9bcd01ffcdf95fbb424af116d.tar.gz"
sha256 "9d4782ec56b110891634370a19691b50d75d220649a51492b2cb96ad965a13b4"
end

resource "colander" do
Expand Down Expand Up @@ -163,19 +164,14 @@ class CharmTools < Formula
sha256 "6024b986f06765d482b5b07e086cc4b4cd05dd22ddcbc758fa23d54873cf313d"
end

resource "ruamel-yaml-clib" do
url "https://files.pythonhosted.org/packages/46/ab/bab9eb1566cd16f060b54055dd39cf6a34bfa0240c53a7218c43e974295b/ruamel.yaml.clib-0.2.8.tar.gz"
sha256 "beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512"
end

resource "secretstorage" do
url "https://files.pythonhosted.org/packages/53/a4/f48c9d79cb507ed1373477dbceaba7401fd8a23af63b837fa61f1dcd3691/SecretStorage-3.3.3.tar.gz"
sha256 "2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"
end

resource "setuptools" do
url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz"
sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538"
url "https://files.pythonhosted.org/packages/43/54/292f26c208734e9a7f067aea4a7e282c080750c4546559b58e2e45413ca0/setuptools-75.6.0.tar.gz"
sha256 "8199222558df7c86216af4f84c30e9b34a61d8ba19366cc914424cdbd28252f6"
end

resource "six" do
Expand All @@ -194,8 +190,8 @@ class CharmTools < Formula
end

resource "types-setuptools" do
url "https://files.pythonhosted.org/packages/8a/62/c29a8bc5b2a684bc558ee50e0b1d2ec473067e8a1cb1743eabb27efa53ba/types-setuptools-75.1.0.20241014.tar.gz"
sha256 "29b0560a8d4b4a91174be085847002c69abfcb048e20b33fc663005aedf56804"
url "https://files.pythonhosted.org/packages/c2/d2/15ede73bc3faf647af2c7bfefa90dde563a4b6bb580b1199f6255463c272/types_setuptools-75.6.0.20241126.tar.gz"
sha256 "7bf25ad4be39740e469f9268b6beddda6e088891fa5a27e985c6ce68bf62ace0"
end

resource "urllib3" do
Expand All @@ -209,16 +205,19 @@ class CharmTools < Formula
end

resource "virtualenv" do
url "https://files.pythonhosted.org/packages/3f/40/abc5a766da6b0b2457f819feab8e9203cbeae29327bd241359f866a3da9d/virtualenv-20.26.6.tar.gz"
sha256 "280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48"
url "https://files.pythonhosted.org/packages/bf/75/53316a5a8050069228a2f6d11f32046cfa94fbb6cc3f08703f59b873de2e/virtualenv-20.28.0.tar.gz"
sha256 "2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa"
end

def install
# Work around ruamel.yaml.clib not building on Xcode 15.3, remove after a new release
# has resolved: https://sourceforge.net/p/ruamel-yaml-clib/tickets/32/
ENV.append_to_cflags "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500

virtualenv_install_with_resources
venv = virtualenv_install_with_resources without: "cheetah3"
resource("cheetah3").stage do
# Package was renamed due to PyPI 2FA requirement and charm-tools use of
# `pkg_resources` raises an exception on missing requirement
# https://github.com/CheetahTemplate3/cheetah3/commit/673259b2d139b4ea970b1c2da12607b7ac39cbec
inreplace "SetupConfig.py", "name = 'CT3'", "name = 'cheetah3'"
venv.pip_install Pathname.pwd
end
end

test do
Expand Down
Loading