[PyQt] pyqtdeploy: include C-extension with multiple source files

Thijs Triemstra lists at collab.nl
Tue Aug 2 14:15:17 BST 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20-07-16 18:26, Phil Thompson wrote:
> 
> You've compiled the C extension as a dynamically loaded module, not
> a static library. Your Python build needs to support the loading of
> dynamic modules and make the symbols visble to those modules.
> 
> Phil
> 

Finally managed to build a static extension and include it with
pyqtdeploy. I added a gist [1] with instructions for cross-compiling
Python for ARM and creating a static version of a C-extension (e.g.
RPi.GPIO) if anyone's interested.

Once you have librpigpio.a, add an extension with pyqtdeploy in the
'Other Extension Modules' tab (e.g. RPi._GPIO), leave the SOURCES
field empty and insert the path and library name in the LIBS field
(e.g -L$BUILDROOT/3rdparty/RPi.GPIO -lrpigpio).

Cheers,

Thijs

[1]
https://gist.github.com/thijstriemstra/c21631ca12d2e60f0cace5509663e3cb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlegnOEACgkQBRbMGagbo3lJWgCfZtMTq0rHcjaRTGnamoflBQGo
v0QAnRFdN5XpozB4/YVn5WxQnSUB2BzO
=Wahj
-----END PGP SIGNATURE-----


More information about the PyQt mailing list