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

python-for-android recipe tests #1263

Closed
inclement opened this issue May 7, 2018 · 14 comments
Closed

python-for-android recipe tests #1263

inclement opened this issue May 7, 2018 · 14 comments

Comments

@inclement
Copy link
Member

inclement commented May 7, 2018

As far as I'm concerned, the core recipes that need testing are:

  • python2
  • python3crystax
  • openssl
  • sqlite
  • numpy
  • pyjnius
  • kivy
  • setuptools
  • sdl2
  • kivent
  • ffpyplayer
  • android
  • plyer

This is the core set that I try to make sure will always build, and which are (I think) the most commonly used by p4a projects. They're probably the ones that need testing the most. All of these should be compatible except python2 with python3crystax, and openssl with python3crystax.

That said, I haven't put much deep thought into this, I'm happy to consider other recipes equally important if people suggest them.

@inclement
Copy link
Member Author

inclement commented May 15, 2018

No, of all of these kivent is the one I haven't actually tried for a long time, I mostly rely on kovak to maintain it. Adding it to the tests would go some way to avoiding the accumulation of problems, though.

Edit: This was a reply to a deleted post asking about kivent.

@AndreMiras
Copy link
Member

Great looks good for a start. I think introducing them in the current .travis.yml should be fairly, even though I know some may already fail.
However at the end the .travis.yml file will look ugly. I already don't like the long lines that we have. So I'm trying to think of another approche, like a side helper script or a Makefile. I'm not too sure.
Or we could start simple and just add more "ugly" long lines and see later for a refactoring.
How do you guys see this?

@inclement
Copy link
Member Author

@AndreMiras p4a has a couple of ways to set command line arguments via files, which I guess should be sufficient to solve that problem.

AndreMiras added a commit to AndreMiras/python-for-android that referenced this issue May 19, 2018
Has the following requirements:
sdl2,pyjnius,kivy,python2
refs kivy#1263
@AndreMiras
Copy link
Member

Thank you @inclement for the suggestion, I like the approach and I've implemented it in a first pull request #1277.
Please don't close the ticket once it's merged because it doesn't tackle all recipes, but only sdl2,pyjnius,kivy,python2 which is already a good start :)

@AndreMiras
Copy link
Member

Agrr I wanted to take a look at setup_testapp_python2_sqlite_openssl.py, but peewee is causing nested virtualenv issues.

[ERROR]:   virtualenv is needed to install pure-Python modules, but
[ERROR]:   virtualenv does not support nesting, and you are running
[ERROR]:   python-for-android in one. Please run p4a outside of a
[ERROR]:   virtualenv instead.

This is annoying, because this setup has a lot of interesting recipes to test, such as openssl and sqlite3. And also even though it would be easily achievable to run outside a virtualenv, I don't really like it because we loose the isolation and rely on system modules. So I'm not too sure about it, what would you guys suggest. I currently see two ways:

  1. create another setup_testapp_python2_sqlite_openssl.py and testapp_sqlite_openssl/main.py with no peewee dep
  2. go without a virtualenv at all 😢

What do you guys think?

@inclement
Copy link
Member Author

The ideal solution would be to make p4a work inside a virtualenv. The reason it doesn't is only the single very specific way it installs pure-python packages, by making a new virtualenv. I'm sure there must be a compatible way to do it, but haven't ever looked at it much.

While I understand the value of virtualenvs, p4a isn't very picky about its dependencies, and I don't usually worry about just running it outside of any.

As far as testing the build goes, though, removing the peewee dependency would be fine (maybe you can even do it inline without a new file by adding --requirements=sdl2,pyjnius,kivy,python2,openssl,sqlite3, which I think will override the previous requirements entirely).

@AndreMiras
Copy link
Member

Thank you very much for your feedback. I can give a try to the inline version, even though we loose a bit of setup interest.

AndreMiras added a commit to AndreMiras/python-for-android that referenced this issue May 19, 2018
Has the following requirements:
sdl2,pyjnius,kivy,python2,openssl,requests,sqlite3

peewee had to be skipped because pure python modules fail with
nested virtualenv issue, see:
kivy#1263 (comment)

refs kivy#1263
@AndreMiras
Copy link
Member

