<fangerer>
Hodgestar: bascially yes; I would have waited for an answer of the Pyro/Cinder devs (if they would like to participate and if the 10th works for them) but got no answer so far.
<Hodgestar>
fangerer: Tx. I'll assume the 10th until I hear otherwise.
<fangerer>
👍 so I do
computerfarmer has joined #hpy
computerfarmer has quit [Ping timeout: 264 seconds]
computerfarmer has joined #hpy
computerfarmer has quit [Ping timeout: 264 seconds]
_whitelogger has joined #hpy
_whitelogger has joined #hpy
joannah has joined #hpy
joannah has quit [Quit: Client closed]
_whitelogger has joined #hpy
phlebas has quit [*.net *.split]
fijal has quit [*.net *.split]
fijal has joined #hpy
phlebas has joined #hpy
<mattip>
why does "import hpy; print(hpy)" print "<module 'hpy' (namespace)>"?
<mattip>
cython expects (1) to have a __version__ attribute and
<mattip>
(2) to have a __file__ attribute
<mattip>
not "namespace"
<mattip>
ahh, hpy.devel does have a __file__
<mattip>
... but "__import__('hpy.devel') returns hpy, not hpy.devel
<mattip>
maybe someone wants to pair-program tomorrow to try to get "python runtest.py" working with hpy?
<mattip>
I have pushed a first cut of a cython hpy branch,
<mattip>
I commented about half way down that page about the failing import
ronan has quit [Ping timeout: 265 seconds]
ronan__ is now known as ronan
squeaky_pl has quit [Quit: Leaving]
<antocuni>
mattip: it prints "(namespace)" because it's indeed a namespace
<antocuni>
i.e. a bare dir without __init__
<antocuni>
I don't understand why cython needs it
ashwinvis has joined #hpy
ashwinvis is now known as jadelord
jadelord is now known as ashwinvis
ashwinvis is now known as jadelord
jadelord has quit [Changing host]
jadelord has joined #hpy
jadelord is now known as ashwinvis
ashwinvis has left #hpy [Konversation terminated!]
<mattip>
isn't it typical to do "import abc; print(abc.__version__)" ?
<mattip>
ok, I can move past the need for __file__ and __version__
<antocuni>
I still don't understand why cython needs to import hpy, but if you can work around the problem, that's good :)
<mattip>
this is for testing
<mattip>
cython needs the include files to test end-to-end that code works
<mattip>
the test harness wants to report what version of all the tested modules (numpy, pythran, setuptools, hpy) are in use
<antocuni>
ah ok
<antocuni>
I suppose that the official way is to use pkg_resources
<antocuni>
but feel free to add __version__ to e.g. hpy.devel if you need it
<antocuni>
note that hpy is a namespace because in theory in the future we might want to distribute the various modules independently
<antocuni>
e.g. you might want to install only hpy.devel without hpy.universal
<antocuni>
but I'm not even sure we will ever arrive at that point nor that it's actually useful. People are used to download gigabytes of dependencies without complaining nowadays :)
<mattip>
in any case, I have passed that
<mattip>
the latest commit emits a #ifdef HPY\n #include "hpy.h" \n #else \n #include "Python.h" \n #endif
<mattip>
for tests tagged with hpy
<mattip>
and sets -DHPY for compilation
<antocuni>
cool
<mattip>
next: get the ModuleNode to emit the HPy_MODINIT(simple) code
<antocuni>
the resulting C file will be a mess with all thos #ifdef
<mattip>
that is what they requested
<antocuni>
yeah, I read it
<mattip>
:shrug:
<antocuni>
maybe you can write a sort of custom preprocessor which kills all the non-hpy lines in the file, for your own sanity when you read it :)
<mattip>
for now it is convenient for benchmarking: you can use the same C code and compile twice and compare