Re: [pypy-dev] PyPy2 v5.3.0 released, help us get the word out
Awesome work, I ask this every time (on one site or another) - is cpyext complete enough to use Gtk3 (gi.repository) yet. ? S++ On Wednesday, June 8, 2016 10:14 PM, Phyo Arkarwrote: Nice to see nim guys on PyPy too , Kirbyfan! On Thu, Jun 9, 2016 at 3:09 AM Ryan Gonzalez wrote: Posted to /r/programming!-- Ryan [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something’s wrong. http://kirbyfan64.github.io/On Jun 8, 2016 2:53 PM, "Matti Picus" wrote: https://morepypy.blogspot.co.il/2016/06/pypy2-v53-released-major-c-extension.html This is the culmination of ~6 months of teamwork to get cpyext to a state where it can run lxml, numpy, scipy, matplotlib, It runs, but is slow and maybe buggy. We need to create some new momentum around PyPy, to encourage uptake, to get more sponsorships, and to get some new contributors, so now is the time to try this version out, and show it off to your friends, coworkers, and managers. Matti ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] sysconfig.get_path('include') incorrect in virtualenv
If I create a virtualenv: /mnt/data/home/stu/.virtualenvs/pypy-venv Then run try and get the include path using sysconfig it is incorrect: import sysconfig sysconfig.get_path('include')'/mnt/data/home/stu/local/include' It should be:/mnt/data/home/stu/.virtualenvs/pypy-venv/include or possibly where that symlink points to:/usr/lib/pypy/include This then affects python-config which means I get stuck trying to compile pygobject. S++___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] sysconfig.get_path('include') incorrect in virtualenv
Moved to issue 2392 - I probably need to do a bit more testing on sysconfig of the different paths:https://bitbucket.org/pypy/pypy/issues/2392/differences-with-sysconfig S++ On Saturday, September 3, 2016 4:02 PM, Stuart Axon <stua...@yahoo.com> wrote: A bit more info: sysconfig._get_default_scheme() returns 'pypy-local'. If I change this to return 'pypy' then the include path is correct. I'm not fully sure how it supposed to decide between the two ? S++ On Saturday, September 3, 2016 2:56 PM, Stuart Axon via pypy-dev <pypy-dev@python.org> wrote: If I create a virtualenv: /mnt/data/home/stu/.virtualenvs/pypy-venv Then run try and get the include path using sysconfig it is incorrect: >>>> import sysconfig>>>> >>>> sysconfig.get_path('include')'/mnt/data/home/stu/local/include' It should be:/mnt/data/home/stu/.virtualenvs/pypy-venv/include or possibly where that symlink points to:/usr/lib/pypy/include This then affects python-config which means I get stuck trying to compile pygobject. S++ ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] sysconfig.get_path('include') incorrect in virtualenv
A bit more info: sysconfig._get_default_scheme() returns 'pypy-local'. If I change this to return 'pypy' then the include path is correct. I'm not fully sure how it supposed to decide between the two ? S++ On Saturday, September 3, 2016 2:56 PM, Stuart Axon via pypy-dev <pypy-dev@python.org> wrote: If I create a virtualenv: /mnt/data/home/stu/.virtualenvs/pypy-venv Then run try and get the include path using sysconfig it is incorrect: >>>> import sysconfig>>>> >>>> sysconfig.get_path('include')'/mnt/data/home/stu/local/include' It should be:/mnt/data/home/stu/.virtualenvs/pypy-venv/include or possibly where that symlink points to:/usr/lib/pypy/include This then affects python-config which means I get stuck trying to compile pygobject. S++ ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] PyBaseExceptionObject has no member named ‘args’
Found this trying to compile pycairo, is it worth opening a bug about? (I realise there is CairoCFFI, but they don't have feature parity - OTOH, CFFI probably is the way to go eventually). $ python setup.py install running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/cairo copying cairo/__init__.py -> build/lib.linux-x86_64-2.7/cairo running build_ext building 'cairo._cairo' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/cairo cc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/home/stu/.virtualenvs/pypy-nightly/include -c cairo/device.c -o build/temp.linux-x86_64-2.7/cairo/device.o -fno-strict-aliasing cc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/home/stu/.virtualenvs/pypy-nightly/include -c cairo/bufferproxy.c -o build/temp.linux-x86_64-2.7/cairo/bufferproxy.o -fno-strict-aliasing cc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/home/stu/.virtualenvs/pypy-nightly/include -c cairo/error.c -o build/temp.linux-x86_64-2.7/cairo/error.o -fno-strict-aliasing In file included from /home/stu/.virtualenvs/pypy-nightly/include/Python.h:81:0, from cairo/error.c:32: cairo/error.c: In function ‘error_init’: cairo/error.c:111:35: error: ‘PyBaseExceptionObject {aka struct }’ has no member named ‘args’ if(PyTuple_GET_SIZE(self->base.args) >= 2) { ^ /home/stu/.virtualenvs/pypy-nightly/include/object.h:61:39: note: in definition of macro ‘Py_SIZE’ #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) ^~ cairo/error.c:111:8: note: in expansion of macro ‘PyTuple_GET_SIZE’ if(PyTuple_GET_SIZE(self->base.args) >= 2) { ^~~~ In file included from /home/stu/.virtualenvs/pypy-nightly/include/Python.h:108:0, from cairo/error.c:32: cairo/error.c:112:49: error: ‘PyBaseExceptionObject {aka struct }’ has no member named ‘args’ status_obj = PyTuple_GET_ITEM(self->base.args, 1); ^ /home/stu/.virtualenvs/pypy-nightly/include/tupleobject.h:23:53: note: in definition of macro ‘PyTuple_GET_ITEM’ #define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i]) ^~ In file included from /home/stu/.virtualenvs/pypy-nightly/include/Python.h:81:0, from cairo/error.c:32: cairo/error.c: In function ‘error_str’: cairo/error.c:152:36: error: ‘PyBaseExceptionObject {aka struct }’ has no member named ‘args’ if (PyTuple_GET_SIZE(self->base.args) >= 1) { ^ /home/stu/.virtualenvs/pypy-nightly/include/object.h:61:39: note: in definition of macro ‘Py_SIZE’ #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) ^~ cairo/error.c:152:9: note: in expansion of macro ‘PyTuple_GET_SIZE’ if (PyTuple_GET_SIZE(self->base.args) >= 1) { ^~~~ In file included from /home/stu/.virtualenvs/pypy-nightly/include/Python.h:108:0, from cairo/error.c:32: cairo/error.c:153:56: error: ‘PyBaseExceptionObject {aka struct }’ has no member named ‘args’ return PyObject_Str(PyTuple_GET_ITEM(self->base.args, 0)); ^ /home/stu/.virtualenvs/pypy-nightly/include/tupleobject.h:23:53: note: in definition of macro ‘PyTuple_GET_ITEM’ #define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i]) ^~ error: command 'cc' failed with exit status 1 ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] Cocos2D - works for me.
Hi, Today I was trying out Cocos2D in PyPy, it seems work :) I don't have any of my own projects to try, but all the examples that come with it seem to work, I also tried some tutorials which seemed to work as well. Not sure if I use use it enough to be able to say "it works", but I wasn't able to break it, los-cocos/cocos | | | | | | | | | | | los-cocos/cocos cocos - graphic library for games and multimedia, for python language on PC-like hardware | | | S++___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] Tkinter ?
Hi all, Is TkInter pypy still a thing ? I was trying some demos from aubio from pypy but they didn't work [1].My first thought was to try and install tkinter-pypy but that doens't seem to exist any more. I'm testing with pypy-nightly trunk on Ubuntu 17.04 64 bit. [1]$ python demo_keyboard.py Traceback (most recent call last): File "demo_keyboard.py", line 60, in import matplotlib.pyplot as plt File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/pyplot.py", line 115, in _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup globals(),locals(),[backend_name],0) File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/backend_tkagg.py", line 13, in import matplotlib.backends.tkagg as tkagg File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/tkagg.py", line 9, in from matplotlib.backends import _tkagg RuntimeError: Cannot dlopen tkinter module file S++___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Tkinter ?
Here is backend_wx.pyhttps://pastebin.com/0bHs4rY5 from~/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+112.g17ec41612.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wx.py Around line 1818 there is a mix of tabs and spaces, which doesn't seem right. Also "class PrintoutWx(wx.Printout):" appears more than once. I'm using the method from that webpage, the only change is I added "sudo" and "-y" to the apt-get line. I used my script to grab pypy nightly:https://gist.github.com/stuaxo/5d4c0363317a875617271a6d424abbba activated the virtualenv it created for trunk $ source ~/.virtualenvs/pypy-nightly-trunk/bin/activate Then ran the script - pointing at the virtualenv$ ./build_wx-cffi.sh $VIRTUAL_ENV I noticed this error when building: doc "/mnt/data/home/stu/.virtualenvs/pypy-nightly-trunk/bin/pypy" etg/grid.py --cffi --nodoc Traceback (most recent call last): File "etg/grid.py", line 392, in run() File "etg/grid.py", line 387, in run tools.runGenerators(module) File "/tmp/t/wxpython-cffi/etgtools/tweaker_tools.py", line 636, in runGenerators g.generate(module) File "/tmp/t/wxpython-cffi/etgtools/pi_generator.py", line 52, in generate self.generateModule(module, stream) File "/tmp/t/wxpython-cffi/etgtools/pi_generator.py", line 149, in generateModule function(item, stream) File "/tmp/t/wxpython-cffi/etgtools/pi_generator.py", line 365, in generateClass bases = [self.fixWxPrefix(b, True) for b in bases] File "/tmp/t/wxpython-cffi/etgtools/tweaker_tools.py", line 96, in fixWxPrefix self._getCoreTopLevelNames() File "/tmp/t/wxpython-cffi/etgtools/tweaker_tools.py", line 133, in _getCoreTopLevelNames parseTree = ast.parse(text, filename) File "/home/stu/pypy-nightly/trunk/pypy-c-jit-latest-linux64/lib-python/2.7/ast.py", line 37, in parse return compile(source, filename, mode, PyCF_ONLY_AST) File "wx/core.pi", line 27712 def operator==(): I can't paste the whole compile output on pastebin as it is > 512k On Saturday, September 30, 2017, 8:56:48 PM GMT+1, Matti Picus <matti.pi...@gmail.com> wrote: #yiv9103688383 body p {margin-bottom:0cm;margin-top:0pt;} On 30/09/17 03:32, Stuart Axon via pypy-dev wrote: Cheers for the suggestons on TKinter and matplotlib - mplcairo is out, since it uses pycairo (as opposed to cairocffi). Wx-CFFI looks interesting, however all the matplotlib tutorials give me errors like the one below, so that is probably out as well for now - I'll definitely keep an eye on it and see it starts working though. $ python pyplot.py /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/core.py:17: UserWarning: wxPython/wxWidgets release number mismatch warnings.warn("wxPython/wxWidgets release number mismatch") /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/_core.py:31546: UserWarning: implicit cast from 'unsigned char *' to 'char *' will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct) clib.Cursor_set_flags(wrapper_lib.get_ptr(self), flags) Traceback (most recent call last): File "pyplot.py", line 38, in import matplotlib.pyplot as plt File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 113, in _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/__init__.py", line 60, in pylab_setup [backend_name], 0) File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wxagg.py", line 12, in from . import backend_wx File"/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wx.py", line 1818 SyntaxError: return outside function That seems like a strange syntax error, since backend_wx.py is used in the standard matplotlib (non-pypy) which is green on their buildbot. if you are using the method here https://pythonfiles.wordpress.com/2017/06/28/making-matplotlib-work-with-pypy/ perhaps it just needs a bit of tweaking for newer versions of backend_wx Could you post your backend_wx.py to a pastebin or gist so we can reproduce? Matti ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] Numpy or Numpypy
Hi, I'm trying out aubio and pysoundcard with pypy nightly. They use numpy, should I still be using numpypy or is upstream numpy the way to go ? S++___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Tkinter ?
Cheers for the suggestons on TKinter and matplotlib - mplcairo is out, since it uses pycairo (as opposed to cairocffi). Wx-CFFI looks interesting, however all the matplotlib tutorials give me errors like the one below, so that is probably out as well for now - I'll definitely keep an eye on it and see it starts working though. $ python pyplot.py /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/core.py:17: UserWarning: wxPython/wxWidgets release number mismatch warnings.warn("wxPython/wxWidgets release number mismatch") /home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/wx/_core.py:31546: UserWarning: implicit cast from 'unsigned char *' to 'char *' will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct) clib.Cursor_set_flags(wrapper_lib.get_ptr(self), flags) Traceback (most recent call last): File "pyplot.py", line 38, in import matplotlib.pyplot as plt File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 113, in _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/__init__.py", line 60, in pylab_setup [backend_name], 0) File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wxagg.py", line 12, in from . import backend_wx File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib-2.1.0rc1+110.g963f91300.dirty-py2.7-linux-x86_64.egg/matplotlib/backends/backend_wx.py", line 1818 SyntaxError: return outside function On Wednesday, September 13, 2017, 12:53:16 PM GMT+1, Stuart Axonwrote: Hi all, Is TkInter pypy still a thing ? I was trying some demos from aubio from pypy but they didn't work [1].My first thought was to try and install tkinter-pypy but that doens't seem to exist any more. I'm testing with pypy-nightly trunk on Ubuntu 17.04 64 bit. [1]$ python demo_keyboard.py Traceback (most recent call last): File "demo_keyboard.py", line 60, in import matplotlib.pyplot as plt File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/pyplot.py", line 115, in _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup globals(),locals(),[backend_name],0) File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/backend_tkagg.py", line 13, in import matplotlib.backends.tkagg as tkagg File "/home/stu/.virtualenvs/pypy-nightly-trunk/site-packages/matplotlib/backends/tkagg.py", line 9, in from matplotlib.backends import _tkagg RuntimeError: Cannot dlopen tkinter module file S++___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] Pypy friendly to get pointer enclosed in python object ?
PyCairo has a struct like ` typedef struct { | PyObject_HEAD | | | cairo_t *ctx; | | | PyObject *base; /* base object used to create context, or NULL */ | | } PycairoContext; ` And a #define that you can use to get pointer to ctx: ` #define PycairoContext_GET(obj) (((PycairoContext *)(obj))->ctx)` How can I get hold of the pointer *ctx in Pypy ? I had a bit of a look at CFFI, but couldn't find anything using structures with PyObject_HEAD in them. S++___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Pypy friendly to get pointer enclosed in python object ?
Realised I should ask this on the CFFI list, apologies for the noise. On Saturday, March 16, 2019, 3:05:03 PM GMT, Stuart Axon wrote: PyCairo has a struct like ` typedef struct { | PyObject_HEAD | | | cairo_t *ctx; | | | PyObject *base; /* base object used to create context, or NULL */ | | } PycairoContext; ` And a #define that you can use to get pointer to ctx: ` #define PycairoContext_GET(obj) (((PycairoContext *)(obj))->ctx)` How can I get hold of the pointer *ctx in Pypy ? I had a bit of a look at CFFI, but couldn't find anything using structures with PyObject_HEAD in them. S++ ___ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev