diff options
| author | Tim D. Smith | 2015-03-22 21:00:53 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2015-03-23 08:06:05 -0700 |
| commit | e44ee7f50193f78ffa2109356f637f17c9e31fa5 (patch) | |
| tree | cecc18dd25ff24688dec2523753c2d600e6005ff /Library | |
| parent | 4596a823f0f144b7c596eb9f18a3bb7c6faf8463 (diff) | |
| download | homebrew-e44ee7f50193f78ffa2109356f637f17c9e31fa5.tar.bz2 | |
python3: fix LINKFORSHARED
Fixes #37923.
Closes #37986.
Signed-off-by: Tim D. Smith <git@tim-smith.us>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/python3.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb index 73a9714ce..d0104688c 100644 --- a/Library/Formula/python3.rb +++ b/Library/Formula/python3.rb @@ -143,6 +143,13 @@ class Python3 < Formula # Remove the site-packages that Python created in its Cellar. site_packages_cellar.rmtree + # These makevars are available through distutils.sysconfig at runtime and + # some third-party software packages depend on them + inreplace frameworks/"Python.framework/Versions/#{xy}/lib/python#{xy}/config-#{xy}m/Makefile" do |s| + s.change_make_var! "LINKFORSHARED", + "-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/#{xy}/Python" + end + %w[setuptools pip].each do |r| (libexec/r).install resource(r) end @@ -258,16 +265,6 @@ class Python3 < Formula long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/#{xy}/lib/python#{xy}/site-packages') sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path] - # LINKFORSHARED (and python-config --ldflags) return the - # full path to the lib (yes, "Python" is actually the lib, not a - # dir) so that third-party software does not need to add the - # -F/#{HOMEBREW_PREFIX}/Frameworks switch. - try: - from _sysconfigdata import build_time_vars - build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/#{xy}/Python' - except: - pass # remember: don't print here. Better to fail silently. - # Set the sys.executable to use the opt_prefix sys.executable = '#{opt_bin}/python#{xy}' EOF |
