[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-09 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ __

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 46567fda0b29 by Xavier de Gaye in branch 'default': Issue #27442: Expose the Android API level in sysconfig.get_config_vars() https://hg.python.org/cpython/rev/46567fda0b29 -- nosy: +python-dev ___ Python

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Stefan Krah added the comment: I guess so. Our Rietveld setup apparently has some heuristics that work best when you're on the default branch and completely synced with the main repo. -- ___ Python tracker ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks Berker and Stefan for your help on 'hg diff --git'. Yes Stefan, maybe your patch has a [review] button because Rietveld found that your patch applied cleanly against the head of the default branch at the time you have submitted it, so it could guess the

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Stefan Krah added the comment: Good point about Misc/NEWS: I just regenerated the patch mindlessly to check the "diff --git" situation :) Actually, Xavier, it's often better to leave out the NEWS section in the bug tracker patches and just add it before pushing. Perhaps Rietveld choked on the

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread STINNER Victor
STINNER Victor added the comment: issue27442-3.patch: be careful, the new item in Misc/NEWS is not at the top of its section. Moreover, I still consider that the unit test is risky and not really needed (just remove it). Good job, there is now a [review] button :-) -- ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Stefan Krah added the comment: I did "hg pull -u" before re-generating the diff. Other than that, sometimes newer mercurial versions behave better (I have 2.8.2). -- ___ Python tracker ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Changes by Stefan Krah : Added file: http://bugs.python.org/file43660/issue27442-3.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I suggest to push the change without the unit test. Agreed. -- ___ Python tracker ___ ___ Python-b

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: @Berker This does not work for me. I found an old discussion [1] on the git format problem with Rietveld. The thread diverges rapidly toward another subject, "submitting a branch instead of a patch to the issue tracker" but comes back to the original subject a

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread STINNER Victor
STINNER Victor added the comment: +@unittest.skipIf(sysconfig.get_config_var('ANDROID_API_LEVEL') == 0, + "not an android platform") +def test_is_android(self): +# Use an heuristic, the shell on Android is at /system/bin/sh. +proc = subprocess.run([

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Berker Peksag
Berker Peksag added the comment: > I am using 'hg diff' with ~/.hgrc set to 'git = on' and this time, naively > removed the '--git' from the output of 'hg diff' instead of commenting out > 'git = on' in the config file :( You don't need to do that. I've been using the same setting [1] for 5 ye

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Are you generating the patch using "hg diff"? I don't see the base revision > in your patch, and so there is no [Review] link on your patch. I am using 'hg diff' with ~/.hgrc set to 'git = on' and this time, naively removed the '--git' from the output of 'hg

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: In sysconfig.parse_config_h(), the variables in pyconfig.h that have a commented-out '#undef' line are set to 0. Fortunately, there is no Android API level 0. Checking '== 0' ensures that autoreconf has been run to add '#undef ANDROID_API_LEVEL' to pyconfig.

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-06 Thread STINNER Victor
STINNER Victor added the comment: +@unittest.skipIf(sysconfig.get_config_var('ANDROID_API_LEVEL') == 0, + "not an android platform") Hum, sysconfig.get_config_var() returns None for unknown variable. Why checking ==0? @Xavier: Are you generating the patch using "hg

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: New patch incorporating the substitutions to '$CPP $CPPFLAGS' and ANDROID_API_LEVEL. -- stage: patch review -> commit review Added file: http://bugs.python.org/file43636/android_api_3.patch ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Yep adding Python to Android's build system is a rare case. Just to mention there's already an macro and avoiding possible redefined macros is always good. -- ___ Python tracker __

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: Integrating Python into AOSP does not make sense. The patch can be changed with s/ANDROID_API/ANDROID_API_LEVEL. -- ___ Python tracker ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Here's an issue - there's already a macro called ANDROID_API defined in libcutils [1] If someone is going to integrate Python into AOSP, redefining macros may cause a problem. [1] https://android.googlesource.com/platform/system/core/+/master/include/cutils/co

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: According to issue 27453, do this minor change in the patch: s/$CC -E/$CPP $CPPFLAGS. -- ___ Python tracker ___ ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-04 Thread Xavier de Gaye
Xavier de Gaye added the comment: A patch to expose the Android API level in sysconfig.get_config_vars(). -- components: +Library (Lib) -Interpreter Core title: expose Android API level in sys.implementation -> expose the Android API level in sysconfig.get_config_vars() Added file: http