Python 的简单自制公式
Simple homebrew formula for Python
我有一个简单的 python 应用程序,我想通过私人 Homebrew tap 进行分发。我在主仓库中有以下文件:
test/
test.sh # script that runs the python script below.
main.py # main script.
并且以下配置 (test.rb) 提交到我的 tap 存储库:
class Test < Formula
desc "Test."
url "https://github.com/..."
version "0.0.1"
def install
bin.install "test.sh"
end
test do
end
end
但是我安装的时候main.py文件不可用
- 如何分发(和引用)相关的源脚本?
- 我可以重命名在 /usr/local/bin 中创建的符号链接吗?
- 是否有比以下更完整的文档:https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md(例如,列出完整的命令语法?)
谢谢。
上面的公式没有提到python文件,所以没有安装。你可以尝试这样的事情:
libexec.install "test.sh", "main.py"
bin.install_symlink libexec/"test.sh" => "test"
完整文档如下:https://github.com/Homebrew/homebrew/tree/master/share/doc/homebrew
我有一个简单的 python 应用程序,我想通过私人 Homebrew tap 进行分发。我在主仓库中有以下文件:
test/
test.sh # script that runs the python script below.
main.py # main script.
并且以下配置 (test.rb) 提交到我的 tap 存储库:
class Test < Formula
desc "Test."
url "https://github.com/..."
version "0.0.1"
def install
bin.install "test.sh"
end
test do
end
end
但是我安装的时候main.py文件不可用
- 如何分发(和引用)相关的源脚本?
- 我可以重命名在 /usr/local/bin 中创建的符号链接吗?
- 是否有比以下更完整的文档:https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md(例如,列出完整的命令语法?)
谢谢。
上面的公式没有提到python文件,所以没有安装。你可以尝试这样的事情:
libexec.install "test.sh", "main.py"
bin.install_symlink libexec/"test.sh" => "test"
完整文档如下:https://github.com/Homebrew/homebrew/tree/master/share/doc/homebrew