tdsmith / homebrew-pypi-poet

Generates Homebrew resource stanzas for Python packages.
MIT License
139 stars 31 forks source link

Deprecate project #74

Open PythonCoderAS opened 1 year ago

PythonCoderAS commented 1 year ago

Homebrew will now take care of getting the necessary resource blocks if you supply it the initial download URL for a package, so this project isn't really that important.

simonw commented 1 year ago

Can you explain that in more detail? What would I need to do instead of my current process to create a formula for a Python CLI tool?

https://til.simonwillison.net/homebrew/packaging-python-cli-for-homebrew

simonw commented 1 year ago

Found this note on https://docs.brew.sh/Python-for-Formula-Authors

You can use brew update-python-resources to help you write resource stanzas. To use it, simply run brew update-python-resources <formula>

That page goes on to continue to recommend homebrew-pypi-poet though.

tdsmith commented 1 year ago

@PythonCoderAS What actions would you like me to take or what language would you like to see in this repo?

PythonCoderAS commented 1 year ago

Found this note on https://docs.brew.sh/Python-for-Formula-Authors

You can use brew update-python-resources to help you write resource stanzas. To use it, simply run brew update-python-resources <formula>

That page goes on to continue to recommend homebrew-pypi-poet though.

Seems to be old. Running this:

brew create --python https://files.pythonhosted.org/packages/f7/d9/4b525af3be6ac0a0a962e101b7771db6511d9e96369ded2765406233f9ff/homebrew-pypi-poet-0.10.0.tar.gz

Creates a file with these contents:

# Documentation: https://docs.brew.sh/Formula-Cookbook
#                https://rubydoc.brew.sh/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class HomebrewPypiPoet < Formula
  include Language::Python::Virtualenv

  desc ""
  homepage ""
  url "https://files.pythonhosted.org/packages/f7/d9/4b525af3be6ac0a0a962e101b7771db6511d9e96369ded2765406233f9ff/homebrew-pypi-poet-0.10.0.tar.gz"
  sha256 "e09e997e35a98f66445f9a39ccb33d6d93c5cd090302a59f231707eac0bf378e"
  license ""

  depends_on "python"

  resource "jinja2" do
    url "https://files.pythonhosted.org/packages/7a/ff/75c28576a1d900e87eb6335b063fab47a8ef3c8b4d88524c4bf78f670cce/Jinja2-3.1.2.tar.gz"
    sha256 "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"
  end

  resource "markupsafe" do
    url "https://files.pythonhosted.org/packages/6d/7c/59a3248f411813f8ccba92a55feaac4bf360d29e2ff05ee7d8e1ef2d7dbf/MarkupSafe-2.1.3.tar.gz"
    sha256 "af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"
  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 homebrew-pypi-poet`. 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
tdsmith commented 1 year ago

Would you like to send them a note? I don't control that page.

On Mon, Jun 19, 2023, 17:31 PythonCoderAS @.***> wrote:

Found this note on https://docs.brew.sh/Python-for-Formula-Authors

You can use brew update-python-resources to help you write resource stanzas. To use it, simply run brew update-python-resources

That page goes on to continue to recommend homebrew-pypi-poet though.

Seems to be old. Running this:

brew create --python https://files.pythonhosted.org/packages/f7/d9/4b525af3be6ac0a0a962e101b7771db6511d9e96369ded2765406233f9ff/homebrew-pypi-poet-0.10.0.tar.gz

Creates a file with these contents:

Documentation: https://docs.brew.sh/Formula-Cookbook# https://rubydoc.brew.sh/Formula# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!class HomebrewPypiPoet < Formula

include Language::Python::Virtualenv

desc "" homepage "" url "https://files.pythonhosted.org/packages/f7/d9/4b525af3be6ac0a0a962e101b7771db6511d9e96369ded2765406233f9ff/homebrew-pypi-poet-0.10.0.tar.gz" sha256 "e09e997e35a98f66445f9a39ccb33d6d93c5cd090302a59f231707eac0bf378e" license ""

depends_on "python"

resource "jinja2" do url "https://files.pythonhosted.org/packages/7a/ff/75c28576a1d900e87eb6335b063fab47a8ef3c8b4d88524c4bf78f670cce/Jinja2-3.1.2.tar.gz" sha256 "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852" end

resource "markupsafe" do url "https://files.pythonhosted.org/packages/6d/7c/59a3248f411813f8ccba92a55feaac4bf360d29e2ff05ee7d8e1ef2d7dbf/MarkupSafe-2.1.3.tar.gz" sha256 "af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad" 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 homebrew-pypi-poet`. 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"

endend

— Reply to this email directly, view it on GitHub https://github.com/tdsmith/homebrew-pypi-poet/issues/74#issuecomment-1597909932, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKOQPC5WTTUOMMGD2X4M3XMDVN5ANCNFSM6AAAAAAT4IJMUM . You are receiving this because you commented.Message ID: @.***>