-
Notifications
You must be signed in to change notification settings - Fork 1.9k
lxml recipe #1428
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
lxml recipe #1428
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, this is a good start.
Can we start with the following:
- fix all the linter issues, try
make tox
to list them - use git rebasing and make a single clear commit
Here are the few errors listed by the linter:
pep8 runtests: commands[0] | flake8 pythonforandroid/ tests/ ci/
pythonforandroid/recipes/libxml2/__init__.py:5:1: E302 expected 2 blank lines, found 1
pythonforandroid/recipes/libxml2/__init__.py:20:47: E241 multiple spaces after ','
pythonforandroid/recipes/libxml2/__init__.py:21:41: E241 multiple spaces after ','
pythonforandroid/recipes/libxml2/__init__.py:21:83: E241 multiple spaces after ','
pythonforandroid/recipes/libxml2/__init__.py:21:103: E241 multiple spaces after ','
pythonforandroid/recipes/libxml2/__init__.py:30:5: E303 too many blank lines (2)
pythonforandroid/recipes/libxml2/__init__.py:37:1: E305 expected 2 blank lines after class or function definition, found 1
pythonforandroid/recipes/levenshtein/__init__.py:4:1: E302 expected 2 blank lines, found 1
pythonforandroid/recipes/levenshtein/__init__.py:5:9: E225 missing whitespace around operator
pythonforandroid/recipes/levenshtein/__init__.py:14:26: F821 undefined name 'Recipe'
pythonforandroid/recipes/levenshtein/__init__.py:15:26: F821 undefined name 'Recipe'
pythonforandroid/recipes/levenshtein/__init__.py:21:1: E305 expected 2 blank lines after class or function definition, found 1
pythonforandroid/recipes/lxml/__init__.py:5:1: E302 expected 2 blank lines, found 1
pythonforandroid/recipes/lxml/__init__.py:11:45: E261 at least two spaces before inline comment
pythonforandroid/recipes/lxml/__init__.py:32:1: E305 expected 2 blank lines after class or function definition, found 1
pythonforandroid/recipes/libxslt/__init__.py:5:1: E302 expected 2 blank lines, found 1
pythonforandroid/recipes/libxslt/__init__.py:35:5: E303 too many blank lines (2)
pythonforandroid/recipes/libxslt/__init__.py:44:1: E305 expected 2 blank lines after class or function definition, found 1
See more on Travis: https://travis-ci.org/kivy/python-for-android/builds/445274361
Feel free to talk to us on Discord #dev
channel so we can go through this together.
def get_recipe_env(self, arch): | ||
env = super(LevenshteinRecipe, self).get_recipe_env(arch) | ||
libxslt_recipe = Recipe.get_recipe('libxslt', self.ctx) | ||
libxml2_recipe = Recipe.get_recipe('libxml2', self.ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how can these be working as Recipe
is undefined 🤔
Hello @AndreMiras thanks for feedback. This PR is just a small correction over #1166, and I've kept the original commits. The original author is @Scefing, I'll wait to see if she is still interested in this patch, else I'll clean it up myself. |
@ZachGoldberg @Scefing just pinging you to see if you wanna continue on this recipe :) |
4fd0a6d
to
ca1d25a
Compare
@AndreMiras I've updated the PR, as @ZachGoldberg and @Scefing don't look active anymore. About the undefined Recipe you have found in levenshtein recipe, I've fixed it. But I'm not sure what this recipe is used for, as it's not linked in lxml recipe or any dependency. Anyway, this is hopefully OK now, I've tested it working OK 2 days ago. Thanks. |
ca1d25a
to
5286676
Compare
Nice work @goffi-contrib ! |
@AndreMiras yes I agree. I'll remove it tonight (CET), I've started my working day now :) |
Great, can't wait for it 👍
Full log: https://api.travis-ci.org/v3/job/446032065/log.txt |
5286676
to
a311633
Compare
@AndreMiras I've removed levenshtein recipe, the CI is failing because of name resolution issue with gradle (maybe the server was down during the test?). We would need to restart it, but I'm not sure how I can do (I can still do a minor change to PR, but it would be better to just relaunch travis). |
I've closed/reopened PR to trigger the travis build |
class LXMLRecipe(CompiledComponentsPythonRecipe): | ||
version = "3.6.0" | ||
url = "https://pypi.python.org/packages/source/l/lxml/lxml-{version}.tar.gz" | ||
depends = ["python2", "libxml2", "libxslt"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you have only tested it under python2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, my project is not yet Python 3 compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so it means, I either need to test it by hand, or try to make conditional builds also working with python2
😄
Yes Travis is flaky often because of the network. But I usually restart the failing jobs myself to check their outcome.
Also see:
However your recipe seems to be |
@AndreMiras I don't know about python3crystax, as I've said earlier, I've just fixed recipe from an other PR which is inactive now. I don't see why it would not work, but it would take too much time for me to try on python 3 now, I haven't python 3 app to test and I'm working in parallel on other tasks. |
No problem 👍 |
@AndreMiras most test are passing, beside the one with python3crystax. The other failing one is due to docker and smells like an other network issue (it can't find p4a image). |
Yes other tests are passing because they try to compile core recipes and you didn't touch core recipes. |
OK, I don't touch the PR for now then. |
Falls back to python2 when tested recipes are python3crystax compatible. This is for instance the case on kivy#1428 where the recipes depend only on python2, hence couldn't be automatically tested. Also updated `vispy` recipe to handle the version string properly, pin it and clean comments. This recipe is a demo case scenario for the conditional build falling back on python2 since `vispy` is not yet compatible with python3crystax.
You though I already forgot you? Nope 😄 |
he he, thanks for the update :) |
Falls back to python2 when tested recipes are python3crystax compatible. This is for instance the case on kivy#1428 where the recipes depend only on python2, hence couldn't be automatically tested. Also updated `vispy` recipe to handle the version string properly, pin it and clean comments. This recipe is a demo case scenario for the conditional build falling back on python2 since `vispy` is not yet compatible with python3crystax. Last, removes the debug flag from the test apps used by the CI as it produces too many logs and halts Travis.
Hi @goffi-contrib since #1435 got merged, do you mind rebasing your changes to master and push again so the CI picks it up? Otherwise I can give it a try locally, but it requires more effort 😛 |
This is a squash of many commits comming from kivy#1166 work by Zachary Goldberg (https://github.com/ZachGoldberg) and Elena Pereira (https://github.com/Scefing)
This patch fixes the recipes from PR kivy#1166. levenshtein recipe has been removed has it's not used anywhere and its causing compilation troubles.
a311633
to
d36cd9d
Compare
Sure @AndreMiras , I've just done it. |
Great, seems like Travis is happy 👍 |
This PR fixes the small issues found in #1166.
It's a working recipe for lxml and its dependencies.