#32335: pypy-c wrapper script breaks some command-line usages of pypy ---------------------------------------+------------------------------------ Reporter: macports.org@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: jmr@macports.org | Port: pypy ---------------------------------------+------------------------------------ {{{
python2.7 -mtimeit -s 'import random' 'random.random()' 10000000 loops, best of 3: 0.116 usec per loop pypy-c -mtimeit -s 'import random' 'random.random()' Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "/opt/local/lib/pypy/lib-python/2.7/runpy.py", line 162, in _run_module_as_ "__main__", fname, loader, pkg_name) File "/opt/local/lib/pypy/lib-python/2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/opt/local/lib/pypy/lib-python/2.7/timeit.py", line 328, in <module> sys.exit(main()) File "/opt/local/lib/pypy/lib-python/2.7/timeit.py", line 292, in main t = Timer(stmt, setup, timer) File "/opt/local/lib/pypy/lib-python/2.7/timeit.py", line 136, in __init__ code = compile(src, dummy_src_name, "exec") File "<timeit-src>", line 3 import ^ SyntaxError: invalid syntax }}} The problem is that Macports's wrapper `pypy-c` script uses a raw `$@` to proxy the arguments to the actual pypy binary, which "unpacks" them. `$@` should be quoted, or the script should be replaced by a symlink.
As I'm not sure how to setup symlinks via portfiles, I'll just link a patch to correctly quoting the file in question. -- Ticket URL: <https://trac.macports.org/ticket/32335> MacPorts <http://www.macports.org/> Ports system for Mac OS