8000 Moved ndk_api parsing earlier in program initialisation by inclement · Pull Request #1472 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content

Moved ndk_api parsing earlier in program initialisation #1472

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

Closed
wants to merge 1 commit into from

Conversation

inclement
Copy link
Member

This is actually quite important because we need to know a reasonable number for the NDK API even in places where the build environment has not been prepared.

I've removed the ability to set this parameter via environment variable because, on reflection, I don't think it's actually really important or useful. The environment variables we do accept are there partly for legacy reasons, and are mainly useful for the ndk/sdk locations rather than the api number to target.

The control flow around argument parsing could do with revisiting, but I think this is the neatest solution for now.

@inclement inclement force-pushed the fix_ndk_api_selection branch from f139507 to a6f2c83 Compare November 19, 2018 21:56
@Zen-CODE
Copy link
Member

Testing with this, it seems the API level does not pull through. It picks up API 27 earlier, but then it's 0 when looking in the ndk...

[WARNING]: ndk_platform doesn't exist: /home/richard/Android/android-ndk-r16b/platforms/android-0/arch-arm

https://gist.github.com/Zen-CODE/6d3f1e7daa1d7c305ed3380fbfd18e16

@inclement inclement force-pushed the fix_ndk_api_selection branch from a6f2c83 to 869943f Compare November 20, 2018 22:17
@inclement
Copy link
Member Author

Thanks @Zen-CODE , I've pushed a correction for that.

@@ -528,7 +537,9 @@ def add_parser(subparsers, *args, **kwargs):
self.ndk_dir = args.ndk_dir
self.android_api = args.android_api
self.ndk_version = args.ndk_version
self.ndk_api = args.ndk_api
args.ndk_api = select_ndk_api(args.ndk_api, args.android_api)
self.ndk_api = args.ndk_Api
Copy link
Member

Choose a reason for hiding this comment

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

8000

Typo here ("ndk_api")

Copy link
Member

Choose a reason for hiding this comment

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

Travis didn't like that either 😄

AttributeError: 'Namespace' object has no attribute 'ndk_Api'

Copy link
@bunmalik bunmalik Nov 25, 2018

Choose a reason for hiding this comment

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

I have also tried, but got this error:

args.ndk_api = select_ndk_api(args.ndk_api, args.android_api)
NameError: name 'select_ndk_api' is not defined

please any help!

@Zen-CODE
Copy link
Member
Zen-CODE commented Nov 21, 2018

Pulling these changes,I still get the same problem. It happens with API 21 and 27....

https://gist.github.com/Zen-CODE/9c1b2ea9022086565f5a7900bc7ea272

ps. This try was with the typo correction mentioned above

@inclement inclement force-pushed the fix_ndk_api_selection branch from 869943f to e030dbe Compare November 21, 2018 20:52
@Zen-CODE
Copy link
Member

Still get the same error...

@inclement inclement force-pushed the fix_ndk_api_selection branch from e030dbe to 75c29be Compare December 3, 2018 22:02
@inclement
Copy link
Member Author

@Zen-CODE @AndreMiras Is it working now? Can this be merged?

@ghost
Copy link
ghost commented Dec 4, 2018

Hm, does this pull request remove the NDKAPI option? Because I'm actually using that one. Does that mean it can be just omitted in the future, or would it needed to be specified as command line option, always?

The thing is that I moved this out into the docker environment image which sets all of this in the env, such that the actual building project doesn't need to worry and can only specify the minimal p4a options that are actually truly project-specific. So if this is removed as an env var, that'd be kinda counterproductive for such a neat separation of build env & project

ndk_api, self.android_api, DEFAULT_NDK_API))
ndk_api = int(ndk_api)
self.ndk_api = ndk_api
self.ndk_api = user_ndk_api
Copy link

Choose a reason for hiding this comment

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

Can we possibly keep NDKAPI env var support in? I think this is really important for all options that are more dependent on the installed build env (NDK/SDK/... downloaded) rather than the project itself - because otherwise, these can't be preconfigured to proper defaults in e.g. a docker build env

@Zen-CODE
Copy link
Member
Zen-CODE commented Dec 4, 2018

From my side, I still get

[WARNING]: ndk_platform doesn't exist: /home/fruitbat/Android/android-ndk-r16b/platforms/android-0/arch-arm

as posted earlier....

@inclement inclement changed the base branch from master to develop June 6, 2019 20:41
@inclement
Copy link
Member Author

Closing as obseleted by more recent changes.

@inclement inclement closed this Mar 30, 2020
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.

4 participants
0