diff options
| author | Alexei Sholik | 2011-06-30 02:02:17 +0300 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-08-30 19:54:16 -0700 |
| commit | f4042b272cb318da24e04e6eada5d38a1edf5331 (patch) | |
| tree | 6ad5cf937d1ea80720e3e4f0e5e559f2a00d5dfe /Library/Formula/python.rb | |
| parent | e3010aa71a5b7cf1fc60edd7e0cb27f86f5f134a (diff) | |
| download | homebrew-f4042b272cb318da24e04e6eada5d38a1edf5331.tar.bz2 | |
Python: Add `pythonw` for non-Framework installs
We hardlink pythonw and pythonw2.7 to python and python2.7 respectively.
They may be used by 3rd party tools (like PyQt4) and, for some reason, python's
install script doesn't provide them when doing a non-framework install.
The man page (which comes with Mac OS X) on pythonw reads:
As of Python 2.5, python and pythonw are interchangeable; both execute
Python in the context of an application bundle, which means they have access
to the Graphical User Interface; thus both can, when properly programmed,
display windows, dialogs, etc.
See also this discussion https://github.com/mxcl/homebrew/issues/6176.
Hardlinks are placed in the same directory in which python and python2.7 reside
in order to be symlinked to /usr/local/bin as part of the installation process.
This also ensures a clean uninstall of the formula.
Closes #6248.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula/python.rb')
| -rw-r--r-- | Library/Formula/python.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index 2adb808ef..b6df52a39 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -84,6 +84,13 @@ class Python < Formula # Symlink the prefix site-packages into the cellar. ln_s prefix_site_packages, site_packages + # This is a fix for better interoperability with pyqt. + # See Issue #6176. + if not as_framework? + (bin+"pythonw").make_link bin+"python" + (bin+"pythonw2.7").make_link bin+"python2.7" + end + # Tell distutils-based installers where to put scripts scripts_folder.mkpath (effective_lib+"python2.7/distutils/distutils.cfg").write <<-EOF.undent |
