diff options
| author | Jack Nagel | 2012-08-13 10:00:30 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-13 10:00:30 -0500 |
| commit | 78011a1de7c5312d65c0012e50584434fe6b803b (patch) | |
| tree | 40bcf161cfb7f88d04f02172cf2704dd964c8624 | |
| parent | 561e6d32c16a6a726f55635d70300ffd92d59236 (diff) | |
| download | homebrew-78011a1de7c5312d65c0012e50584434fe6b803b.tar.bz2 | |
python: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Formula/python.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index ebb451205..e6e04cba2 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -37,12 +37,8 @@ class Python < Formula depends_on 'gdbm' => :optional depends_on :x11 # tk.h includes X11/Xlib.h and X11/X.h - def options - [ - ["--universal", "Build for both 32 & 64 bit Intel."], - ["--quicktest", "Run `make quicktest` after build."] - ] - end + option :universal + option 'quicktest', 'Run `make quicktest` after the build' # Skip binaries so modules will load; skip lib because it is mostly Python files skip_clean ['bin', 'lib'] @@ -88,7 +84,7 @@ class Python < Formula ENV.append_to_cflags '-Qunused-arguments' end - if ARGV.build_universal? + if build.universal? args << "--enable-universalsdk=/" << "--with-universal-archs=intel" end @@ -108,7 +104,7 @@ class Python < Formula system "make", "install", "PYTHONAPPSDIR=#{prefix}" # Demos and Tools into HOMEBREW_PREFIX/share/python2.7 system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{share}/python2.7" - system "make", "quicktest" if ARGV.include? '--quicktest' + system "make", "quicktest" if build.include? 'quicktest' # Post-install, fix up the site-packages and install-scripts folders # so that user-installed Python software survives minor updates, such |
