From 745e4aee29057c3c737f42e76bfb4abd64b90091 Mon Sep 17 00:00:00 2001 From: Tim D. Smith Date: Sun, 2 Nov 2014 00:45:33 -0700 Subject: pypy3: build cffi extensions in lib_pypy Fixes a problem reported on IRC where these modules can't be imported by a different user than the user that installed Homebrew because building the cffi extensions writes files to the Cellar. Pypy's packaging script normally generates these but it isn't invoked by Homebrew. Closes #33813. --- Library/Formula/pypy3.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/pypy3.rb b/Library/Formula/pypy3.rb index a4fa14052..a0321d40b 100644 --- a/Library/Formula/pypy3.rb +++ b/Library/Formula/pypy3.rb @@ -58,6 +58,12 @@ class Pypy3 < Formula end def post_install + # Precompile cffi extensions in lib_pypy + # list from create_cffi_import_libraries in pypy/tool/release/package.py + %w[_sqlite3 _curses syslog gdbm _tkinter].each do |module_name| + quiet_system bin/"pypy3", "-c", "import #{module_name}" + end + # Post-install, fix up the site-packages and install-scripts folders # so that user-installed Python software survives minor updates, such # as going from 1.7.0 to 1.7.1. -- cgit v1.2.3