Skip to content

Instantly share code, notes, and snippets.

@onpaws
Created July 17, 2022 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onpaws/8c7cb68ca7abce70891f4ef82b8602b1 to your computer and use it in GitHub Desktop.
Save onpaws/8c7cb68ca7abce70891f4ef82b8602b1 to your computer and use it in GitHub Desktop.

Following the Python steps for making a Homebrew formula, I'm running into a problem where a cryptography release doesn't compile inside my formula.

How to repro

  • brew create --python --set-name "repro" https://github.com/splitgraph/sgr/archive/refs/tags/v0.3.10.tar.gz
  • paste the contents of repro.rb over the file that opens
  • run brew install --verbose --debug --build-from-source repro
class Repro < Formula
include Language::Python::Virtualenv
desc ""
homepage ""
url "https://github.com/onpaws/dummy/archive/refs/tags/v0.1.0.tar.gz"
sha256 "1b97a7101180a2b161f65576d597c210380de6a33497fdcd4a22e686c6d714bf"
license ""
depends_on "python"
resource "cryptography" do
url "https://files.pythonhosted.org/packages/89/d9/5fcd312d5cce0b4d7ee8b551a0ea99e4ea9db0fdbf6dd455a19042e3370b/cryptography-37.0.4.tar.gz"
sha256 "63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"
end
def install
# ENV.deparallelize # if your formula fails when building in parallel
virtualenv_install_with_resources
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! For Homebrew/homebrew-core
# this will need to be a test that verifies the functionality of the
# software. Run the test with `brew test repro`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "false"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment