Re: [pypy-dev] Detecting numpy vs micronumpy
Hi, On Fri, Sep 16, 2011 at 11:48 AM, Peter Cock wrote: > Thanks, I'll use that. Its a shame that wasn't in Python 2.5 though, > my copy of Jython doesn't support it either. The older and more robust way to check this is: "__pypy__" in sys.builtin_module_names Armin ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Detecting numpy vs micronumpy
On Thu, Sep 15, 2011 at 11:04 PM, Alex Gaynor wrote: > >> >> The problem I am running into is that "import numpy" appears >> to work under PyPy 1.6 (you get micronumpy) but later things like >> numpy.get_include() don't work (AttributeError). Should I just treat >> that exception itself as meaning it is micronumpy not real numpy? >> >> Thanks, >> >> Peter > > Well, until we implement it anyways :) That's why I think something like > "import platform; platform.python_implementation == 'PyPy'" is a godo way to > check. > Alex Thanks, I'll use that. Its a shame that wasn't in Python 2.5 though, my copy of Jython doesn't support it either. Peter ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Detecting numpy vs micronumpy
On Thu, Sep 15, 2011 at 5:55 PM, Peter Cock wrote: > On Thu, Sep 15, 2011 at 10:02 PM, Alex Gaynor > wrote: > > I think, for the time being, the appropriate solution is to just check > the > > Python version, the original NumPy doesn't run on PyPy so it should be > fine. > > Alex > > How precisely? > > The problem I am running into is that "import numpy" appears > to work under PyPy 1.6 (you get micronumpy) but later things like > numpy.get_include() don't work (AttributeError). Should I just treat > that exception itself as meaning it is micronumpy not real numpy? > > Thanks, > > Peter > Well, until we implement it anyways :) That's why I think something like "import platform; platform.python_implementation == 'PyPy'" is a godo way to check. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Detecting numpy vs micronumpy
On Thu, Sep 15, 2011 at 10:02 PM, Alex Gaynor wrote: > I think, for the time being, the appropriate solution is to just check the > Python version, the original NumPy doesn't run on PyPy so it should be fine. > Alex How precisely? The problem I am running into is that "import numpy" appears to work under PyPy 1.6 (you get micronumpy) but later things like numpy.get_include() don't work (AttributeError). Should I just treat that exception itself as meaning it is micronumpy not real numpy? Thanks, Peter ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Re: [pypy-dev] Detecting numpy vs micronumpy
I think, for the time being, the appropriate solution is to just check the Python version, the original NumPy doesn't run on PyPy so it should be fine. Alex On Thu, Sep 15, 2011 at 5:00 PM, Peter Cock wrote: > Dear all, > > I tried asking this on the NumPy mailing list, but realise here is more > likely: > http://mail.scipy.org/pipermail/numpy-discussion/2011-September/058439.html > > How should a python script (e.g. setup.py) distinguish between > real numpy and micronumpy? Or should I instead be looking > to distinguish PyPy versus another Python implementation? > > Thanks, > > Peter > ___ > pypy-dev mailing list > pypy-dev@python.org > http://mail.python.org/mailman/listinfo/pypy-dev > -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
[pypy-dev] Detecting numpy vs micronumpy
Dear all, I tried asking this on the NumPy mailing list, but realise here is more likely: http://mail.scipy.org/pipermail/numpy-discussion/2011-September/058439.html How should a python script (e.g. setup.py) distinguish between real numpy and micronumpy? Or should I instead be looking to distinguish PyPy versus another Python implementation? Thanks, Peter ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev