-
Notifications
You must be signed in to change notification settings - Fork 157
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
Wishlist: brew install for MacOS #106
Comments
[The brew commands] assume that you are actually using Homebrew, and normally the Homebrew repo then lives in /usr/local. I normally work in that repo and would then copy the formula elsewhere for pushing (typically to my tap repo). You don't have to issue a new pull request. Just add your changes to the same branch and push them, and they will remain associated with the same pull request. This is a great feature of the PR: you can commit and discuss until everyone is happy and the PR then gets accepted. @ludwigschwardt These were very helpful comments. The last time around I created a copy of the entire Homebrew directory in my home directory. As you say, there is no need to do this, and it just adds to the confusion. |
Status report: I worked several hours yesterday on a new formula. It may turn out to simple. The top-level leo-editor folder can go anywhere. There seems to be no need for the formula put the folder in The documentation must tell the user where |
Brew already installs all the package files in its cellar in e.g. /usr/local/Cellar/leo/5.4, so I find that the natural place to find the Leo files. On top of that I would just make launchLeo.py a normal executable script in /usr/local/bin via the Brew machinery, so that the user does not need to know where it is - it's on the path! The symlink is then an icing on the cake. What about an App-like way to get to launchLeo? |
@ludwigschwardt Thanks for these comments! Not sure I know enough to put them in action. Here is what I had last night: class LeoEditor < Formula
desc "The Leo IDE/Outliner/PIM"
homepage "http://leoeditor.com/"
url "https://github.com/leo-editor/leo-editor/archive/5.4.1.tar.gz"
sha256 "2cf0f598aa46e8ced6dd7da0229157e7b523704d0a03604a4da14b715c0a232f"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "pyqt"
depends_on "enchant" => :recommended
def install
python_xy = "python2.7"
# There is a syntax error somewhere on the next line
# python_site_packages = lib + "#{python_xy}/site-packages"
python_site_packages.install "leo"
bin.install ["launchLeo.py", "profileLeo.py"]
ln_s "#{bin}/launchLeo.py", "#{bin}/leo"
end
test do
# Create, run in and delete a temporary directory.
if system "python", "-c", "import", "leo"
onoe "Leo FAILED"
else
ohai "Leo OK"
end
end
end Some questions for you:
I think we may be close. |
Progress! Just guessing, I changed: python_site_packages.install "leo" to: bin.install "leo" and now the build works:
More importantly, the following opens Leo:
So it seems that question 1 is answered. That still leaves:
|
Again, just guessing (I'm a complete MacOS noob), I found launchLeo.py in
So now we are down to the last question: Is the test section bogus if leo already is installed on the user's system? Update: Maybe we can ignore this: the test might be bogus on my system, but it should be valid everywhere else. We may be getting close to creating a Tap and issuing a PR. |
@ludwigschwardt Your comments have made everything much clearer. When running the brew Leo, Leo's log pane shows:
So Many thanks for your help. |
Before I forget, this homebrew tutorial has been very helpful. No, it's pretty confusing about taps and PR's. The following are more helpful: Now, whenever I have a question I google it. For example, that's where the links above came from. |
In my incarnation of the formula I just made I still wonder if we can attach a ".app bundle" or some such thing to turn Leo into a proper app which can then be linked via |
A new development... The Since |
On Fri, Nov 18, 2016 at 3:12 AM, Ludwig Schwardt notifications@github.com
Some plugins may not work with Qt4, but that should not affect the homebrew Edward |
This item has gotten unwieldy. I've moved most notes to leoDist.leo.
The text was updated successfully, but these errors were encountered: