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

[WIP] Rework libxml2, libxslt and lxml (update versions) #1580

Merged
merged 3 commits into from
Jan 12, 2019

Conversation

opacam
Copy link
Member

@opacam opacam commented Jan 11, 2019

The lxml recipe depends on those two libraries, if we update lxml we must update the two libraries (libxml2 and libxslt). This rework takes care of that and also:

  • replace double quotes to single quotes because I think that it's more readable
  • fix imports
  • shortened lines

Note: Successfully build for python3 and python2 (tested some days ago in a real python3's app but it would be great that someone could test it again)

Actions taken:
  - replace double quotes to single quotes because I think that it's more readable
  - fixed imports
  - shortened lines
Actions taken:
  - replace double quotes to single quotes because I think that it's more readable
  - fixed imports
  - fix hardcoded entries
Actions taken:
  - replace double quotes to single quotes because I think that it's more readable
  - fixed imports
  - shortened lines
@AndreMiras
Copy link
Member

Looking overall good to me. Let's see if Travis is happy about it.
I disagree with this (minor) point however replace double quotes to single quotes because I think that it's more readable I think it's a matter of taste, unless there's a PEP8 rule for it. So in general I don't touch something like that

@opacam
Copy link
Member Author

opacam commented Jan 11, 2019

Yes, you are right @AndreMiras, it's a personal taste the quotes 😬 (I knew before hand that this will be problematic 😏...if you want I will change to double quotes no problem). Anyway, as far as I know, it is recommended to be consistent along all the project, and now we have mixed quotes and before the change I checked some of the core modules and it seemed to me that single quotes are predominant...but I cannot be sure about that...so...the said...just tell me and I will change it .

super(LXMLRecipe, self).build_compiled_components(arch)

shprint(sh.rm, '-r', link_rt + '.so')
shprint(sh.rm, '-r', link_rt + '.a')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: why the -r flags?

@AndreMiras
Copy link
Member

AndreMiras commented Jan 12, 2019

I usually tend not to switch from one to the other as it adds noise to the diff and makes reviewing a more difficult. But I would not go as far as asking to revert 😄
It's bit annoying Travis didn't make it to the end again, because we cannot see if it compiled OK.
p4a is way too verbose to me and I think this is an issue we should tacle soon or later.

Anyway looking good overall, thanks!

Edit: oops I didn't squash 😬

@AndreMiras AndreMiras merged commit 6710378 into kivy:master Jan 12, 2019
@RobertFlatt
Copy link
Contributor

I'm having trouble building libxml2 , there is no file libxml2.* in the APK
/build/other_builds/libxml2/armeabi-v7a__ndk_target_21/libxml2/libxml2.la is created, but
/build/other_builds/libxml2/armeabi-v7a__ndk_target_21/libxml2/libs/libxml2.a is not created

Re installed p4a from master today

Looking in recipes/libxml2/init.py it seems the .a is explicitly not created, then copied elsewhere!

Can you please help me see what I am missing?

            # Ensure we only build libxml2.la as if we do everything
            # we'll need the glob dependency which is a big headache
            shprint(sh.make, "libxml2.la", _env=env)

            shutil.copyfile('.libs/libxml2.a',join(self.ctx.libs_dir, 'libxml2.a'))

Using:
p4a apk requirements=libxml2,python3,kivy

.p4a:

--dist_name=tstlib
--private .
--package=com.example.tstlib
--name Tstlib
--arch=armeabi-v7a
--sdk_dir /home/bobf/androidtools/sdk
--ndk_dir /home/bobf/androidtools/android-ndk-r17c
--ndk_version 17c
--android_api 28
--ndk-api 21
--version 0.0.0

Log file:
log_libxml2.txt

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

Successfully merging this pull request may close these issues.

3 participants