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

aws-sso-util: fix build without dependency on cmake or rust #118910

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
36 changes: 25 additions & 11 deletions Formula/aws-sso-util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ class AwsSsoUtil < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "aef2aaa71e70de99b18828a65103208d1c0449db3f12fcacd28166c03674d5cc"
end

depends_on "rust" => :build
depends_on "python@3.11"
depends_on "six"

on_linux do
depends_on "pkg-config" => :build
end

resource "attrs" do
url "https://files.pythonhosted.org/packages/1a/cb/c4ffeb41e7137b23755a45e1bfec9cbb76ecf51874c6f1d113984ecaa32c/attrs-22.1.0.tar.gz"
sha256 "29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"
url "https://files.pythonhosted.org/packages/21/31/3f468da74c7de4fcf9b25591e682856389b3400b4b62f201e65f15ea3e07/attrs-22.2.0.tar.gz"
sha256 "c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"
end

resource "aws-error-utils" do
url "https://files.pythonhosted.org/packages/4e/7b/622c18e41b17935ac72f4f7b8775e18fe6dd6ecca0d1068fd95f5cbd91f9/aws-error-utils-1.3.0.tar.gz"
sha256 "188159a8897552408dc3545aed55b49a12532cbde841aad0490e2b93a1275cfc"

# Use poetry_core backend to avoid unnecessary cmake and rust build dependencies.
# Remove when release uses aws-error-utils>=2.6.
# Backport of https://github.com/benkehoe/aws-error-utils/commit/f23a4bb8703e8ffabf1d008e04495572cc12d4ee
patch :DATA
Comment on lines +34 to +37
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One demerit is patch may break brew bump logic.

Other options are:

  • Add cmake (and keep rust) dependency. Demerit is these are probably unnecessary.
  • Use poetry as dependency and manually run build command. Demerit is that we cannot use virtualenv_install_with_resources DSL which makes it harder to maintain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to that PR

Copy link
Member

@chenrui333 chenrui333 Dec 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should also file a PR to update aws-sso-util to use aws-error-utils>=2.6

I see, it is just not released yet.

end

resource "aws-sso-lib" do
Expand All @@ -43,13 +43,13 @@ class AwsSsoUtil < Formula
end

resource "boto3" do
url "https://files.pythonhosted.org/packages/90/8a/bd891775c4948f2ae5d8dd9af13f6d0a085bc82dc7608abf474691558eb1/boto3-1.26.25.tar.gz"
sha256 "e0ba3620feb430e31926270ea3dc0bb94df55a0fd2b209bd91f7904f2f2166ef"
url "https://files.pythonhosted.org/packages/2d/07/d0427a01e4bf4b00bd72eadc795587e22c5be064aba0aa1b60d9d2d9f1c5/boto3-1.26.37.tar.gz"
sha256 "82b790b1dabd0746b028d2013b5d4d636a41f3aaf25520081f4c173cb6eb395d"
end

resource "botocore" do
url "https://files.pythonhosted.org/packages/5e/d5/503f88cc4ccf6881db110c31257c1aa5270c59aad0be6e807a6520db0b71/botocore-1.29.25.tar.gz"
sha256 "a204140c9d7adadf3919d8024d79278f1865a20c869e4f216eaea599ca3a1743"
url "https://files.pythonhosted.org/packages/c2/27/b2343f0676d636e7dbf9daf9a51422fc1f28116f4842c274c9ad43aa5aec/botocore-1.29.37.tar.gz"
sha256 "3afa4fec9f7713caa05116563b38f81bec7bd20585d517155484d3f25efab5aa"
end

resource "certifi" do
Expand Down Expand Up @@ -140,3 +140,17 @@ def install
assert_equal expected, (testpath/"config").read
end
end

__END__
diff --git a/pyproject.toml b/pyproject.toml
index e130aed..e60f2ac 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -25,5 +25,5 @@ pytest = "^5.4.2"
pylint = "*"

[build-system]
-requires = ["poetry>=0.12"]
-build-backend = "poetry.masonry.api"
+requires = ["poetry_core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"