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

sgr: use python-cryptography #138866

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
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
22 changes: 4 additions & 18 deletions Formula/sgr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ class Sgr < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "23a5004769f5900ea8ddc97ab004885e4ce55d528fc23dec74363c93b377c175"
end

depends_on "pkg-config" => :build
depends_on "rust" => :build # for cryptography
depends_on "rust" => :build # for pydantic
depends_on "libpq" # for psycopg2-binary
depends_on "openssl@3"
depends_on "python-certifi"
depends_on "python-cryptography"
depends_on "python-tabulate"
depends_on "python-typing-extensions"
depends_on "[email protected]"
Expand Down Expand Up @@ -72,11 +71,6 @@ class Sgr < Formula
sha256 "3970f8570ac54491237bcdb3d8ab5e3eef6c057df29f8c3d1151a51a9c23b975"
end

resource "cryptography" do
url "https://files.pythonhosted.org/packages/93/b7/b6b3420a2f027c1067f712eb3aea8653f8ca7490f183f9917879c447139b/cryptography-41.0.2.tar.gz"
sha256 "7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c"
end

resource "docker" do
url "https://files.pythonhosted.org/packages/f0/73/f7c9a14e88e769f38cb7fb45aa88dfd795faa8e18aea11bababf6e068d5e/docker-6.1.3.tar.gz"
sha256 "aa6d17830045ba5ef0168d5eaa34d37beeb113948c413affe1d5991fc11f9a20"
Expand Down Expand Up @@ -205,20 +199,12 @@ class Sgr < Formula
end

def install
# Ensure that the `openssl` crate picks up the intended library.
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
ENV["OPENSSL_NO_VENDOR"] = "1"

virtualenv_install_with_resources
end

test do
sgr_status = shell_output("#{bin}/sgr cloud login --username homebrewtest --password correcthorsebattery 2>&1", 2)

expected_output = <<~EOS
error: splitgraph.exceptions.AuthAPIError: {"error_code":"INVALID_CREDENTIALS","error":"Invalid username or password"}
EOS

assert_equal expected_output, sgr_status
assert_match "error: splitgraph.exceptions.AuthAPIError", sgr_status
assert_match version.to_s, shell_output("#{bin}/sgr --version")
end
end
2 changes: 1 addition & 1 deletion pypi_formula_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@
"exclude_packages": ["certifi", "Pygments", "typing-extensions"]
},
"sgr": {
"exclude_packages": ["certifi", "six", "tabulate", "typing-extensions"]
"exclude_packages": ["certifi", "cryptography", "six", "tabulate", "typing-extensions"]
},
"shallow-backup": {
"exclude_packages": ["six"]
Expand Down
Loading