youtube-dl: Python 2.x and 3.x support

This commit is contained in:
Samuel John 2013-06-07 17:52:03 +02:00
parent 7922661f80
commit 9c615e0086

View file

@ -5,10 +5,16 @@ class YoutubeDl < Formula
url 'http://youtube-dl.org/downloads/2013.05.23/youtube-dl-2013.05.23.tar.gz' url 'http://youtube-dl.org/downloads/2013.05.23/youtube-dl-2013.05.23.tar.gz'
sha1 '68e70bf1f285536e84e4fdf71c3d27fefd830612' sha1 '68e70bf1f285536e84e4fdf71c3d27fefd830612'
depends_on :python => :recommended
depends_on :python3 => :optional
def install def install
system "make", "youtube-dl", "PREFIX=#{prefix}" python do
bin.install 'youtube-dl' system python, "setup.py", "install", "--prefix=#{prefix}",
man1.install 'youtube-dl.1' "--record=installed.txt",
"--single-version-externally-managed"
cp bin/'youtube-dl', bin/"youtube-dl#{python.version.major}"
end
bash_completion.install 'youtube-dl.bash-completion' bash_completion.install 'youtube-dl.bash-completion'
end end