Bug 223854 - x11-toolkits/py-wxPython-common: invalid syntax during build
Summary: x11-toolkits/py-wxPython-common: invalid syntax during build
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Walter Schwarzenfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-24 20:55 UTC by Charlie Li
Modified: 2019-08-14 10:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (python)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Li freebsd_committer freebsd_triage 2017-11-24 20:55:56 UTC
On systems with Python 3 set in DEFAULT_VERSIONS, the build fails with a Python 2-ism syntax error:

===>  Building for py36-wxPython-common-3.0.2.0_4
/usr/local/bin/python3.6 /usr/local/lib/python3.6/compileall.py -d /usr/local/lib/python3.6/site-packages -f /wrkdirs/usr/ports/x11-toolkits/py-wxPython-common/work/wxPython-src-3.0.2.0/wxPython/wxversion
Listing '/wrkdirs/usr/ports/x11-toolkits/py-wxPython-common/work/wxPython-src-3.0.2.0/wxPython/wxversion'...
Compiling '/wrkdirs/usr/ports/x11-toolkits/py-wxPython-common/work/wxPython-src-3.0.2.0/wxPython/wxversion/wxversion.py'...
***   File "/usr/local/lib/python3.6/site-packages/wxversion.py", line 430
    print "Asked for %s, (%s):\t got: %s" % (version, optionsRequired, sys.path[0])
                                        ^
SyntaxError: invalid syntax

*** Error code 1

Stop.
make: stopped in /usr/ports/x11-toolkits/py-wxPython-common

I have a feeling this code was never intended to execute on Python 3 at all, so maybe restricting to Python 2 would be good.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-09-03 15:06:08 UTC
MASTERDIR Makefile (x11-toolkits/py-wxPython30)
shows:
USES= python:2.7

 py36-wxPython-common-3.0.2.0_5 Unknown flavor 'py36', possible flavors:
py27..
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-08-14 10:05:10 UTC
Builds fine with DEFAULT_VERSIONS+=python=3.6. Not a Bug!

If there are still problems, please reopen.