问题
I am working on my first app, and I added twisted to the app via the kivy support function kivy.support.install_twisted_reactor. It works well in my development environment, but I can't get my buildozer settings right to get twisted to compile properly with the app.
Any ideas as to which minimum settings are mandatory to get buildozer to compile twisted properly? I tried simply adding "twisted" to the requirements section, but clearly that's not enough... I could share my code, but I am barely using twisted at all, so I'm certain the strict minimum to get twisted with buildozer would work.
回答1:
I remember that you were having the same issue I had like 2 years ago, the problem was that zope.interface
did not work because there is missing a __init__.py
file, so if you simply create that file inside zope folder, that will work without installing the dependencies on the system (working in a virtualenv).
回答2:
In case anyone has the same question and stumbles upon this, I was able to get it working. The main challenge is actually installing twisted on python in the OS that you are using for buildozer.
I believe (might be wrong, but its the general understanding I got) there are some issues with the compatibility of Zope with newer versions of python. When I'd do "pip install twisted", it would give error messages related to zope.
However, if you just install python-zopeinterface, it provides the dependencies sufficient for Twisted to work. Here are the commands I used to get a successful installation of Twisted, which will lead to a successful Buildozer build (all that is needed in the "requirements" section is twisted):
sudo apt-get install python-zopeinterface
sudo apt-get install python-twisted
来源:https://stackoverflow.com/questions/48643295/how-to-build-kivy-and-twisted-in-buildozer