diff --git a/.github/templates/formula.rb.template b/.github/templates/formula.rb.template index 6418489..e5df6b3 100644 --- a/.github/templates/formula.rb.template +++ b/.github/templates/formula.rb.template @@ -22,6 +22,9 @@ class {{CLASS_NAME}} < Formula # Install the package and all dependencies system libexec/"bin/pip", "install", "--upgrade", "pip" + # Set version for setuptools-scm since archive tarballs lack .git metadata + # Skip for HEAD builds — they use git clone, so setuptools-scm reads tags directly + ENV["SETUPTOOLS_SCM_PRETEND_VERSION"] = version.to_s unless build.head? system libexec/"bin/pip", "install", buildpath.to_s # Create wrapper scripts in bin that use the venv