Implementing twisted and autobahn related recipes
See original GitHub issueHi,
I currently try (from time to time) to implement recipes for installing autobahn
and twisted
. Basic implementation is already done here https://github.com/rnixx/kivy-ios/tree/twisted_recipe/recipes
Package dependencies looks like:
autobahn==0.16.0
* six
* txaio
cffi==1.8.3
* pycparser
cryptography==1.5.2
* cffi
* enum34
* idna
* pyasn1
* six
enum34==1.1.6
* NONE
idna==2.1
* NONE
ipaddress==1.0.17
* NONE
pyasn1==0.1.9
* ipaddress
pycparser==2.14
* NONE
pyOpenSSL==16.1.0
* cryptography
six==1.10.0
* NONE
Twisted==16.4.1
* zope.interface
txaio==2.5.1
* six
zope.interface==4.3.2
* setuptools
The recipes for these packages are basically implemented and define the dependencies properly.
The pure python package related recipes install successfully.
I also had a look how python-for-android
handles twisted installation and then I came along install_in_hostpython
flag on it’s recipes, which is set for cffi
, pycparser
and twisted
among some other unrelated recipes.
pycryptography
tries to download and build it’s dependencies inside it’s build folder if dependencies are missing, thus I tried to install cffi
and pycparser
in hostpython as well to avoid this. For pycparser
this works, while cffi
causes troubles.
The target builds of cffi
work (I deployed to an iPad, imported cffi
and instanciated a cffi.api.FFI()
object).
The installation in hostpython installs, import works as well, but instanciating cffi.api.FFI()
fails:
myhost:kivy-ios user$ ./dist/hostpython/bin/python
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 2.7.1 (r271:86832, Nov 4 2016, 10:41:44)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cffi
>>> cffi.api.FFI()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../kivy-ios/dist/hostpython/lib/python2.7/site-packages/cffi/api.py", line 56, in __init__
import _cffi_backend as backend
ImportError: dynamic module does not define init function (init_cffi_backend)
You can find the code here https://github.com/rnixx/kivy-ios/blob/twisted_recipe/recipes/cffi/__init__.py
Any advice and or help how to fix this is really appreciated.
Thanks
<bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38961088-implementing-twisted-and-autobahn-related-recipes?utm_campaign=plugin&utm_content=tracker%2F9081&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F9081&utm_medium=issues&utm_source=github). </bountysource-plugin>Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
For anyone following the guide that @keavin7 quoted, some notes to actually get it working:
That directory thing is not necessary at all, don’t do it.
You actually need to move 4 dependencies to the place where main.py is located, they are:
Also make sure that you create a init.py file inside the zope folder or you will get an import error (“can’t find zope.interfaces”).
like others mentioned, SSL does not work so don’t use this for important stuff, my use case is just passing some data from my computer to other computers or mobile devices, it’s also nothing sensitive so i have no problems with the lack of SSL.
PR’s to add these welcome. Closing the ticket due to inactivity…