Commit a9289763 authored by Kirill Smelkov's avatar Kirill Smelkov

pygolang: v↑ (0.0.7.post1 -> 0.0.8)

This upgrade mainly fixes gpython and pymain to be more compatible with
CPython when handling command line. In particular it moves
sys.executable setup and -O handling into pymain:

pygolang!10
pygolang@21756bd3
pygolang@11b367c6
pygolang@8564dfdd
parent 0ca1ac5d
...@@ -37,21 +37,9 @@ interpreter = python ...@@ -37,21 +37,9 @@ interpreter = python
# interpreter code that buildout generates cannot process `-m pytest --<pytest-option>` # interpreter code that buildout generates cannot process `-m pytest --<pytest-option>`
# -> use pymain from gpython to workaround that. # -> use pymain from gpython to workaround that.
initialization = initialization =
# minimal support for -O argument.
if '-O' in sys.argv:
import os
with open(sys.argv[0]) as f:
executable = f.readlines()[0][2:-1]
sys.argv.remove('-O')
os.execve(executable, sys.argv, dict(os.environ, PYTHONOPTIMIZE='1'))
# set sys.executable to self, so that subprocess and friends go through us
# and this way spawn children with correct sys.path where all eggs that
# parent have are present. TODO consider migrating this into pymain
sys.executable = sys.argv[0]
# tail to pymain # tail to pymain
from gpython import pymain from gpython import pymain
pymain(sys.argv[1:]) pymain(sys.argv)
sys.exit(0) sys.exit(0)
# don't install scripts from listed eggs (avoid conflict with other sections # don't install scripts from listed eggs (avoid conflict with other sections
# that use zc.recipe.egg with eggs overlapping with ${:eggs} - ex neoppod) # that use zc.recipe.egg with eggs overlapping with ${:eggs} - ex neoppod)
...@@ -62,4 +50,4 @@ scripts = ${:interpreter} ...@@ -62,4 +50,4 @@ scripts = ${:interpreter}
[versions] [versions]
pygolang = 0.0.7.post1 pygolang = 0.0.8
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment