Commit 0e3da017 authored by Kirill Smelkov's avatar Kirill Smelkov

gpython: Include gevent version into banner

Gevent is major component gpython builds on - it deserves to be included
into version and is handy to know if one hits a bug with gpython - to
see in which particular runtime environment the bug was hit.

Before:

    $ gpython
    Python 3.7.3 (default, Dec 20 2019, 18:57:59)
    [GCC 8.3.0] [GPython 0.0.6.post2] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    (InteractiveConsole)
    >>>

After:

    $ gpython
    Python 3.7.3 (default, Dec 20 2019, 18:57:59)
    [GCC 8.3.0] [GPython 0.0.6.post2] [gevent 20.5.1] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    (InteractiveConsole)
    >>>

/cc @gabriel, @jerome
/proposed-for-review-on: !4
parent c3fdd1c0
......@@ -150,6 +150,7 @@ def main():
'\n\n\t%s\n\nsys.modules:\n\n\t%s' % (bad, sysmodv))
# make gevent pre-available & stdlib patched
import gevent
from gevent import monkey
# XXX workaround for gevent vs pypy2 crash.
# XXX remove when gevent-1.4.1 is relased (https://github.com/gevent/gevent/pull/1357).
......@@ -182,7 +183,7 @@ def main():
exe = exe + '.exe'
sys.executable = exe
sys.version += (' [GPython %s]' % golang.__version__)
sys.version += (' [GPython %s] [gevent %s]' % (golang.__version__, gevent.__version__))
# tail to pymain
pymain(sys.argv[1:])
......
......@@ -91,9 +91,11 @@ def test_gevent_activated():
@gpython_only
def test_executable():
# sys.executable must point to gpython and we must be able to execute it.
import gevent
assert 'gpython' in sys.executable
out = pyout(['-c', 'import sys; print(sys.version)'])
assert ('[GPython %s]' % golang.__version__) in str(out)
assert ('[gevent %s]' % gevent.__version__) in str(out)
# verify pymain.
#
......
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