cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
<arigato>
in unrelated news, kickstarter is available across many EU countries now too
<arigato>
(that's 3-years-old news)
crane has joined #pypy
<crane>
So I'm using dockers multistage build feature where I have an image with gcc installed and copy /root/.cache to my production image and "re"-install my dependencies using the pre-compiled files. However it looks like cffi is still looking for a compiler and breaking my build. Any ideas how to fix this? I'm not the only one with this problem https://stackoverflow.com/questions/49075041/cryptography-python-docker-multistage-build
stevenja_ has joined #pypy
<arigato>
crane: that's cffi's setup.py which automatically complains if it doesn't find a compiler
<crane>
arigato: just looked at the code and saw the same... Is it just me or feels this wrong on modern systems?
<arigato>
it certainly feels wrong on your system; I have no clue about "modern"
<crane>
touché ^^
<arigato>
I have no clue why you don't get the same problem with other packages
<arigato>
I think it's pretty common to do the same thing as cffi's setup.py
<LarstiQ>
arigato: but even with kickstarter you might run into e.g. police enforcement of the tax authority not wanting you to run a crowdfunding campaign (used to be the case in .fi)
<arigato>
LarstiQ: ah, thanks. I think the switzerland rules are saner, but I can check
<arigato>
crane: I can either attempt to fix it, or would be happy to accept a pull request
<arigato>
I don't know how others do it but I can imagine hacks
<arigato>
e.g. if setup.py doesn't find a compiler, it doesn't crash but instead builds the Extension() object with some bogus arguments that can't possibly lead to a successful compilation (assuming there is, after all, a compiler but setup.py can't find it)
<crane>
arigato: hmm... I'm confused. Maybe it's because it's writing to stderr
<crane>
let me check
<arigato>
it crashes because of the sys.exit(1) in setup.py
<crane>
I didn't followed the code so far
<crane>
But then it's clear why it is failing
<arigato>
yes
<crane>
Can I open a bug/feature request to remove that dependency?
<arigato>
yes
<crane>
cool :)
<arigato>
is it ok if setup.py still produces warnings if no compiler is found, even if it manages to install correctly in the end?
<crane>
yep, that would also work out
<crane>
but why doing this check? I mean if no functional compiler is found they can't compile anything on their system and not install a python package.
<arigato>
the real check is to know if the compiler supports some functionality or not
<arigato>
so, some kind of limited "configure"
<crane>
hmm, yes. that sounds usefull
<crane>
any restrictions when not throwing an error?
<arigato>
I don't think there are more issues than "it'll get a bogus configure result for the platform", which shouldn't be used if really no compilation is occurring
<arigato>
yes, seems to work
<crane>
nice, you still want me to open the issue?
<arigato>
no, thanks
<arigato>
trying to fix it now
<crane>
awesome. ^^
<crane>
do me another favour and get yourself a hughe chocolate cookie ^^
<crane>
Is this going to be a "hot-fix" or will it be in the next release?
<arigato>
you'll will to wait for the next release I'm afraid
<arigato>
s/will/need
<crane>
Any timeline for this?
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
<kenaan_>
arigo cffi/cffi b3b6b86cb30c /c/test_c.py: no real point in turning this warning into an error
<kenaan_>
arigo cffi/cffi 68933f0ea99a /setup.py: setup.py now supports building in a context and installing in a different context with no compiler. You still ge...
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
jsza has joined #pypy
<arigato>
there might be a hack to try it out now:
<arigato>
copy the latest version of setup.py from the bitbucket repo
<arigato>
replacing the cffi setup.py in the downloaded already-build image
<arigato>
(might need to replace the version number present in this setup.py, from '1.12.0' to '1.11.5')
inhahe_ has joined #pypy
inhahe__ has quit [Ping timeout: 240 seconds]
inhahe__ has joined #pypy
inhahe has quit [Ping timeout: 276 seconds]
<crane>
arigato: I used the commit in my requirement but it failed. not sure now if because of this change or other ones
<crane>
but in the end it still is trying to call gcc
raynold has quit [Quit: Connection closed for inactivity]