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

mkdocs-material 9.5.41 (new formula) #194840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clintonsteiner
Copy link
Contributor

  • [ x ] Have you followed the guidelines for contributing?
  • [ x ] Have you ensured that your commits follow the commit style guide?
  • [ x ] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [ x ] Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [ x ] Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • [ x ] Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added python Python use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels Oct 18, 2024
Copy link
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@gromgit
Copy link
Member

gromgit commented Oct 18, 2024

Is this a Material Design library for mkdocs? If so, this should probably depends_on "mkdocs", and have a test similar to the one in mkdocs.

If it's a drop-in replacement for mkdocs (as the docs seem to suggest), then again, a similar test to mkdocs seems warranted, and a conflicts_with clause should probably be added.

@clintonsteiner
Copy link
Contributor Author

This is a design library for mkdocs @gromgit

@clintonsteiner
Copy link
Contributor Author

Changed to take pr comments, thanks @gromgit

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Oct 18, 2024
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Oct 18, 2024
@gromgit
Copy link
Member

gromgit commented Oct 21, 2024

Is there a reason this formula doesn't use a similar test to the mkdocs formula, given that it's a library for the latter rather than just a general-purpose Python library?

@clintonsteiner
Copy link
Contributor Author

I don't want to create a test as intense as creating a site with the theme and instead would prefer to use a test that makes sure its available

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Oct 21, 2024
@clintonsteiner clintonsteiner force-pushed the mkdocs-material branch 2 times, most recently from 338073e to 73e6654 Compare October 21, 2024 19:19
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Oct 21, 2024
@clintonsteiner
Copy link
Contributor Author

@chenrui333 let me know how I can fix this up enough to be committed

@clintonsteiner clintonsteiner force-pushed the mkdocs-material branch 2 times, most recently from 3103640 to 8580d9d Compare October 22, 2024 14:57
@gromgit
Copy link
Member

gromgit commented Oct 23, 2024

Looks like my earlier comment is pertinent, in that mkdocs-material seems to want to be a standalone mkdocs.

This change builds and tests successfully on my local system:

diff --git a/Formula/m/mkdocs-material.rb b/Formula/m/mkdocs-material.rb
index 2af492f2dee..45306341eae 100644
--- a/Formula/m/mkdocs-material.rb
+++ b/Formula/m/mkdocs-material.rb
@@ -7,9 +7,10 @@ class MkdocsMaterial < Formula
   license "MIT"
 
   depends_on "libyaml"
-  depends_on "mkdocs"
   depends_on "python@3.13"
 
+  conflicts_with "mkdocs", because: "both install `mkdocs` binaries"
+
   resource "babel" do
     url "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz"
     sha256 "d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"
@@ -65,6 +66,11 @@ class MkdocsMaterial < Formula
     sha256 "0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"
   end
 
+  resource "mkdocs" do
+    url "https://files.pythonhosted.org/packages/bc/c6/bbd4f061bd16b378247f12953ffcb04786a618ce5e904b8c5a01a0309061/mkdocs-1.6.1.tar.gz"
+    sha256 "7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2"
+  end
+
   resource "mkdocs-get-deps" do
     url "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz"
     sha256 "162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c"
@@ -148,6 +154,7 @@ class MkdocsMaterial < Formula
   def install
     ENV["PIP_USE_PEP517"] = "1"
     virtualenv_install_with_resources
+    bin.install_symlink libexec/"bin/mkdocs"
   end
 
   test do
@@ -164,6 +171,6 @@ class MkdocsMaterial < Formula
 
       And some deeply meaningful prose.
     EOS
-    system "mkdocs", "build", "--clean"
+    system bin/"mkdocs", "build", "--clean"
   end
 end
diff --git a/Formula/m/mkdocs.rb b/Formula/m/mkdocs.rb
index 534532b4789..00409ab9cfd 100644
--- a/Formula/m/mkdocs.rb
+++ b/Formula/m/mkdocs.rb
@@ -20,6 +20,8 @@ class Mkdocs < Formula
   depends_on "libyaml"
   depends_on "python@3.13"
 
+  conflicts_with "mkdocs-material", because: "both install `mkdocs` binaries"
+
   resource "click" do
     url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz"
     sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"

@github-actions github-actions bot added the automerge-skip `brew pr-automerge` will skip this pull request label Oct 28, 2024
@github-actions github-actions bot removed the automerge-skip `brew pr-automerge` will skip this pull request label Oct 28, 2024
@clintonsteiner
Copy link
Contributor Author

@gromgit Thank you for the help

@clintonsteiner
Copy link
Contributor Author

@chenrui333 bump to close this issue

@chenrui333
Copy link
Member

mkdocs add conflict warning for mkdocs-material should done as followup

@clintonsteiner
Copy link
Contributor Author

Wouldn't that result in a broken state temporarily if these commits aren't merged in the same pr?

@gromgit
Copy link
Member

gromgit commented Nov 7, 2024

Wouldn't that result in a broken state temporarily if these commits aren't merged in the same pr?

The window for breakage is small, and since this is the new formula, it's highly unlikely to be installed before installing the unmodified mkdocs formula. Even then, you'd get a link error when installing mkdocs; the conflicts_with clause just stops the conflicting install before actually doing anything.

@clintonsteiner
Copy link
Contributor Author

Fixed and put seperate pr here #196959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new formula PR adds a new formula to Homebrew/homebrew-core python Python use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants