I was able to get runsnake to work by installing it into SAGE_LOCAL,
along with a wxPython also built and installed against the Python in
SAGE_LOCAL. This turned out to be a bit of a pain in the ass (for
wxPython) mostly. This is because by default wxPython tries to build
its own copy of wxWidgets instead of using the system library, and it
can wind up with various incompatibilities. It's possible to disable
this but not easy enough, so I'll likely be submitting a patch to
wxPython for this.
On Ubuntu Bionic I did the following:
First I installed some build dependencies for wxPython:
$ sudo apt-get install libgtk-3-dev libwxgtk3.0-gtk3-dev
libwxgtk-media3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev
Installing wxPython should be possible with pip, but it isn't right
now if you want to prevent it from building its own wxWidgets.
Instead I used pip just to download and extract the source tarball:
$ mkdir tmp
$ python3 -m pip download -b tmp/ wxPython
$ cd tmp/wxPython
Apply the following patch to `setup.py` (this is the main problem--it
should be possible to pass this and other flags at the command-line,
but since it isn't we need to patch it =_=):
--- setup.py.orig 2020-03-06 15:20:07.843216794 +0100
+++ setup.py 2020-03-06 15:20:32.315063326 +0100
@@ -128,7 +128,8 @@
'message and the wxWidgets and Phoenix build steps in
the future.\n')
# Use the same Python that is running this script.
- cmd = ['"{}"'.format(sys.executable), '-u', 'build.py', 'build']
+ cmd = ['"{}"'.format(sys.executable), '-u', 'build.py', 'build',
+ '--use_syswx']
cmd = ' '.join(cmd)
runcmd(cmd)
Now it should work, if you have all the build dependencies and a
working wxWidgets to run:
$ python3 -m pip install -v .
Finally, install runsnake
$ python3 -m pip install runsnakerun
Ensure your `runsnake` is the one in SAGE_LOCAL:
$ which runsnake
If so, go ahead and start it. Loading the stat file produced by
cProfile should work.