Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add "requirements" buildozer.spec #109

Closed
yagupta opened this issue Apr 23, 2014 · 7 comments
Closed

Unable to add "requirements" buildozer.spec #109

yagupta opened this issue Apr 23, 2014 · 7 comments

Comments

@yagupta
Copy link

yagupta commented Apr 23, 2014

When I add "requirements" to buildozer.spec, it does not seem to work.

Snippet from buildozer.spec

# (list) Application requirements
requirements = kivy requests

Failure : 

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/Users/yatharth/src/kivy-test/.buildozer/venv/build/kivy/setup.py", line 94, in <module>

    from Cython.Distutils import build_ext

ImportError: No module named Cython.Distutils

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/yatharth/src/kivy-test/.buildozer/venv/build/kivy
Storing debug log for failure in /Users/yatharth/.pip/pip.log
[YaGupta-Debug] - Self.CMD Failed, pip install --download-cache=/Users/yatharth/.buildozer/cache --target=/Users/yatharth/src/kivy-test/.buildozer/applibs kivy requests
# Command failed: pip install --download-cache=/Users/yatharth/.buildozer/cache --target=/Users/yatharth/src/kivy-test/.buildozer/applibs kivy requests

How pip free clearly shows that Cython is installed :

Cython==0.20.1
PyRSS2Gen==1.0.0
Twisted==12.2.0
altgraph==0.10.1
astroid==1.1.0
bdist-mpkg==0.4.4
bonjour-py==0.3
buildozer==0.15-dev
colorama==0.2.7
logilab-common==0.61.0
macholib==1.5
matplotlib==1.1.1
modulegraph==0.10.1
numpy==1.6.2
py2app==0.7.1
pyOpenSSL==0.13
pylint==1.2.0
pyobjc-core==2.3.2a0
pyobjc-framework-AddressBook==2.3.2a0
pyobjc-framework-AppleScriptKit==2.3.2a0
pyobjc-framework-AppleScriptObjC==2.3.2a0
pyobjc-framework-Automator==2.3.2a0
pyobjc-framework-CFNetwork==2.3.2a0
pyobjc-framework-Cocoa==2.3.2a0
pyobjc-framework-Collaboration==2.3.2a0
pyobjc-framework-CoreData==2.3.2a0
pyobjc-framework-CoreLocation==2.3.2a0
pyobjc-framework-CoreText==2.3.2a0
pyobjc-framework-DictionaryServices==2.3.2a0
pyobjc-framework-ExceptionHandling==2.3.2a0
pyobjc-framework-FSEvents==2.3.2a0
pyobjc-framework-InputMethodKit==2.3.2a0
pyobjc-framework-InstallerPlugins==2.3.2a0
pyobjc-framework-InstantMessage==2.3.2a0
pyobjc-framework-InterfaceBuilderKit==2.3.2a0
pyobjc-framework-LatentSemanticMapping==2.3.2a0
pyobjc-framework-LaunchServices==2.3.2a0
pyobjc-framework-Message==2.3.2a0
pyobjc-framework-OpenDirectory==2.3.2a0
pyobjc-framework-PreferencePanes==2.3.2a0
pyobjc-framework-PubSub==2.3.2a0
pyobjc-framework-QTKit==2.3.2a0
pyobjc-framework-Quartz==2.3.2a0
pyobjc-framework-ScreenSaver==2.3.2a0
pyobjc-framework-ScriptingBridge==2.3.2a0
pyobjc-framework-SearchKit==2.3.2a0
pyobjc-framework-ServiceManagement==2.3.2a0
pyobjc-framework-SyncServices==2.3.2a0
pyobjc-framework-SystemConfiguration==2.3.2a0
pyobjc-framework-WebKit==2.3.2a0
pyobjc-framework-XgridFoundation==2.3.2a0
python-dateutil==1.5
pytz==2012d
requests==2.2.1
scipy==0.11.0
soco==0.6
versioneer==0.10
virtualenv==1.11.4
wsgiref==0.1.2
xattr==0.6.4
zope.interface==3.8.0
@yagupta
Copy link
Author

yagupta commented Apr 23, 2014

Resolved. The syntax requires modules to be comma separated w/o space

So (1) works but (2) does not.

(1) requirements = requests,kivy
(2) requirements = kivy requests

Recommendation : Update the comment in the buildozer.spec file with a sample.

@skela
Copy link

skela commented May 5, 2014

Would also be really good if when you omitted the requirements field in the spec file, buildozer checked to see if there was a requirements.txt file in the folder and if there was use it?
Having to manually keep the requirements.txt file (that’s used by virtualenv) and the spec file in sync is a bit tedious.

@tito
Copy link
Member

tito commented May 12, 2014

Thoses are unfortunately not the same. Requirements might not match the one from python-for-android, even if we try to. Specially the version tag. That's said, it should be done anyway.

@tito
Copy link
Member

tito commented May 12, 2014

And right now, as the user reported, this is a perfect example of not using the requirements.txt, as the one he showed includes lot of pyobjc. This is needed for desktop, but would be awful to get it on mobile. Cython is not needed on the target, it is only needed for compilation. Etc. Specific requirements is needed for your app anyway, and using pip freeze for that would not be good for you, and you'll always maintain 2 set of requirements.

@tito tito closed this as completed Jun 2, 2014
@YJonmo
Copy link

YJonmo commented Jul 21, 2016

I am getting a bit frustrated with kivy. I am just using online sample codes and still it does not work. on my Ubuntu 14.04 terminal after I type

buildozer android debug deploy run

it shows things are going well and at the end it types:

Application pushed.

Run on 4df149060fbf6f21

Run '/home/yjon701/.buildozer/android/platform/android-sdk-20/platform-tools/adb shell am start -n com.wordpress.bytedebugger.accelplot/org.renpy.android.PythonActivity -a org.renpy.android.PythonActivity'

Cwd /home/yjon701/.buildozer/android/platform

Starting: Intent { act=org.renpy.android.PythonActivity cmp=com.wordpress.bytedebugger.accelplot/org.renpy.android.PythonActivity }

Application started.

but on my Samsung Galaxy III the screen of the 'loading ...' appears but then it crashes. Most of the codes I made for the android end in the same way. So I don't know what is wrong. Any idea?

Thanks

@inclement
Copy link
Member

@YJonmo Please open a new issue, don't add to this old closed one which refers to a different problem.

But before you do that, use buildozer android logcat to see the error log when your app runs (see the doc, and debug it using this information. If you can't find the problem this way, ask on the Kivy mailing list or irc. Github issues are better for actual framework bugs.

@wilsonlv
Copy link

When we use pip-install , it will install all indirect dependency, but it doesn't seem like buildozer would do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants