PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Sunday the 7th of September, 2014

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[07:19:57] <nanonyme> Btw, cffi work together with wheels? Just reading up on https://cffi.readthedocs.org/en/release-0.8/#distributing-modules-using-cffi
[07:20:59] <Arfrever> nanonyme: No.
[07:24:10] <nanonyme> :/
[07:24:51] <dstufft> cffi should work fine with wheels
[07:24:55] <Arfrever> nanonyme: By the way, you meant wheels for cffi itself or wheels for project X, which uses cffi?
[07:25:09] <nanonyme> Latter
[07:25:17] <dstufft> assuming you set things up so that setup.py build builds the cffi extension
[07:26:18] <nanonyme> Yeah, that's the assumption that I'd have set it up if it's set-uppable. I haven't made such a project yet. I'm just playing with the idea of making low-level API bindings with cffi that's installable as a wheel
[07:29:08] <Arfrever> nanonyme: What was motivation to use wheels in this case? Do you expect that wheels will contain cffi-generated *.so files?
[07:30:10] <nanonyme> Hmm, no. I'm expecting to be able to use an external .dll through Python. I was thinking of that as an alternative to ctypes
[07:30:50] <nanonyme> I'm under the impression cffi still has to compile something in this case
[07:33:28] <Arfrever> nanonyme: A project using cffi, at run time, specifies what C functions etc. should be wrapped, and cffi generates name of *.so file, checks if this *.so file already exists, and if it does not exist, then generate *.c file and compiles it into *.so file.
[07:34:16] <nanonyme> Oh, right
[07:34:28] <nanonyme> Then yes, I guess I do mean expect that
[07:34:38] <nanonyme> s/mean/mean I/
[07:35:02] <Arfrever> nanonyme: The name of such *.so file is e.g. .../cffi/__pycache__/_cffi__xc29b1e53x9d6ad437.cpython-34.so
[07:35:21] <dstufft> that's only true for the implicit compile
[07:35:37] <nanonyme> Ie the target machine will have no C compiler
[07:35:49] <dstufft> if you setup your setup.py so that ``setup.py build_ext``, then it'll be outside of the __pycache__ directory
[07:36:03] <dstufft> cryptography is a cffi based project which distributes wheels
[07:36:07] <dstufft> they work fine
[07:36:16] <nanonyme> I'll take a look at how they've done it. Thanks
[07:36:52] <Arfrever> nanonyme: Name of module depends on cffi version, so e.g. after upgrade from cffi 0.8.5 to cffi 0.8.6, cffi-generated modules have to be rebuilt.
[07:37:31] <Arfrever> nanonyme: If wheels somehow work, then only with one micro version of cffi.
[07:38:10] <dstufft> you can also overwrite the name of the cffi module so that it doesn't depend on the cffi version
[07:38:17] <dstufft> (which cryptography has also done)
[07:38:25] <dstufft> s/overwrite/override/
[21:04:57] <bmcorser> asked in the dev chan, but here too just in case someone is awake:
[21:04:58] <bmcorser> i'm getting CSP errors all over the place trying to run a warehouse server
[21:05:07] <bmcorser> even when i hack middleware.py to set all the directives to *