From 2b75eeaa5b004c9c09a53338ad905acfc78e14bb Mon Sep 17 00:00:00 2001 From: papaeye Date: Thu, 26 Jul 2012 17:12:15 +0900 Subject: pypy: Fix the location of distutils.cfg In PyPy 1.9, the directory "lib-python/modified-2.7" has been removed, and its content merged into "lib-python/2.7" (from whatsnew-1.9.rst). In PyPy 1.4.1, the location is "lib-python/modified-2.5.2". Signed-off-by: Adam Vandenberg --- Library/Formula/pypy.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/pypy.rb b/Library/Formula/pypy.rb index 28471a420..608ed85b6 100644 --- a/Library/Formula/pypy.rb +++ b/Library/Formula/pypy.rb @@ -35,7 +35,7 @@ class Pypy < Formula # Tell distutils-based installers where to put scripts scripts_folder.mkpath - (prefix+"lib-python/modified-2.7/distutils/distutils.cfg").write <<-EOF.undent + (distutils+"distutils.cfg").write <<-EOF.undent [install] install-scripts=#{scripts_folder} EOF @@ -57,7 +57,7 @@ class Pypy < Formula def caveats message = <<-EOS.undent A "distutils.cfg" has been written to: - #{lib}/pypy/distutils + #{distutils} specifing the install-scripts folder as: #{scripts_folder} @@ -92,4 +92,13 @@ class Pypy < Formula def scripts_folder HOMEBREW_PREFIX+"share/pypy" end + + # The Cellar location of distutils + def distutils + if MacOS.prefer_64_bit? + prefix+"lib-python/2.7/distutils" + else + prefix+"lib-python/modified-2.5.2/distutils" + end + end end -- cgit v1.2.3