[MacPorts] #49838: qt5-qtwebengine build breaks if default python is python3

MacPorts noreply at macports.org
Sun Nov 29 08:18:44 PST 2015


#49838: qt5-qtwebengine build breaks if default python is python3
------------------------------+------------------------
  Reporter:  mmoll@…          |      Owner:  mcalhoun@…
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.3.4
Resolution:                   |   Keywords:
      Port:  qt5-qtwebengine  |
------------------------------+------------------------
Changes (by mcalhoun@…):

 * status:  new => assigned


Comment:

 The offending code seems to come from
 tools/qmake/mkspecs/features/functions.prf
 {{{
 defineTest(isPythonVersionSupported) {
   python_major_version = $$system('python -c "import sys; print
 sys.version_info.major"')
   python_minor_version = $$system('python -c "import sys; print
 sys.version_info.minor"')
   lessThan(python_major_version, 3): greaterThan(python_major_version, 1):
 greaterThan(python_minor_version, 6): return(true)
   skipBuild("Using Python version
 "$$python_major_version"."$$python_minor_version", but Python version 2
 (2.7 or later) is required to build Qt WebEngine.")
   return(false)
 }}}
 Even if the print statement worked, it would still reject
 python_major_version>=3 by reporting that Python 2.7 or later is required.

 I do not see a way of specifying a particular PYTHON program (although I
 do see many instances of {{{#!/usr/bin/env python}}}.

 I committed a workaround in r142959.[[BR]]
 Although not ideal, does it fix the problem?

-- 
Ticket URL: <https://trac.macports.org/ticket/49838#comment:1>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list