kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
758 stars 237 forks source link

ImportError: dynamic module does not define module export function (PyInit__bcrypt) #841

Closed JanBartos6 closed 10 months ago

JanBartos6 commented 10 months ago

Versions

Describe the bug I am trying to build paramiko which includes bcrypt with kivy-ios toolchain, and I'm getting this error log: https://gist.github.com/JanBartos6/ddd0e13f9fc5ca7c7fabff04cdc259be. It seems that the error is related to dynamic loading of bcrypt. According to my research, you can no longer use dynamic loading since iOS 9. So when I install bcrypt with toolchain pip install bcrypt and build my app, I always get this error. Is there any way how to build bcrypt as a static library or any other solution that would solve this error?

To Reproduce Install the kivy-ios toolchain and build kivy and python with it, then install bcrypt with toolchain pip install bcrypt and make sure you imported bcrypt in your kivy project, and then build the app. You can, for example, try to build this:

from kivy.app import App
from kivy.uix.label import Label
import bcrypt

class MyApp(App):

    def build(self):
        return Label(text='Hello world')

if __name__ == '__main__':
    MyApp().run()

Logs https://gist.github.com/JanBartos6/ddd0e13f9fc5ca7c7fabff04cdc259be

JanBartos6 commented 10 months ago

Duplicate of #725