<HTML><BODY><div><div>LGTM.</div><div>Minor: Sasha, could you please change 1 comment below.</div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Пятница, 6 марта 2020, 15:59 +03:00 от Alexander V. Tikhonov <avtikhon@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><style type="text/css"></style><div><div id="style_15834995640434586771_BODY">Added new gitlab-ci test jobs for OSX 10.14 testings.<br><br>Set in use Python2 locally tapped version with its<br>latest commit in it, since Python 2 is EOL.<br><br>Set 'var' directory for test-run tool to the shorter<br>path name to avoid of issues with long names.<br>---<br><br>Github: <a href="https://github.com/tarantool/tarantool/tree/avtikhon/osx_on_mini14-full-ci" target="_blank">https://github.com/tarantool/tarantool/tree/avtikhon/osx_on_mini14-full-ci</a><br><br> .gitlab-ci.yml | 19 +--<br> .gitlab.mk | 2 +-<br> .travis.mk | 31 +++-<br> tools/brew_taps/tntpython2.rb | 306 ++++++++++++++++++++++++++++++++++<br> 4 files changed, 337 insertions(+), 21 deletions(-)<br> create mode 100644 tools/brew_taps/tntpython2.rb<br><br>diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml<br>index 5177a9903..47e4af5a2 100644<br>--- a/.gitlab-ci.yml<br>+++ b/.gitlab-ci.yml<br>@@ -152,28 +152,21 @@ osx_13_release:<br>     - ${GITLAB_MAKE} vms_test_osx<br> <br> osx_14_release:<br>- <<: *vbox_definition<br>+ <<: *docker_test_definition<br>   tags:<br>- - vms_osx_14<br>- variables:<br>- VMS_NAME: 'osx_14'<br>- VMS_USER: 'tarantool'<br>- VMS_PORT: '2222'<br>+ - osx_14<br>   script:<br>- - ${GITLAB_MAKE} vms_test_osx<br>+ - ${GITLAB_MAKE} test_osx<br> <br> osx_14_release_lto:<br>   <<: *release_only_definition<br>- <<: *vbox_definition<br>+ <<: *docker_test_definition<br>   tags:<br>- - vms_osx_14<br>+ - osx_14<br>   variables:<br>     EXTRA_ENV: "export CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON ;"<br>- VMS_NAME: 'osx_14'<br>- VMS_USER: 'tarantool'<br>- VMS_PORT: '2222'<br>   script:<br>- - ${GITLAB_MAKE} vms_test_osx<br>+ - ${GITLAB_MAKE} test_osx<br> <br> freebsd_12_release:<br>   <<: *vbox_definition<br>diff --git a/.gitlab.mk b/.gitlab.mk<br>index b39c5c651..d804d3cf6 100644<br>--- a/.gitlab.mk<br>+++ b/.gitlab.mk<br>@@ -14,7 +14,7 @@ git_submodule_update:<br>  git submodule update --recursive --init<br> <br> # Pass *_no_deps goals to .travis.mk.<br>-test_%_no_deps: git_submodule_update<br>+test_%: git_submodule_update<br>  ${TRAVIS_MAKE} $@<br> <br> # #######################################################<br>diff --git a/.travis.mk b/.travis.mk<br>index 42969ff56..a619ee95a 100644<br>--- a/.travis.mk<br>+++ b/.travis.mk<br>@@ -5,6 +5,7 @@<br> DOCKER_IMAGE?=packpack/packpack:debian-stretch<br> TEST_RUN_EXTRA_PARAMS?=<br> MAX_FILES?=65534<br>+MAX_PROC?=2500<br> <br> all: package<br> <br>@@ -127,13 +128,24 @@ test_asan_debian: deps_debian deps_buster_clang_8 test_asan_debian_no_deps<br> # OSX #<br> #######<br> <br>+# Python2 is EOF and we need to be sure that it is in use instead of Python3</div></div></div></div></blockquote></div><div># since Python 2 is EOL it's tapped version from local formula with its latest commit will be used</div><div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div><div class="js-helper js-readmsg-msg"><div><div>+OSX_PKGS=openssl readline curl icu4c libiconv zlib autoconf automake libtool cmake \<br>+ file://${PWD}/tools/brew_taps/tntpython2.rb<br>+<br> deps_osx:<br>- brew update<br>- brew install openssl readline curl icu4c libiconv zlib autoconf automake libtool --force<br>- python2 -V || brew install python2 --force<br>+ # install brew using command from Homebrew repository instructions:<br>+ # <a href="https://github.com/Homebrew/install" target="_blank">https://github.com/Homebrew/install</a><br>+ # NOTE: 'echo' command below is required since brew installation<br>+ # script obliges the one to enter a newline for confirming the<br>+ # installation via Ruby script.<br>+ brew update || echo | /usr/bin/ruby -e \<br>+ "$(curl -fsSL <a href="https://raw.githubusercontent.com/Homebrew/install/master/install" target="_blank">https://raw.githubusercontent.com/Homebrew/install/master/install</a>)"<br>+ # try to install the packages either upgrade it to avoid of fails<br>+ # if the package already exists with the previous version<br>+ brew install --force ${OSX_PKGS} || brew upgrade ${OSX_PKGS}<br>  curl --silent --show-error --retry 5 <a href="https://bootstrap.pypa.io/get-pip.py" target="_blank">https://bootstrap.pypa.io/get-pip.py</a> >get-pip.py<br>- python get-pip.py --user<br>- pip install --user --force-reinstall -r test-run/requirements.txt<br>+ python get-pip.py<br>+ pip install --force-reinstall -r test-run/requirements.txt<br> <br> build_osx:<br>  cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}<br>@@ -148,11 +160,16 @@ test_osx_no_deps: build_osx<br>  # call as tests runs call.<br>  # Tests: Temporary excluded replication/ suite with some tests<br>  # from other suites by issues #4357 and #4370<br>- echo tarantool | sudo -S launchctl limit maxfiles ${MAX_FILES} || : ; \<br>+ sudo -S launchctl limit maxfiles ${MAX_FILES} || : ; \<br>  launchctl limit maxfiles || : ; \<br>  ulimit -n ${MAX_FILES} || : ; \<br>  ulimit -n ; \<br>- cd test && ./test-run.py --force $(TEST_RUN_EXTRA_PARAMS) \<br>+ sudo -S launchctl limit maxproc ${MAX_PROC} || : ; \<br>+ launchctl limit maxproc || : ; \<br>+ ulimit -u ${MAX_PROC} || : ; \<br>+ ulimit -u ; \<br>+ rm -rf /tmp/tnt ; \<br>+ cd test && ./test-run.py --vardir /tmp/tnt --force $(TEST_RUN_EXTRA_PARAMS) \<br>  app/ app-tap/ box/ box-py/ box-tap/ engine/ engine_long/ long_run-py/ luajit-tap/ \<br>  replication-py/ small/ sql/ sql-tap/ swim/ unit/ vinyl/ wal_off/ xlog/ xlog-py/<br> <br>diff --git a/tools/brew_taps/tntpython2.rb b/tools/brew_taps/tntpython2.rb<br>new file mode 100644<br>index 000000000..59f374030<br>--- /dev/null<br>+++ b/tools/brew_taps/tntpython2.rb<br>@@ -0,0 +1,306 @@<br>+class Tntpython2 < Formula<br>+ desc "Interpreted, interactive, object-oriented programming language"<br>+ homepage "<a href="https://www.python.org/" target="_blank">https://www.python.org/</a>"<br>+ url "<a href="https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tar.xz" target="_blank">https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tar.xz</a>"<br>+ sha256 "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41"<br>+ revision 1<br>+ head "<a href="https://github.com/python/cpython.git" target="_blank">https://github.com/python/cpython.git</a>", :branch => "2.7"<br>+<br>+ bottle do<br>+ sha256 "accfaa922708f00afb69ab230199f96e6ecdddd248a1eca586ce1e5e5cfd732b" => :catalina<br>+ sha256 "54d3351d6be8268b2f5017894dcc8e083811dfa3812bdb9f79f989873b9a4542" => :mojave<br>+ sha256 "cfd5c6eeac37065d19f527bb0798a9caf1928bab3340cd545224861a3c82f219" => :high_sierra<br>+ end<br>+<br>+ # setuptools remembers the build flags python is built with and uses them to<br>+ # build packages later. Xcode-only systems need different flags.<br>+ pour_bottle? do<br>+ reason <<~EOS<br>+ The bottle needs the Apple Command Line Tools to be installed.<br>+ You can install them, if desired, with:<br>+ xcode-select --install<br>+ EOS<br>+ satisfy { MacOS::CLT.installed? }<br>+ end<br>+<br>+ depends_on "pkg-config" => :build<br>+ depends_on "gdbm"<br>+ depends_on "<a href="/compose?To=openssl@1.1">openssl@1.1</a>"<br>+ depends_on "readline"<br>+ depends_on "sqlite"<br>+<br>+ resource "setuptools" do<br>+ url "<a href="https://files.pythonhosted.org/packages/f4/d5/a6c19dcbcbc267aca376558797f036d9bcdff344c9f785fe7d0fe9a5f2a7/setuptools-41.4.0.zip" target="_blank">https://files.pythonhosted.org/packages/f4/d5/a6c19dcbcbc267aca376558797f036d9bcdff344c9f785fe7d0fe9a5f2a7/setuptools-41.4.0.zip</a>"<br>+ sha256 "7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d"<br>+ end<br>+<br>+ resource "pip" do<br>+ url "<a href="https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz" target="_blank">https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz</a>"<br>+ sha256 "21207d76c1031e517668898a6b46a9fb1501c7a4710ef5dfd6a40ad9e6757ea7"<br>+ end<br>+<br>+ resource "wheel" do<br>+ url "<a href="https://files.pythonhosted.org/packages/59/b0/11710a598e1e148fb7cbf9220fd2a0b82c98e94efbdecb299cb25e7f0b39/wheel-0.33.6.tar.gz" target="_blank">https://files.pythonhosted.org/packages/59/b0/11710a598e1e148fb7cbf9220fd2a0b82c98e94efbdecb299cb25e7f0b39/wheel-0.33.6.tar.gz</a>"<br>+ sha256 "10c9da68765315ed98850f8e048347c3eb06dd81822dc2ab1d4fde9dc9702646"<br>+ end<br>+<br>+ def lib_cellar<br>+ prefix/"Frameworks/Python.framework/Versions/2.7/lib/python2.7"<br>+ end<br>+<br>+ def site_packages_cellar<br>+ lib_cellar/"site-packages"<br>+ end<br>+<br>+ # The HOMEBREW_PREFIX location of site-packages.<br>+ def site_packages<br>+ HOMEBREW_PREFIX/"lib/python2.7/site-packages"<br>+ end<br>+<br>+ def install<br>+ # Unset these so that installing pip and setuptools puts them where we want<br>+ # and not into some other Python the user has installed.<br>+ ENV["PYTHONHOME"] = nil<br>+ ENV["PYTHONPATH"] = nil<br>+<br>+ args = %W[<br>+ --prefix=#{prefix}<br>+ --enable-ipv6<br>+ --datarootdir=#{share}<br>+ --datadir=#{share}<br>+ --enable-framework=#{frameworks}<br>+ --without-ensurepip<br>+ ]<br>+<br>+ # See upstream bug report from 22 Jan 2018 "Significant performance problems<br>+ # with Python 2.7 built with clang 3.x or 4.x"<br>+ # <a href="https://bugs.python.org/issue32616" target="_blank">https://bugs.python.org/issue32616</a><br>+ # <a href="https://github.com/Homebrew/homebrew-core/issues/22743" target="_blank">https://github.com/Homebrew/homebrew-core/issues/22743</a><br>+ if DevelopmentTools.clang_build_version >= 802 &&<br>+ DevelopmentTools.clang_build_version < 902<br>+ args << "--without-computed-gotos"<br>+ end<br>+<br>+ args << "--without-gcc" if ENV.compiler == :clang<br>+<br>+ cflags = []<br>+ ldflags = []<br>+ cppflags = []<br>+<br>+ if MacOS.sdk_path_if_needed<br>+ # Help Python's build system (setuptools/pip) to build things on SDK-based systems<br>+ # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot)<br>+ cflags << "-isysroot #{MacOS.sdk_path}" << "-I#{MacOS.sdk_path}/usr/include"<br>+ ldflags << "-isysroot #{MacOS.sdk_path}"<br>+ # For the Xlib.h, Python needs this header dir with the system Tk<br>+ # Yep, this needs the absolute path where zlib needed a path relative<br>+ # to the SDK.<br>+ cflags << "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers"<br>+ end<br>+<br>+ # Avoid linking to libgcc <a href="https://code.activestate.com/lists/python-dev/112195/" target="_blank">https://code.activestate.com/lists/python-dev/112195/</a><br>+ args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}"<br>+<br>+ # We want our readline and openssl! This is just to outsmart the detection code,<br>+ # superenv handles that cc finds includes/libs!<br>+ inreplace "setup.py" do |s|<br>+ s.gsub! "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",<br>+ "do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'"<br>+ s.gsub! "/usr/local/ssl", Formula["<a href="/compose?To=openssl@1.1">openssl@1.1</a>"].opt_prefix<br>+ end<br>+<br>+ inreplace "setup.py" do |s|<br>+ s.gsub! "sqlite_setup_debug = False", "sqlite_setup_debug = True"<br>+ s.gsub! "for d_ in inc_dirs + sqlite_inc_paths:",<br>+ "for d_ in ['#{Formula["sqlite"].opt_include}']:"<br>+<br>+ # Allow sqlite3 module to load extensions:<br>+ # <a href="https://docs.python.org/library/sqlite3.html#f1" target="_blank">https://docs.python.org/library/sqlite3.html#f1</a><br>+ s.gsub! 'sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))', ""<br>+ end<br>+<br>+ # Allow python modules to use ctypes.find_library to find homebrew's stuff<br>+ # even if homebrew is not a /usr/local/lib. Try this with:<br>+ # `brew install enchant && pip install pyenchant`<br>+ inreplace "./Lib/ctypes/macholib/dyld.py" do |f|<br>+ f.gsub! "DEFAULT_LIBRARY_FALLBACK = [", "DEFAULT_LIBRARY_FALLBACK = [ '#{HOMEBREW_PREFIX}/lib',"<br>+ f.gsub! "DEFAULT_FRAMEWORK_FALLBACK = [", "DEFAULT_FRAMEWORK_FALLBACK = [ '#{HOMEBREW_PREFIX}/Frameworks',"<br>+ end<br>+<br>+ args << "CFLAGS=#{cflags.join(" ")}" unless cflags.empty?<br>+ args << "LDFLAGS=#{ldflags.join(" ")}" unless ldflags.empty?<br>+ args << "CPPFLAGS=#{cppflags.join(" ")}" unless cppflags.empty?<br>+<br>+ system "./configure", *args<br>+ system "make"<br>+<br>+ ENV.deparallelize do<br>+ # Tell Python not to install into /Applications<br>+ system "make", "install", "PYTHONAPPSDIR=#{prefix}"<br>+ system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}"<br>+ end<br>+<br>+ # Fixes setting Python build flags for certain software<br>+ # See: <a href="https://github.com/Homebrew/homebrew/pull/20182" target="_blank">https://github.com/Homebrew/homebrew/pull/20182</a><br>+ # <a href="https://bugs.python.org/issue3588" target="_blank">https://bugs.python.org/issue3588</a><br>+ inreplace lib_cellar/"config/Makefile" do |s|<br>+ s.change_make_var! "LINKFORSHARED",<br>+ "-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)"<br>+ end<br>+<br>+ # Prevent third-party packages from building against fragile Cellar paths<br>+ inreplace [lib_cellar/"_sysconfigdata.py",<br>+ lib_cellar/"config/Makefile",<br>+ frameworks/"Python.framework/Versions/Current/lib/pkgconfig/python-2.7.pc"],<br>+ prefix, opt_prefix<br>+<br>+ # Symlink the pkgconfig files into HOMEBREW_PREFIX so they're accessible.<br>+ (lib/"pkgconfig").install_symlink Dir[frameworks/"Python.framework/Versions/Current/lib/pkgconfig/*"]<br>+<br>+ # Remove 2to3 because Python 3 also installs it<br>+ rm bin/"2to3"<br>+<br>+ # A fix, because python and python@2 both want to install Python.framework<br>+ # and therefore we can't link both into HOMEBREW_PREFIX/Frameworks<br>+ # <a href="https://github.com/Homebrew/homebrew/issues/15943" target="_blank">https://github.com/Homebrew/homebrew/issues/15943</a><br>+ ["Headers", "Python", "Resources"].each { |f| rm(prefix/"Frameworks/Python.framework/#{f}") }<br>+ rm prefix/"Frameworks/Python.framework/Versions/Current"<br>+<br>+ # Remove the site-packages that Python created in its Cellar.<br>+ site_packages_cellar.rmtree<br>+<br>+ (libexec/"setuptools").install resource("setuptools")<br>+ (libexec/"pip").install resource("pip")<br>+ (libexec/"wheel").install resource("wheel")<br>+ end<br>+<br>+ def post_install<br>+ # Avoid conflicts with lingering unversioned files from Python 3<br>+ rm_f %W[<br>+ #{HOMEBREW_PREFIX}/bin/easy_install<br>+ #{HOMEBREW_PREFIX}/bin/pip<br>+ #{HOMEBREW_PREFIX}/bin/wheel<br>+ ]<br>+<br>+ # Fix up the site-packages so that user-installed Python software survives<br>+ # minor updates, such as going from 2.7.0 to 2.7.1:<br>+<br>+ # Create a site-packages in HOMEBREW_PREFIX/lib/python2.7/site-packages<br>+ site_packages.mkpath<br>+<br>+ # Symlink the prefix site-packages into the cellar.<br>+ site_packages_cellar.unlink if site_packages_cellar.exist?<br>+ site_packages_cellar.parent.install_symlink site_packages<br>+<br>+ # Write our sitecustomize.py<br>+ rm_rf Dir["#{site_packages}/sitecustomize.py[co]"]<br>+ (site_packages/"sitecustomize.py").atomic_write(sitecustomize)<br>+<br>+ # Remove old setuptools installations that may still fly around and be<br>+ # listed in the easy_install.pth. This can break setuptools build with<br>+ # zipimport.ZipImportError: bad local file header<br>+ # setuptools-0.9.5-py3.3.egg<br>+ rm_rf Dir["#{site_packages}/setuptools*"]<br>+ rm_rf Dir["#{site_packages}/distribute*"]<br>+ rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]<br>+<br>+ setup_args = ["-s", "setup.py", "--no-user-cfg", "install", "--force",<br>+ "--verbose",<br>+ "--single-version-externally-managed",<br>+ "--record=installed.txt",<br>+ "--install-scripts=#{bin}",<br>+ "--install-lib=#{site_packages}"]<br>+<br>+ (libexec/"setuptools").cd { system "#{bin}/python", *setup_args }<br>+ (libexec/"pip").cd { system "#{bin}/python", *setup_args }<br>+ (libexec/"wheel").cd { system "#{bin}/python", *setup_args }<br>+<br>+ # When building from source, these symlinks will not exist, since<br>+ # post_install happens after linking.<br>+ %w[pip pip2 pip2.7 easy_install easy_install-2.7 wheel].each do |e|<br>+ (HOMEBREW_PREFIX/"bin").install_symlink bin/e<br>+ end<br>+<br>+ # Help distutils find brewed stuff when building extensions<br>+ include_dirs = [HOMEBREW_PREFIX/"include", Formula["<a href="/compose?To=openssl@1.1">openssl@1.1</a>"].opt_include,<br>+ Formula["sqlite"].opt_include]<br>+ library_dirs = [HOMEBREW_PREFIX/"lib", Formula["<a href="/compose?To=openssl@1.1">openssl@1.1</a>"].opt_lib,<br>+ Formula["sqlite"].opt_lib]<br>+<br>+ cfg = lib_cellar/"distutils/distutils.cfg"<br>+ cfg.atomic_write <<~EOS<br>+ [install]<br>+ prefix=#{HOMEBREW_PREFIX}<br>+ [build_ext]<br>+ include_dirs=#{include_dirs.join ":"}<br>+ library_dirs=#{library_dirs.join ":"}<br>+ EOS<br>+ end<br>+<br>+ def sitecustomize<br>+ <<~EOS<br>+ # This file is created by Homebrew and is executed on each python startup.<br>+ # Don't print from here, or else python command line scripts may fail!<br>+ # <<a href="https://docs.brew.sh/Homebrew-and-Python" target="_blank">https://docs.brew.sh/Homebrew-and-Python</a>><br>+ import re<br>+ import os<br>+ import sys<br>+ if sys.version_info[0] != 2:<br>+ # This can only happen if the user has set the PYTHONPATH for 3.x and run Python 2.x or vice versa.<br>+ # Every Python looks at the PYTHONPATH variable and we can't fix it here in sitecustomize.py,<br>+ # because the PYTHONPATH is evaluated after the sitecustomize.py. Many modules (e.g. PyQt4) are<br>+ # built only for a specific version of Python and will fail with cryptic error messages.<br>+ # In the end this means: Don't set the PYTHONPATH permanently if you use different Python versions.<br>+ exit('Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python ' +<br>+ str(sys.version_info[0]) + '.x!\\n PYTHONPATH is currently: "' + str(os.environ['PYTHONPATH']) + '"\\n' +<br>+ ' You should `unset PYTHONPATH` to fix this.')<br>+ # Only do this for a brewed python:<br>+ if os.path.realpath(sys.executable).startswith('#{rack}'):<br>+ # Shuffle /Library site-packages to the end of sys.path and reject<br>+ # paths in /System pre-emptively (#14712)<br>+ library_site = '/Library/Python/2.7/site-packages'<br>+ library_packages = [p for p in sys.path if p.startswith(library_site)]<br>+ sys.path = [p for p in sys.path if not p.startswith(library_site) and<br>+ not p.startswith('/System')]<br>+ # .pth files have already been processed so don't use addsitedir<br>+ sys.path.extend(library_packages)<br>+ # the Cellar site-packages is a symlink to the HOMEBREW_PREFIX<br>+ # site_packages; prefer the shorter paths<br>+ long_prefix = re.compile(r'#{rack}/[0-9\._abrc]+/Frameworks/Python\.framework/Versions/2\.7/lib/python2\.7/site-packages')<br>+ sys.path = [long_prefix.sub('#{site_packages}', p) for p in sys.path]<br>+ # LINKFORSHARED (and python-config --ldflags) return the<br>+ # full path to the lib (yes, "Python" is actually the lib, not a<br>+ # dir) so that third-party software does not need to add the<br>+ # -F/#{HOMEBREW_PREFIX}/Frameworks switch.<br>+ try:<br>+ from _sysconfigdata import build_time_vars<br>+ build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/2.7/Python'<br>+ except:<br>+ pass # remember: don't print here. Better to fail silently.<br>+ # Set the sys.executable to use the opt_prefix<br>+ sys.executable = '#{opt_bin}/python2.7'<br>+ EOS<br>+ end<br>+<br>+ def caveats; <<~EOS<br>+ Pip and setuptools have been installed. To update them<br>+ pip install --upgrade pip setuptools<br>+ You can install Python packages with<br>+ pip install <package><br>+ They will install into the site-package directory<br>+ #{site_packages}<br>+ See: <a href="https://docs.brew.sh/Homebrew-and-Python" target="_blank">https://docs.brew.sh/Homebrew-and-Python</a><br>+ EOS<br>+ end<br>+<br>+ test do<br>+ # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions<br>+ # and it can occur that building sqlite silently fails if OSX's sqlite is used.<br>+ system "#{bin}/python", "-c", "import sqlite3"<br>+ # Check if some other modules import. Then the linked libs are working.<br>+ system "#{bin}/python", "-c", "import Tkinter; root = Tkinter.Tk()"<br>+ system "#{bin}/python", "-c", "import gdbm"<br>+ system "#{bin}/python", "-c", "import zlib"<br>+ system bin/"pip", "list", "--format=columns"<br>+ end<br>+end<br>--<br>2.17.1<br> </div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Oleg Piskunov</div></div></div><div> </div></div></BODY></HTML>