I've implemented what you suggested overriding peewee in #1278
So now with this second pull request we have more recipes covered, new status would be.

💚 [DONE] python2
🔶 [TODO] python3crystax
💚 [DONE] openssl
💚 [DONE] sqlite
🔶 [TODO] numpy
💚 [DONE] pyjnius
💚 [DONE] kivy
🔶 [TODO] setuptools
💚 [DONE] sdl2
🔶 [TODO] kivent
🔶 [TODO] ffpyplayer
🔶 [TODO] android
🔶 [TODO] plyer

@LarsDu
Copy link

LarsDu commented May 19, 2018

I was under the impression that virtualenv is pretty much obsolete in the face of conda (I work in bioinformatics)...

P.S. I made a comment in this thread earlier about a different topic, but as it seems this is an active thread -- Does anyone have a working Kivent recipe for kivy-ios?

I posted a $25 bounty on this last week:
https://www.bountysource.com/issues/58415450-kivent_core-recipe

AndreMiras added a commit to AndreMiras/python-for-android that referenced this issue May 19, 2018
Has the following requirements:
sdl2,pyjnius,kivy,python3crystax
Also updated Dockerfile to download and install CrystaX NDK.
Refs kivy#1263
@AndreMiras
Copy link
Member

@LarsDu thanks for sharing about conda, yes it may be worth investigating in that direction too, but let's not hijack this topic.
Feel free to open a dedicated issue or even come with a pull request.
Regarding the other topic (kivy-ios), well it's another topic, right?
To be honest I would love to help, but I only have Linux computers, so unless I can do it through cross-compiling on my Linux box, I don't think it's going to happen.
Last thing, looking at the kivy-ios repo, I'm surprised to see we duplicate so much code from p4a I would have expected that we at least inherit and specialize.
But let's not discuss all of that in this topic.

@AndreMiras
Copy link
Member

Pull request #1281 is green! It builds python3crystax with the following other requirements: sdl2,pyjnius,kivy.
New covered recipe list is:
💚 [DONE] python2
💚 [DONE] python3crystax
💚 [DONE] openssl
💚 [DONE] sqlite
🔶 [TODO] numpy
💚 [DONE] pyjnius
💚 [DONE] kivy
🔶 [TODO] setuptools
💚 [DONE] sdl2
🔶 [TODO] kivent
🔶 [TODO] ffpyplayer
🔶 [TODO] android
🔶 [TODO] plyer

We are getting there! Adding the missing pieces should be fairly easy since I think all dependencies are here. However I may take a little break now :D
Before adding new recipes, I'd like to see if we can tackle #1280, but I don't want to make the .travis.yml file unreadable.

@AndreMiras
Copy link
Member

Another pull request #1282 that covers setuptools and android recipes, plus bonus point fixes python3crystax hostpython.
New status:
💚 [DONE] python2
💚 [DONE] python3crystax
💚 [DONE] openssl
💚 [DONE] sqlite
🔶 [TODO] numpy
💚 [DONE] pyjnius
💚 [DONE] kivy
💚 [DONE] setuptools
💚 [DONE] sdl2
🔶 [TODO] kivent
🔶 [TODO] ffpyplayer
💚 [DONE] android
🔶 [TODO] plyer

@AndreMiras
Copy link
Member

New pull request that adds numpy (for Python 2) #1304
After the merge new status would be:

💚 [DONE] python2
💚 [DONE] python3crystax
💚 [DONE] openssl
💚 [DONE] sqlite
💚 [DONE] numpy
💚 [DONE] pyjnius
💚 [DONE] kivy
💚 [DONE] setuptools
💚 [DONE] sdl2
🔶 [TODO] kivent
🔶 [TODO] ffpyplayer
💚 [DONE] android
🔶 [TODO] plyer

akshayaurora added a commit that referenced this issue Jun 25, 2018
…_integration_numpy

Adds numpy/python2 to continuous integration, refs #1263
@inclement
Copy link
Member Author

I'm closing this as complete in principle. Although kivent is unfortunately not working, it also is not currently active so not a priority. ffpyplayer would be nice to test better but it's okay as it stands. plyer is similar. The core goal of this issue is certainly fulfilled.

Thanks to @AndreMiras :)

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

3 participants