diff options
| author | Adam Vandenberg | 2014-03-09 14:00:39 -0700 | 
|---|---|---|
| committer | Adam Vandenberg | 2014-03-09 15:36:23 -0700 | 
| commit | b9cc9e1b73b1f3ce9e70f9cd5581f830857c1b81 (patch) | |
| tree | 2190c914c2811653dad2922a4efb9248167b966b /Library/Formula/pyside.rb | |
| parent | 71f25e44b846c2a66cf420719de4b0c35cb9b44d (diff) | |
| download | homebrew-b9cc9e1b73b1f3ce9e70f9cd5581f830857c1b81.tar.bz2 | |
pyside: install sphinx at build-time to build docs
Also provide an option to skip building docs, though it doesn't
seem to save much time overall and may be removed.
Closes #27228.
Diffstat (limited to 'Library/Formula/pyside.rb')
| -rw-r--r-- | Library/Formula/pyside.rb | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/Library/Formula/pyside.rb b/Library/Formula/pyside.rb index 3dda9c977..2ea12f518 100644 --- a/Library/Formula/pyside.rb +++ b/Library/Formula/pyside.rb @@ -8,6 +8,8 @@ class Pyside < Formula    head 'git://gitorious.org/pyside/pyside.git' +  option "without-docs", "Skip building documentation" +    depends_on 'cmake' => :build    depends_on 'shiboken'    depends_on 'qt' @@ -16,7 +18,27 @@ class Pyside < Formula      DATA  # Fix moc_qpytextobject.cxx not found (https://codereview.qt-project.org/62479)    end +  resource 'sphinx' do +    url 'https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.2.tar.gz' +    sha1 '9e424b03fe1f68e0326f3905738adcf27782f677' +  end +    def install +    if build.with? "docs" +      (buildpath/"sphinx").mkpath + +      resource("sphinx").stage do +        system "python", "setup.py", "install", +                                     "--prefix=#{buildpath}/sphinx", +                                     "--record=installed.txt", +                                     "--single-version-externally-managed" +      end + +      ENV.prepend_path "PATH", (buildpath/"sphinx/bin") +    else +      rm buildpath/"doc/CMakeLists.txt" +    end +      # Add out of tree build because one of its deps, shiboken, itself needs an      # out of tree build in shiboken.rb.      mkdir "macbuild" do | 
