This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pygtksourceview: New formula (2.10.0)
- New formula pygtksourceview with test (fixes #16410) - Fix the pkgconfig file of pygtk, too, because the GTK project moved the `codegen` executable from pygtk into pygobject. - Fix minor typo in pygtk. Fixes #16410. Closes #16418. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
- Loading branch information
1 parent
69f02a9
commit 7306e83
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'formula' | ||
|
||
class Pygtksourceview < Formula | ||
homepage 'http://projects.gnome.org/gtksourceview/pygtksourceview.html' | ||
url 'http://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-2.10.0.tar.bz2' | ||
sha256 'bfdde2ce4f61d461fb34dece9433cf81a73a9c9de6b62d4eb06177b8c9cec9c7' | ||
|
||
depends_on 'pkg-config' => :build | ||
depends_on 'gtksourceview' | ||
depends_on 'pygtk' | ||
|
||
def install | ||
system "./configure", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}", | ||
"--disable-docs" # attempts to download chunk.xsl on demand (and sometimes fails) | ||
system "make install" | ||
end | ||
|
||
def caveats; <<-EOS.undent | ||
For non-homebrew Python, you need to amend your PYTHONPATH like so: | ||
export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH | ||
EOS | ||
end | ||
|
||
def which_python | ||
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip | ||
end | ||
|
||
def test | ||
system "python -c 'import gtksourceview2'" | ||
end | ||
end |