GithubHelp home page GithubHelp logo

Comments (10)

nandahkrishna avatar nandahkrishna commented on September 27, 2024 1

I purposefully marked it as pre-release to hope people wouldn't start submitting it to package managers; guess it didn't quite work out 😅

Aha, I see 😅. We should hold off on adding the Formula until you're ready to make a stable release then. It seems like a user wanted to add python-launcher to Homebrew (and may have even seen this issue), so they proceeded to create a PR to do just that.

Is it okay for me to submit the formula myself once 1.0.0 is out?

The "rule" mainly exists to prevent people from submitting every project of their own to Homebrew. We would happily accept requests to add popular software like python-launcher – so yes, you could submit it yourself if you wish to.

I also noticed you suggested on that PR to not set an alias for py. I was actually planning to do that to mirror what ripgrep/rg has set up. Should that be skipped?

That wasn't a strong opinion, I suggested against having the alias because there are quite a few py* formulae. I'd be happy to reconsider if there aren't any objections from other maintainers.

(Just CCing @messense since they created Homebrew/homebrew-core#79173.)

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024 1

@nandahkrishna I opened Homebrew/homebrew-core#81855

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024 1

https://github.com/Homebrew/homebrew-core/blob/master/Formula/python-launcher.rb 🎉

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024
class PythonLauncher < Formula
  desc "Launch your Python interpreter the lazy/smart way"
  homepage "https://github.com/brettcannon/python-launcher"
  url "https://github.com/brettcannon/python-launcher/archive/refs/tags/v0.16.0.tar.gz"
  sha256 "03d4a2813c1639264c5e3e6a9961025d7004d1a85deaa8f97bce6010803fa1a8"
  license "MIT"

  head "https://github.com/brettcannon/python-launcher.git", branch: "main"

  livecheck do
    url :stable
    strategy :github_latest
  end

  depends_on "rust" => :build

  def install
    system "cargo", "install", *std_cargo_args

    man1.install "docs/man-page/py.1"
    fish_completion.install "completions/py.fish"
  end

  test do
    binary = testpath/"python3.6"
    binary.write("Fake Python 3.6 executable")
    with_env("PATH" => testpath) do
      assert_match("3.6 │ #{binary}", shell_output("#{bin}/py --list"))
    end
  end
end

This passes all of the checks I could do and builds from source appropriately.

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024

Docs on submitting a pull request: https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request.

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024

https://docs.brew.sh/Brew-Livecheck#git-tags suggests the livecheck block needs an update.

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024
class PythonLauncher < Formula
  desc "Launch your Python interpreter the lazy/smart way"
  homepage "https://github.com/brettcannon/python-launcher"
  url "https://github.com/brettcannon/python-launcher/archive/refs/tags/XXX.tar.gz"
  sha256 "XXX"
  license "MIT"

  head "https://github.com/brettcannon/python-launcher.git", branch: "main"

  livecheck do
    url :head
    regex(/^v(\d+\.\d+\.\d+)$/i)
  end

  depends_on "rust" => :build

  def install
    system "cargo", "install", *std_cargo_args

    man1.install "docs/man-page/py.1"
    fish_completion.install "completions/py.fish"
  end

  test do
    binary = testpath/"python3.6"
    binary.write("Fake Python 3.6 executable")
    with_env("PATH" => testpath) do
      assert_match("3.6 │ #{binary}", shell_output("#{bin}/py --list"))
    end
  end
end

from python-launcher.

nandahkrishna avatar nandahkrishna commented on September 27, 2024

Hello, Homebrew maintainer here. There's a pull request open at homebrew/core to add a Formula for python-launcher (Homebrew/homebrew-core#79173). I just noticed that v0.16.0 is a prerelease (according to the Releases tab), which means we can't add it just yet. Is there a plan to make it the latest (stable) release in the near future?

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024

@nandahkrishna It's not quite ready yet (I purposefully marked it as pre-release to hope people wouldn't start submitting it to package managers; guess it didn't quite work out 😅 ). But I'm hoping to release v1.0.0 this month.

As you can see I have already worked out the formula to submit once I'm ready to go since I'm a very happy Homebrew user myself. Is it okay for me to submit the formula myself once 1.0.0 is out? I was planning not to as https://docs.brew.sh/Acceptable-Formulae#niche-or-self-submitted-stuff suggests it shouldn't come from me (at least initially).

I also noticed you suggested on that PR to not set an alias for py. I was actually planning to do that to mirror what ripgrep/rg has set up. Should that be skipped?

from python-launcher.

brettcannon avatar brettcannon commented on September 27, 2024

Installation works on macOS but fails on Linux https://github.com/Homebrew/linuxbrew-core/issues/23953

from python-launcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.