cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
thrnciar has quit [Remote host closed the connection]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
todda7 has quit [Ping timeout: 246 seconds]
jcea has joined #pypy
jcea has quit [Read error: Connection timed out]
jcea has joined #pypy
todda7 has joined #pypy
<mattip>
cratuki: thanks
otisolsen70 has joined #pypy
Rhy0lite has joined #pypy
otisolsen70 has quit [Quit: Leaving]
kipras has joined #pypy
Taggnostr has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
kipras has quit [Read error: Connection reset by peer]
xcm has quit [Ping timeout: 264 seconds]
jvesely has quit [Quit: jvesely]
xcm has joined #pypy
thrnciar has joined #pypy
Rhy0lite has quit [Ping timeout: 256 seconds]
<arigo>
cratuki: adding "-L." is not enough in all cases, can you elaborate more?
thrnciar has quit [Ping timeout: 256 seconds]
thrnciar has joined #pypy
<mattip>
we have new failures in pypy.module._codecs.test.test_codecs on py3.7 with utf16 and surrogatepass
KindOne has quit [Ping timeout: 260 seconds]
<mattip>
pytest only prints the assert failure, not the strings. I wonder if we could use __pypy__.utf8content to get failures to print more context
<cratuki>
arigo: I think it is a common use-case that someone will have the .so file in the current directory.
<cratuki>
In that use-case, addition of -L. allows you to access it. I thought the documentation was strong, but for the omission of this. It took me some time to work it out.
<cratuki>
arigo: You write, "not enough in all cases" - what cases are you thinking of?
KindOne has joined #pypy
<arigo>
as far as I remember, when you have a .so in the current directory, you need to call gcc with "-L.", but you also need to do more magic at actual import time
<tos9>
LD_LIBRARY_PATH ?
<arigo>
yes
<tos9>
and DYLD_LIBRARY_PATH if you're lucky enough to have given apple your money
<arigo>
if I've got it right, "-L" is only used by gcc to find the .so itself in order to do something with it (I'm not exactly sure what), but the path is not written in the Python C extension module that you're compiling
<arigo>
when you actually import this module, then an unrelated mechanism is used to find the .so, which involves several things including the LD_LIBRARY_PATH env var
xcm has quit [Ping timeout: 256 seconds]
<arigo>
(this is done by the OS, so don't confuse that with the way Python finds the .so that corresponds to a given module name, which is done by looking along sys.path---a 3rd unrelated way)
<tos9>
personally I didn't expect to find any of that in the cffi docs, I expected cffi to just respect the normal ways to specify that stuff
<tos9>
(in fact if anything I was probably confused as to what the use case was for cffi *having* its own way)
<tos9>
though I guess extra_link_args is useful for other non-path-related arguments to the linker?
<arigo>
that's not cffi's own way. extra_link_args is one of the generic '**args' that is passed straight to distutils
<arigo>
(and indeed extra_link_args is just concatenated to the call to gcc when linking)
<tos9>
ah. (shows you how much I know about distutils too I guess)
<arigo>
this is a sufficiently messy situation that I can repeat that fact all over, and it's also written in the docs :-)