Re: [Python-Dev] Support of the Android platform

2018-01-23 Thread Steve Holden
For this to move forward more rapidly it would really help if there were a
utility VM appliance available with a ready-installed support an SDK. Or at
least that would lower impedance to joining the development effort. Does
any such beast by chance exist?

S

Steve Holden

On Tue, Jan 23, 2018 at 5:17 PM, Victor Stinner 
wrote:

> Ok, I created https://bugs.python.org/issue32637
> "Android: set sys.platform and os.name to android"
>
> Victor
>
> 2018-01-23 18:01 GMT+01:00 Brett Cannon :
> >
> >
> > On Mon, 22 Jan 2018 at 09:29 Victor Stinner 
> > wrote:
> >>
> >> Hi,
> >>
> >> I'm still talking with Paul Peny (pmpp on IRC) who is trying to build
> >> the master branch of Python on Android, using cross-compilation or
> >> directly on an Android device. I started to took notes since Android
> >> is a complex platforms and it's not easy for me to remember
> >> everything.
> >>
> >> http://vstinner.readthedocs.io/python_android.html
> >>
> >> Paul would like to support Android 4.4 Kitkat (API 19) just because
> >> it's possible to find cheap devices running Android, but usually only
> >> with old Android versions. Technically, it doesn't see difficult to
> >> support API 19+ (instead of 21+), a few tiny patches are needed. But I
> >> don't want to have a "full support" of API 19+, only basic support
> >> like "make sure that the compilation doesn't fail", not "all tests
> >> must pass".
> >>
> >> It seems like sys.platform == 'android' would be more appropriate
> >> since Android is not Linux: different libc, different filesystems,
> >> etc.
> >
> >
> > I've had a similar thought myself.
> >
> > -Brett
> >
> >>
> >>
> >> While Xavier promotes cross-compilation, Paul would like to build
> >> Python directly on Android to get pip and wheels.
> >>
> >> Honestly, I have no strong opinion, since I don't know well Android.
> >> I'm trying to help everybody working on the Android support. IMHO it's
> >> fine to support multiple ways to build Python for Android. It's not
> >> like there is very obvious option which has no drawback... Cross
> >> compilation is complex, getting a C compiler on Android also seems to
> >> be complex. From my point of view, compared to a common Fedora Linux,
> >> Android doesn't seem easy to use to develop on CPython...
> >>
> >> Victor
> >>
> >> 2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
> >> > The following note is a proposal to add the support of the Android
> >> > platform.
> >> >
> >> > The note is easier to read with clickable links at
> >> > https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
> >> >
> >> > Motivations
> >> > ===
> >> >
> >> > * Android is ubiquitous.
> >> > * This would be the first platform supported by Python that is
> >> > cross-compiled,
> >> >   thanks to many contributors.
> >> > * Although the Android operating system is linux, it is different from
> >> > most
> >> >   linux platforms, for example it does not use GNU libc and runs
> SELinux
> >> > in
> >> >   enforcing mode. Therefore supporting this platform would make Python
> >> > more
> >> >   robust and also would allow testing it on arm 64-bit processors.
> >> > * Python running on Android is also a handheld calculator, a successor
> >> > of
> >> > the
> >> >   slide rule and the `HP 41`_.
> >> >
> >> > Current status
> >> > ==
> >> >
> >> > * The Python test suite succeeds when run on Android emulators using
> >> > buildbot
> >> >   strenuous settings with the following architectures on API 24: x86,
> >> > x86_64,
> >> >   armv7 and arm64.
> >> > * The `Android build system`_ is described in another section.
> >> > * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
> >> > enable
> >> >   buildbots to run a given Android API and architecture on the
> >> > emulators.
> >> > * The Android emulator is actually ``qemu``, so the test suites for
> x86
> >> > and
> >> >   x86_64 last about the same time as the test suite run natively when
> >> > the
> >> >   processor of the build system is of the x86 family. The test suites
> >> > for
> >> > the
> >> >   arm architectures last much longer: about 8 hours for arm64 and 10
> >> > hours
> >> > for
> >> >   armv7 on a four years old laptop.
> >> > * The changes that have been made to achieve this status are listed in
> >> >   `bpo-26865`_, the Android meta-issue.
> >> > * Given the cpu resources required to run the test suite on the arm
> >> > emulators,
> >> >   it may be difficult to find a contributed buildbot worker. So it
> >> > remains
> >> > to
> >> >   find the hardware to run these buildbots.
> >> >
> >> > Proposal
> >> > 
> >> >
> >> > Support the Android platform on API 24 [1]_ for the x86_64, armv7 and
> >> > arm64
> >> > architectures built with NDK 14b.
> >> >
> >> > *API 24*
> >> >   * API 21 is the first version to provide usable support for wide
> >> > characters
> >> > and where SELinux 

Re: [Python-Dev] Support of the Android platform

2018-01-23 Thread Victor Stinner
Ok, I created https://bugs.python.org/issue32637
"Android: set sys.platform and os.name to android"

Victor

2018-01-23 18:01 GMT+01:00 Brett Cannon :
>
>
> On Mon, 22 Jan 2018 at 09:29 Victor Stinner 
> wrote:
>>
>> Hi,
>>
>> I'm still talking with Paul Peny (pmpp on IRC) who is trying to build
>> the master branch of Python on Android, using cross-compilation or
>> directly on an Android device. I started to took notes since Android
>> is a complex platforms and it's not easy for me to remember
>> everything.
>>
>> http://vstinner.readthedocs.io/python_android.html
>>
>> Paul would like to support Android 4.4 Kitkat (API 19) just because
>> it's possible to find cheap devices running Android, but usually only
>> with old Android versions. Technically, it doesn't see difficult to
>> support API 19+ (instead of 21+), a few tiny patches are needed. But I
>> don't want to have a "full support" of API 19+, only basic support
>> like "make sure that the compilation doesn't fail", not "all tests
>> must pass".
>>
>> It seems like sys.platform == 'android' would be more appropriate
>> since Android is not Linux: different libc, different filesystems,
>> etc.
>
>
> I've had a similar thought myself.
>
> -Brett
>
>>
>>
>> While Xavier promotes cross-compilation, Paul would like to build
>> Python directly on Android to get pip and wheels.
>>
>> Honestly, I have no strong opinion, since I don't know well Android.
>> I'm trying to help everybody working on the Android support. IMHO it's
>> fine to support multiple ways to build Python for Android. It's not
>> like there is very obvious option which has no drawback... Cross
>> compilation is complex, getting a C compiler on Android also seems to
>> be complex. From my point of view, compared to a common Fedora Linux,
>> Android doesn't seem easy to use to develop on CPython...
>>
>> Victor
>>
>> 2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
>> > The following note is a proposal to add the support of the Android
>> > platform.
>> >
>> > The note is easier to read with clickable links at
>> > https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
>> >
>> > Motivations
>> > ===
>> >
>> > * Android is ubiquitous.
>> > * This would be the first platform supported by Python that is
>> > cross-compiled,
>> >   thanks to many contributors.
>> > * Although the Android operating system is linux, it is different from
>> > most
>> >   linux platforms, for example it does not use GNU libc and runs SELinux
>> > in
>> >   enforcing mode. Therefore supporting this platform would make Python
>> > more
>> >   robust and also would allow testing it on arm 64-bit processors.
>> > * Python running on Android is also a handheld calculator, a successor
>> > of
>> > the
>> >   slide rule and the `HP 41`_.
>> >
>> > Current status
>> > ==
>> >
>> > * The Python test suite succeeds when run on Android emulators using
>> > buildbot
>> >   strenuous settings with the following architectures on API 24: x86,
>> > x86_64,
>> >   armv7 and arm64.
>> > * The `Android build system`_ is described in another section.
>> > * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
>> > enable
>> >   buildbots to run a given Android API and architecture on the
>> > emulators.
>> > * The Android emulator is actually ``qemu``, so the test suites for x86
>> > and
>> >   x86_64 last about the same time as the test suite run natively when
>> > the
>> >   processor of the build system is of the x86 family. The test suites
>> > for
>> > the
>> >   arm architectures last much longer: about 8 hours for arm64 and 10
>> > hours
>> > for
>> >   armv7 on a four years old laptop.
>> > * The changes that have been made to achieve this status are listed in
>> >   `bpo-26865`_, the Android meta-issue.
>> > * Given the cpu resources required to run the test suite on the arm
>> > emulators,
>> >   it may be difficult to find a contributed buildbot worker. So it
>> > remains
>> > to
>> >   find the hardware to run these buildbots.
>> >
>> > Proposal
>> > 
>> >
>> > Support the Android platform on API 24 [1]_ for the x86_64, armv7 and
>> > arm64
>> > architectures built with NDK 14b.
>> >
>> > *API 24*
>> >   * API 21 is the first version to provide usable support for wide
>> > characters
>> > and where SELinux is run in enforcing mode.
>> >
>> >   * API 22 introduces an annoying bug on the linker that prints
>> > something
>> > like
>> > this when python is started::
>> >
>> >   ``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
>> > 0x6ffe arg 0x14554``.
>> >
>> > The `termux`_ Android terminal emulator describes this problem at
>> > the
>> > end
>> > of its `termux-packages`_ gitlab page and has implemented a
>> > ``termux-elf-cleaner`` tool to strip the useless entries from the
>> > ELF
>> > header of executables.
>> >
>> >   * API 24 is the first version where 

Re: [Python-Dev] Support of the Android platform

2018-01-23 Thread Brett Cannon
On Mon, 22 Jan 2018 at 09:29 Victor Stinner 
wrote:

> Hi,
>
> I'm still talking with Paul Peny (pmpp on IRC) who is trying to build
> the master branch of Python on Android, using cross-compilation or
> directly on an Android device. I started to took notes since Android
> is a complex platforms and it's not easy for me to remember
> everything.
>
> http://vstinner.readthedocs.io/python_android.html
>
> Paul would like to support Android 4.4 Kitkat (API 19) just because
> it's possible to find cheap devices running Android, but usually only
> with old Android versions. Technically, it doesn't see difficult to
> support API 19+ (instead of 21+), a few tiny patches are needed. But I
> don't want to have a "full support" of API 19+, only basic support
> like "make sure that the compilation doesn't fail", not "all tests
> must pass".
>
> It seems like sys.platform == 'android' would be more appropriate
> since Android is not Linux: different libc, different filesystems,
> etc.
>

I've had a similar thought myself.

-Brett


>
> While Xavier promotes cross-compilation, Paul would like to build
> Python directly on Android to get pip and wheels.
>
> Honestly, I have no strong opinion, since I don't know well Android.
> I'm trying to help everybody working on the Android support. IMHO it's
> fine to support multiple ways to build Python for Android. It's not
> like there is very obvious option which has no drawback... Cross
> compilation is complex, getting a C compiler on Android also seems to
> be complex. From my point of view, compared to a common Fedora Linux,
> Android doesn't seem easy to use to develop on CPython...
>
> Victor
>
> 2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
> > The following note is a proposal to add the support of the Android
> platform.
> >
> > The note is easier to read with clickable links at
> > https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
> >
> > Motivations
> > ===
> >
> > * Android is ubiquitous.
> > * This would be the first platform supported by Python that is
> > cross-compiled,
> >   thanks to many contributors.
> > * Although the Android operating system is linux, it is different from
> most
> >   linux platforms, for example it does not use GNU libc and runs SELinux
> in
> >   enforcing mode. Therefore supporting this platform would make Python
> more
> >   robust and also would allow testing it on arm 64-bit processors.
> > * Python running on Android is also a handheld calculator, a successor of
> > the
> >   slide rule and the `HP 41`_.
> >
> > Current status
> > ==
> >
> > * The Python test suite succeeds when run on Android emulators using
> > buildbot
> >   strenuous settings with the following architectures on API 24: x86,
> > x86_64,
> >   armv7 and arm64.
> > * The `Android build system`_ is described in another section.
> > * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
> > enable
> >   buildbots to run a given Android API and architecture on the emulators.
> > * The Android emulator is actually ``qemu``, so the test suites for x86
> and
> >   x86_64 last about the same time as the test suite run natively when the
> >   processor of the build system is of the x86 family. The test suites for
> > the
> >   arm architectures last much longer: about 8 hours for arm64 and 10
> hours
> > for
> >   armv7 on a four years old laptop.
> > * The changes that have been made to achieve this status are listed in
> >   `bpo-26865`_, the Android meta-issue.
> > * Given the cpu resources required to run the test suite on the arm
> > emulators,
> >   it may be difficult to find a contributed buildbot worker. So it
> remains
> > to
> >   find the hardware to run these buildbots.
> >
> > Proposal
> > 
> >
> > Support the Android platform on API 24 [1]_ for the x86_64, armv7 and
> arm64
> > architectures built with NDK 14b.
> >
> > *API 24*
> >   * API 21 is the first version to provide usable support for wide
> > characters
> > and where SELinux is run in enforcing mode.
> >
> >   * API 22 introduces an annoying bug on the linker that prints something
> > like
> > this when python is started::
> >
> >   ``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
> > 0x6ffe arg 0x14554``.
> >
> > The `termux`_ Android terminal emulator describes this problem at the
> > end
> > of its `termux-packages`_ gitlab page and has implemented a
> > ``termux-elf-cleaner`` tool to strip the useless entries from the ELF
> > header of executables.
> >
> >   * API 24 is the first version where the `adb`_ shell is run on the
> > emulator
> > as a ``shell`` user instead of the ``root`` user previously, and the
> > first
> > version that supports arm64.
> >
> > *x86_64*
> >   It seems that no handheld device exists using that architecture. It is
> >   supported because the x86_64 Android emulator runs fast and therefore
> is a
> >   good 

Re: [Python-Dev] Support of the Android platform

2018-01-22 Thread Victor Stinner
Hi,

I'm still talking with Paul Peny (pmpp on IRC) who is trying to build
the master branch of Python on Android, using cross-compilation or
directly on an Android device. I started to took notes since Android
is a complex platforms and it's not easy for me to remember
everything.

http://vstinner.readthedocs.io/python_android.html

Paul would like to support Android 4.4 Kitkat (API 19) just because
it's possible to find cheap devices running Android, but usually only
with old Android versions. Technically, it doesn't see difficult to
support API 19+ (instead of 21+), a few tiny patches are needed. But I
don't want to have a "full support" of API 19+, only basic support
like "make sure that the compilation doesn't fail", not "all tests
must pass".

It seems like sys.platform == 'android' would be more appropriate
since Android is not Linux: different libc, different filesystems,
etc.

While Xavier promotes cross-compilation, Paul would like to build
Python directly on Android to get pip and wheels.

Honestly, I have no strong opinion, since I don't know well Android.
I'm trying to help everybody working on the Android support. IMHO it's
fine to support multiple ways to build Python for Android. It's not
like there is very obvious option which has no drawback... Cross
compilation is complex, getting a C compiler on Android also seems to
be complex. From my point of view, compared to a common Fedora Linux,
Android doesn't seem easy to use to develop on CPython...

Victor

2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
> The following note is a proposal to add the support of the Android platform.
>
> The note is easier to read with clickable links at
> https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
>
> Motivations
> ===
>
> * Android is ubiquitous.
> * This would be the first platform supported by Python that is
> cross-compiled,
>   thanks to many contributors.
> * Although the Android operating system is linux, it is different from most
>   linux platforms, for example it does not use GNU libc and runs SELinux in
>   enforcing mode. Therefore supporting this platform would make Python more
>   robust and also would allow testing it on arm 64-bit processors.
> * Python running on Android is also a handheld calculator, a successor of
> the
>   slide rule and the `HP 41`_.
>
> Current status
> ==
>
> * The Python test suite succeeds when run on Android emulators using
> buildbot
>   strenuous settings with the following architectures on API 24: x86,
> x86_64,
>   armv7 and arm64.
> * The `Android build system`_ is described in another section.
> * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
> enable
>   buildbots to run a given Android API and architecture on the emulators.
> * The Android emulator is actually ``qemu``, so the test suites for x86 and
>   x86_64 last about the same time as the test suite run natively when the
>   processor of the build system is of the x86 family. The test suites for
> the
>   arm architectures last much longer: about 8 hours for arm64 and 10 hours
> for
>   armv7 on a four years old laptop.
> * The changes that have been made to achieve this status are listed in
>   `bpo-26865`_, the Android meta-issue.
> * Given the cpu resources required to run the test suite on the arm
> emulators,
>   it may be difficult to find a contributed buildbot worker. So it remains
> to
>   find the hardware to run these buildbots.
>
> Proposal
> 
>
> Support the Android platform on API 24 [1]_ for the x86_64, armv7 and arm64
> architectures built with NDK 14b.
>
> *API 24*
>   * API 21 is the first version to provide usable support for wide
> characters
> and where SELinux is run in enforcing mode.
>
>   * API 22 introduces an annoying bug on the linker that prints something
> like
> this when python is started::
>
>   ``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
> 0x6ffe arg 0x14554``.
>
> The `termux`_ Android terminal emulator describes this problem at the
> end
> of its `termux-packages`_ gitlab page and has implemented a
> ``termux-elf-cleaner`` tool to strip the useless entries from the ELF
> header of executables.
>
>   * API 24 is the first version where the `adb`_ shell is run on the
> emulator
> as a ``shell`` user instead of the ``root`` user previously, and the
> first
> version that supports arm64.
>
> *x86_64*
>   It seems that no handheld device exists using that architecture. It is
>   supported because the x86_64 Android emulator runs fast and therefore is a
>   good candidate as a buildbot worker.
>
> *NDK 14b*
>   This release of the NDK is the first one to use `Unified headers`_ fixing
>   numerous problems that had been fixed by updating the Python configure
> script
>   until now (those changes have been reverted by now).
>
> Android idiosyncrasies
> ==
>
> * The default shell is ``/system/bin/sh``.
> * The 

Re: [Python-Dev] Support of the Android platform

2017-12-15 Thread Mike Miller
I've used Kivy with buildozer on Android and it generally works well, with a few 
issues.  Currently it uses the Crystax NDK for Python 3 support.


Does anyone know how this development will affect it?

-Mike


On 2017-12-15 10:06, Glenn Linderman wrote:
I see a variety of Python apps on Android, but I have no idea how well they 
work, or what their source is, or if they are supported, or what features of 
Python or its standard library might not be available, etc. I've been too busy 
on other projects to take time to investigate them.


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-15 Thread Glenn Linderman

On 12/15/2017 8:29 AM, Xavier de Gaye wrote:

On 12/14/2017 02:59 PM, Victor Stinner wrote:
> It seems like Android is evolving quickly, would say quicker than
> Python releases. I'm asking if it's a good idea to put a recipe aside
> the Python source code for one specific Android API version? Would it
> still make sense to build for NDK v14 in 2 or 5 years?

NDK 14 has been released in march 2017 and the latest release is NDK 
16. There are sometimes major changes between releases and I think it 
is critical to ensure that the builds all use the same NDK release for 
that reason. Supporting another NDK release is just a substitution in 
one of the files of the build system and I am sure that in 2 or 5 
years there would have been a core developer smart enough to make that 
substitution (this could even have been me, I will only be 71 years 
old in 5 years :-)). Anyway if this is a problem, this should have 
been discussed in a review of the PR.


There are concerns, including a concern raised by me, about supporting 
Android with that build system or to supporting Android at all. It has 
been interesting and gratifying to work on this build system and to 
get the Python test suite running on Android without failures. Given 
these concerns and the lack of interest in the support of Android it 
is time for me to switch to something else, maybe improve the bdb 
module, why not ?


Xavier


I, for one, would love to see Android become a supported platform.

My understanding is that APIs are generally backward compatible, so that 
programs created with one API continue to work on future APIs... there 
may be new features they don't use and maybe can't support, because they 
don't know about newer APIs, but that is true of Windows and Linux and 
Mac also. It doesn't seem like it would be necessary to "support" or 
"release" an official Python for every new Android version, but it would 
be nice to have ongoing support for a recent version each time Python is 
released, if Xavier or someone can do it.  It is certainly a mainstream 
platform for development these days.


I see a variety of Python apps on Android, but I have no idea how well 
they work, or what their source is, or if they are supported, or what 
features of Python or its standard library might not be available, etc. 
I've been too busy on other projects to take time to investigate them.


Glenn
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-15 Thread Xavier de Gaye

On 12/14/2017 02:59 PM, Victor Stinner wrote:
> It seems like Android is evolving quickly, would say quicker than
> Python releases. I'm asking if it's a good idea to put a recipe aside
> the Python source code for one specific Android API version? Would it
> still make sense to build for NDK v14 in 2 or 5 years?

NDK 14 has been released in march 2017 and the latest release is NDK 16. There are sometimes major changes between releases and I think it is critical to ensure that the builds all use the same NDK 
release for that reason. Supporting another NDK release is just a substitution in one of the files of the build system and I am sure that in 2 or 5 years there would have been a core developer smart 
enough to make that substitution (this could even have been me, I will only be 71 years old in 5 years :-)). Anyway if this is a problem, this should have been discussed in a review of the PR.


There are concerns, including a concern raised by me, about supporting Android with that build system or to supporting Android at all. It has been interesting and gratifying to work on this build 
system and to get the Python test suite running on Android without failures. Given these concerns and the lack of interest in the support of Android it is time for me to switch to something else, 
maybe improve the bdb module, why not ?


Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-14 Thread Victor Stinner
2017-12-14 10:26 GMT+01:00 Xavier de Gaye :
> The 'Mac' build system has its own subdirectory in the source tree and it
> makes sense as it is the reference build system for this platform. I do not
> see why this should be different for Android.

Hum, Mac/ is mostly the recipe to build the installer and a .dmg
image, no? macOS uses the same configure/Makefile than Linux, no?

Building Python on macOS is quite simple, there is nothing special
about macOS. And macOS is used on a *very* limited set of hardware,
only sold by a single vendor, Apple.

Android is quite the opposite. The propose Android directory is
complex recipe for cross-compiling for a wide range of hardware, and
likely different usages of Python. Some people may want a REPL, some
people may only be interested by a GUI (like Kivy or Panda3D?), some
people probably want to do something else.

All Python modules work on macOS, since macOS is just one flavor of
POSIX. While Android is compatible with POSIX, from the bug reports
that I saw, many modules don't work and will not work on Android. So
supporting Android is much more complex than supporting macOS.


> You are mistaken, this proposal does not suggest that we are going to
> support "all Android API versions, all configuration, any set of libraries,
> etc.", quite the opposite actually.

Since we are talking about the future, I would like to remain open to
support wider Android API versions and any configuration. As I wrote,
I don't require to support all configurations and all API versions,
but just provide best effort support, and only fully support one
specific API version and one specific config.


> The build system enforces the use of NDK r14 for example (as you
> have painfuly experienced).

It seems like Android is evolving quickly, I would say quicker than
Python releases. I'm asking if it's a good idea to put a recipe aside
the Python source code for one specific Android API version? Would it
still make sense to build for NDK v14 in 2 or 5 years?


> This is a bad start for this proposal and it would have been fair to inform
> me that you were working in irc collaboration with this other user in
> testing the build system.

Right, I'm working with Paul Peny (pmpp on IRC). He is helping me to
test your PR. Paul understand Android much better than me. For me,
it's still a huge black box. Basically, I don't understand what I'm
doing :-)

Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-14 Thread Xavier de Gaye

On 12/13/2017 10:56 PM, Victor Stinner wrote:
> I looked at your scripts to build Android but I failed to use them.

You failed because you did not read the README and tried to improvise. I will change the documentation and the build process to make it simpler for those that do not have the time to RTFM :-) I have 
documented the correct steps in the PR especially for you (they are just a summary of what is in the README) after you reported that failure. So you can follow these steps any time now and use 
correctly the build system and report the results here. This would be only fair, I think.


BTW You keep saying they are scripts when the build is actually driven by 
Makefiles (with the '.mk' extension).


> Anyway, I'm not sure why these scripts have to be part of the CPython
> git repository.
>
> Technically, is there a reason to put it aside the source code and
> Unix build scripts (configure/Makefile/setup)?
> Your https://github.com/python/cpython/pull/1629 only adds new files
> without touching existing files.
>
> I suggest to create new Git project. It may be in the python
> organization, or you may start with your GitHub account.

The 'Mac' build system has its own subdirectory in the source tree and it makes 
sense as it is the reference build system for this platform. I do not see why 
this should be different for Android.


> Cross-compilation is hard, and I'm not sure that it's possible to
> build a single recipe for all Android API versions, all configuration,
> any set of libraries, etc. For Android, it seems like each developer
> might want a subtle different configuration which might not be easy to
> support.

You are mistaken, this proposal does not suggest that we are going to support "all 
Android API versions, all configuration, any set of libraries, etc.", quite the 
opposite actually.

The proposal is an Android build system for a specific API, a set of architectures using the NDK r14 toolchain and a set of optional external libraries. The build system enforces the use of NDK r14 
for example (as you have painfuly experienced). Python is tested on emulators so that there is no interference with vendor specific additions found on the Android devices or with installed PlayStore 
applications.



> Having a separated Git project would allow people to contribute more
> easily, experiment their fork, etc.
>
> What do you think?

Certainly not. We, core-devs, are very happy that no one is experimenting with 
our build system, it is complex enough as it is. The same goes for this Android 
build system.

Your suggestion seems to be driven by the failure you have experienced with this new build system and the fact that a user is also reporting a failure.  The origin of this other failure is unclear 
because I cannot reproduce it even though all the components used for the build are well defined and identical for everyone: the NDK includes the clang compiler, the libraries and the headers, the 
external libraries are downloaded by the build system, all the users use identical tools (same versions) and the same source code and the only difference may be with some utility tools such as sed, 
awk, etc...


This is a bad start for this proposal and it would have been fair to inform me that you were working in irc collaboration with this other user in testing the build system. On the other hand, these 
problems may have some positive consequences since it allows us to be aware of the fact that the bpo audience may change if we support Android and that this may be a problem. Android attracts all kind 
of developers that do not have the average expertise of unix developers and more importantly that do not have the same motivations and the same etiquette. I am now concerned by the fact that the 
quality of the bug reports on bpo may dramatically decrease if we adopt this proposal.


Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-13 Thread Victor Stinner
Hi Xavier,

I looked at your scripts to build Android but I failed to use them.
Anyway, I'm not sure why these scripts have to be part of the CPython
git repository.

Technically, is there a reason to put it aside the source code and
Unix build scripts (configure/Makefile/setup)?

Your https://github.com/python/cpython/pull/1629 only adds new files
without touching existing files.

I suggest to create new Git project. It may be in the python
organization, or you may start with your GitHub account.

Cross-compilation is hard, and I'm not sure that it's possible to
build a single recipe for all Android API versions, all configuration,
any set of libraries, etc. For Android, it seems like each developer
might want a subtle different configuration which might not be easy to
support.

Having a separated Git project would allow people to contribute more
easily, experiment their fork, etc.

What do you think?

I'm only talking about the proposed Android/ directory and
https://github.com/python/cpython/pull/1629. Everything else is fine
:-)

Victor

2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
> The following note is a proposal to add the support of the Android platform.
>
> The note is easier to read with clickable links at
> https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
>
> Motivations
> ===
>
> * Android is ubiquitous.
> * This would be the first platform supported by Python that is
> cross-compiled,
>   thanks to many contributors.
> * Although the Android operating system is linux, it is different from most
>   linux platforms, for example it does not use GNU libc and runs SELinux in
>   enforcing mode. Therefore supporting this platform would make Python more
>   robust and also would allow testing it on arm 64-bit processors.
> * Python running on Android is also a handheld calculator, a successor of
> the
>   slide rule and the `HP 41`_.
>
> Current status
> ==
>
> * The Python test suite succeeds when run on Android emulators using
> buildbot
>   strenuous settings with the following architectures on API 24: x86,
> x86_64,
>   armv7 and arm64.
> * The `Android build system`_ is described in another section.
> * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
> enable
>   buildbots to run a given Android API and architecture on the emulators.
> * The Android emulator is actually ``qemu``, so the test suites for x86 and
>   x86_64 last about the same time as the test suite run natively when the
>   processor of the build system is of the x86 family. The test suites for
> the
>   arm architectures last much longer: about 8 hours for arm64 and 10 hours
> for
>   armv7 on a four years old laptop.
> * The changes that have been made to achieve this status are listed in
>   `bpo-26865`_, the Android meta-issue.
> * Given the cpu resources required to run the test suite on the arm
> emulators,
>   it may be difficult to find a contributed buildbot worker. So it remains
> to
>   find the hardware to run these buildbots.
>
> Proposal
> 
>
> Support the Android platform on API 24 [1]_ for the x86_64, armv7 and arm64
> architectures built with NDK 14b.
>
> *API 24*
>   * API 21 is the first version to provide usable support for wide
> characters
> and where SELinux is run in enforcing mode.
>
>   * API 22 introduces an annoying bug on the linker that prints something
> like
> this when python is started::
>
>   ``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
> 0x6ffe arg 0x14554``.
>
> The `termux`_ Android terminal emulator describes this problem at the
> end
> of its `termux-packages`_ gitlab page and has implemented a
> ``termux-elf-cleaner`` tool to strip the useless entries from the ELF
> header of executables.
>
>   * API 24 is the first version where the `adb`_ shell is run on the
> emulator
> as a ``shell`` user instead of the ``root`` user previously, and the
> first
> version that supports arm64.
>
> *x86_64*
>   It seems that no handheld device exists using that architecture. It is
>   supported because the x86_64 Android emulator runs fast and therefore is a
>   good candidate as a buildbot worker.
>
> *NDK 14b*
>   This release of the NDK is the first one to use `Unified headers`_ fixing
>   numerous problems that had been fixed by updating the Python configure
> script
>   until now (those changes have been reverted by now).
>
> Android idiosyncrasies
> ==
>
> * The default shell is ``/system/bin/sh``.
> * The file system layout is not a traditional unix layout, there is no
>   ``/tmp`` for example. Most directories have user restricted access,
>   ``/sdcard`` is mounted as ``noexec`` for example.
> * The (java) applications are allocated a unix user id and a subdirectory on
>   ``/data/data``.
> * SELinux is run in enforcing mode.
> * Shared memory and semaphores are not supported.
> * The default encoding is UTF-8.
>
> Android build 

Re: [Python-Dev] Support of the Android platform

2017-12-12 Thread Victor Stinner
2017-12-12 15:02 GMT+01:00 Antoine Pitrou :
> It sounds reasonable to me, as long as someone is monitoring their
> results (that would probably be you).

There is now the buildbot-status where failures are reported. Trust
me, I like making a lot of noise when something is broken :-)

FYI I'm trying https://github.com/python/cpython/pull/1629 : I
succeeded to "cross-compile" a binary on Linux for Android. I'm now
downloading an ISO to boot an x86-64 Android VM to test this binary
;-)

Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-12 Thread Antoine Pitrou
On Tue, 12 Dec 2017 10:50:53 +0100
Xavier de Gaye  wrote:
> On 12/11/2017 04:14 PM, Victor Stinner wrote:
>  > I'm asking for precise hardware specifications since Red Hat may be
>  > able to provide one through the https://osci.io/ program.  
> 
> Is it acceptable to run the arm buildbots only on a weekly basis ?

It sounds reasonable to me, as long as someone is monitoring their
results (that would probably be you).

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-12 Thread Xavier de Gaye

On 12/11/2017 04:14 PM, Victor Stinner wrote:
> I'm asking for precise hardware specifications since Red Hat may be
> able to provide one through the https://osci.io/ program.

Is it acceptable to run the arm buildbots only on a weekly basis ?

For all the architectures (x86_64, armv7 and arm64), the tests are run with the same Python code, built with the same tools and running on the same operating system that runs on emulators using the 
same configuration.


If we do not take into account the ctypes issue, there is only one issue (issue 26939 [1]) among all the Android issues that is specific to arm, and it is not even really an arm issue but an issue 
related to the slowness of the emulator that has been fixed by increasing in a test the switch interval with sys.setswitchinterval().


Xavier

[1] https://bugs.python.org/issue26939

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Xavier de Gaye

On 12/11/2017 03:40 PM, Victor Stinner wrote:
> 2017-12-11 14:58 GMT+01:00 Xavier de Gaye :
>> The host running the buildbots must be able to run 6 (i.e. 3 x (version 3.x
>> + maintenance version)) emulators simultaneously, so with an eight core cpu,
>> that will be 6 cores running at 100%. The armv7 and arm64 buildbot may be
>> set to run only daily but the tests last a long time on these architectures
>> anyway.
>
> What do you mean by "maintenance version"? Do you want to add Android
> support to Python 2.7 and 3.6 as well? I would prefer to only support
> Android since the master branch.

Yes, today only the master branch, and when 3.8 is released then both 3.7 and 
3.8 would be supported. That is what I (implicitly) meant.


> Would it be possible to only run an emulator to run a test, and then
> stop it? So we could test many combo in the same host?

I may not understand your question. An emulator runs with an AVD image (Android Virtual Device) that is specific to the API and architecture (armv7, x86_64, ...), and that contains the data (file 
systems) and the configuration. The AVD image is created once and for all for each of the combinations (API, architecture). You start the emulator with the AVD that matches the type of the built 
python (API, architecture) and install that build. Multiple emulators can run simultaneously except that the build system imposes the restriction that no two identical (API, architecture) emulators 
can run concurrently except if they are not used for the same Python version (emulators are identified by their port numbers by the Android tools and the build system allocates those ports statically).


Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Victor Stinner
I'm asking for precise hardware specifications since Red Hat may be
able to provide one through the https://osci.io/ program.

Victor

2017-12-11 15:40 GMT+01:00 Victor Stinner :
> 2017-12-11 14:58 GMT+01:00 Xavier de Gaye :
>> The host running the buildbots must be able to run 6 (i.e. 3 x (version 3.x
>> + maintenance version)) emulators simultaneously, so with an eight core cpu,
>> that will be 6 cores running at 100%. The armv7 and arm64 buildbot may be
>> set to run only daily but the tests last a long time on these architectures
>> anyway.
>
> What do you mean by "maintenance version"? Do you want to add Android
> support to Python 2.7 and 3.6 as well? I would prefer to only support
> Android since the master branch.
>
> Would it be possible to only run an emulator to run a test, and then
> stop it? So we could test many combo in the same host?
>
> Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Victor Stinner
2017-12-11 14:58 GMT+01:00 Xavier de Gaye :
> The host running the buildbots must be able to run 6 (i.e. 3 x (version 3.x
> + maintenance version)) emulators simultaneously, so with an eight core cpu,
> that will be 6 cores running at 100%. The armv7 and arm64 buildbot may be
> set to run only daily but the tests last a long time on these architectures
> anyway.

What do you mean by "maintenance version"? Do you want to add Android
support to Python 2.7 and 3.6 as well? I would prefer to only support
Android since the master branch.

Would it be possible to only run an emulator to run a test, and then
stop it? So we could test many combo in the same host?

Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Xavier de Gaye

On 12/11/2017 12:56 PM, Victor Stinner wrote:
> 2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
>> * Given the cpu resources required to run the test suite on the arm
>> emulators,
>>it may be difficult to find a contributed buildbot worker. So it remains
>> to
>>find the hardware to run these buildbots.
>
> Do you have the hardware to host such worker? Or are you looking for a
> host somewhere? Which kind of hardware are you looking for? CPU,
> memory, network bandwidth, etc.

I cannot host the buildbots or any buildbot for that matter. I can maintain 
them.

The host running the buildbots must be able to run 6 (i.e. 3 x (version 3.x + maintenance version)) emulators simultaneously, so with an eight core cpu, that will be 6 cores running at 100%. The armv7 
and arm64 buildbot may be set to run only daily but the tests last a long time on these architectures anyway.



>> *API 24*
>>* API 21 is the first version to provide usable support for wide
>> characters
>>  and where SELinux is run in enforcing mode.
>
> Some people are looking for API 19 support. Would it be doable, or
> would it require too many changes? I know that people are running
> heavily patched Python 2.7 and 3.5 on Android with API 19.
>
> I'm not asking for a "full support" for API 19, but more if it would
> be possible to get a "best effort" level of support, like accept
> patches if someone writes them.

Not sure that python can be built on API 19. What I remember about API 19 at 
the time I started this project, is that wide characters support is not usable.
If you look at the Android version history [1] on Wikipedia referred to in my initial post, the Kit Kat (API 19) share is 16 % now and will probably be 8 % next year. Another point to consider is that 
working on a change specific to Android is tedious: the test case must be ok on the build platform and on the emulator. The emulator must be started and an installation made from scratch, and after 
few file modifications on the emulator there is no 'git status' command to tell exactly what change you are running and you must re-install from scratch. Is there a way to browse these patches to get 
a better idea of the changes involved ?


Xavier


[1] https://en.wikipedia.org/wiki/Android_version_history
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Xavier de Gaye

On 12/10/2017 11:07 PM, Ned Deily wrote:
> On the one hand, it would be nice to have.  But on the other, it does add a large non-zero burden to all core developers and to the release teams, to the minimum extent of trying to make sure that 
all ongoing changes don't break platform support.


Yes this platform has few quirks especially when SELinux is involved and some 
tests are harder to write because of that :-(

Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Xavier de Gaye

On 12/10/2017 10:27 PM, Skip Montanaro wrote:
> I'm not familiar with software development on/for Android, but
> wouldn't official support also involve suitable package creation or
> does that just fall out for free from the build-for-emulator PR?
>
> Skip
>

The build-for-emulator PR allows building for a device but the packaging of an 
Android application into an installable APK (a zip file actually) is the 
responsability of the java application developer.

Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Xavier de Gaye

On 12/10/2017 09:27 PM, Brett Cannon wrote:
> While the note from a technical standpoint is interest, Xavier, I don't quite 
see what needs to be done to support Android at this point. Are you simply asking 
we add Android API 24 as an official
> platform? Or permission to add your note to the Misc/ directory? Basically 
what are you wanting to see happen? :)

This is mainly a proposal written in the form of a PEP and open for discussion, not a PEP because it is not required by PEP 11 but it may become one. I guess the discussion may be about the choice of 
the API level, or whether the buildbot should run on emulators or on devices (not currently supported by the build system) or on any other subject.


What is left to be done to support Android at this point is to merge the PR that implements the build system, make the change in the buildbot buildmaster-config repo and test it on a worker and then 
find the hardware to run all the workers for these architectures and set it up.


Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-11 Thread Victor Stinner
2017-12-10 15:19 GMT+01:00 Xavier de Gaye :
> Motivations
> ===
>
> * Android is ubiquitous.
> * This would be the first platform supported by Python that is
> cross-compiled,
>   thanks to many contributors.
> * Although the Android operating system is linux, it is different from most
>   linux platforms, for example it does not use GNU libc and runs SELinux in
>   enforcing mode. Therefore supporting this platform would make Python more
>   robust and also would allow testing it on arm 64-bit processors.
> * Python running on Android is also a handheld calculator, a successor of
> the
>   slide rule and the `HP 41`_.

I still don't understand what is "Android". What is the license of Android?


> * The Python test suite succeeds when run on Android emulators using
> buildbot

Great achievement! Congrats! I know that it has been a long travel to
reach this point! (Fix each invidivual test failure, fix many tiny
things.)


> * Given the cpu resources required to run the test suite on the arm
> emulators,
>   it may be difficult to find a contributed buildbot worker. So it remains
> to
>   find the hardware to run these buildbots.

Do you have the hardware to host such worker? Or are you looking for a
host somewhere? Which kind of hardware are you looking for? CPU,
memory, network bandwidth, etc.


> *API 24*
>   * API 21 is the first version to provide usable support for wide
> characters
> and where SELinux is run in enforcing mode.

Some people are looking for API 19 support. Would it be doable, or
would it require too many changes? I know that people are running
heavily patched Python 2.7 and 3.5 on Android with API 19.

I'm not asking for a "full support" for API 19, but more if it would
be possible to get a "best effort" level of support, like accept
patches if someone writes them.


> The following extension modules are disabled by adding them to the
> ``*disabled*`` section of ``Modules/Setup``:
>
> * ``_uuid``, Android has no uuid/uuid.h header.
> * ``grp`` some grp.h functions are not declared.
> * ``_crypt``, Android does not have crypt.h.
> * ``_ctypes`` on x86_64 where all long double tests fail (`bpo-32202`_) and
> on
>   arm64 (see `bpo-32203`_).

That's a very short list, it's ok. It's not the most popular modules
of the stdlib :-) ctypes would be nice to have, but it can be done
later.

Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Victor Stinner
Le 10 déc. 2017 23:10, "Ned Deily"  a écrit :
> But on the other, it does add a large non-zero burden to all core
developers (...)

I reviewed some of the Android' pull requests. Most changes are small and
self contained.

> As long as Xavier is willing to keep supporting the platform, the first
requirement, having a core developer, should be met.  But for a platform
that, understandably, has as many special requirements as Android does, the
second requirement, having a stable buildbot, seems to me to be an absolute
necessity, and the PEP needs to address exactly what sort of buildbot
requirements make sense here: emulators, SDKs, etc.

Xavier is a core dev and wants to add a buildbot to finish to support of
Android.

Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Victor Stinner
Xavier is working on fixing random issues specific to Android since 2
years. He is almost done, the last step is just to add a build infra to get
a buildbot.

https://github.com/python/cpython/pull/1629
https://bugs.python.org/issue30386

It's a set of scripts to cross compile Python from Linux to Android.

>From the ones who missed it, Xavier is a core dev and will maintain this
stuff ;-)

Since these changes add a new directory without touching the rest of the
code, I don't see a reason to not add it.

Victor

Le 10 déc. 2017 21:29, "Brett Cannon"  a écrit :

> While the note from a technical standpoint is interest, Xavier, I don't
> quite see what needs to be done to support Android at this point. Are you
> simply asking we add Android API 24 as an official platform? Or permission
> to add your note to the Misc/ directory? Basically what are you wanting to
> see happen? :)
>
> On Sun, 10 Dec 2017 at 06:19 Xavier de Gaye  wrote:
>
>> The following note is a proposal to add the support of the Android
>> platform.
>>
>> The note is easier to read with clickable links at
>> https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
>>
>> Motivations
>> ===
>>
>> * Android is ubiquitous.
>> * This would be the first platform supported by Python that is
>> cross-compiled,
>>thanks to many contributors.
>> * Although the Android operating system is linux, it is different from
>> most
>>linux platforms, for example it does not use GNU libc and runs SELinux
>> in
>>enforcing mode. Therefore supporting this platform would make Python
>> more
>>robust and also would allow testing it on arm 64-bit processors.
>> * Python running on Android is also a handheld calculator, a successor of
>> the
>>slide rule and the `HP 41`_.
>>
>> Current status
>> ==
>>
>> * The Python test suite succeeds when run on Android emulators using
>> buildbot
>>strenuous settings with the following architectures on API 24: x86,
>> x86_64,
>>armv7 and arm64.
>> * The `Android build system`_ is described in another section.
>> * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
>> enable
>>buildbots to run a given Android API and architecture on the emulators.
>> * The Android emulator is actually ``qemu``, so the test suites for x86
>> and
>>x86_64 last about the same time as the test suite run natively when the
>>processor of the build system is of the x86 family. The test suites
>> for the
>>arm architectures last much longer: about 8 hours for arm64 and 10
>> hours for
>>armv7 on a four years old laptop.
>> * The changes that have been made to achieve this status are listed in
>>`bpo-26865`_, the Android meta-issue.
>> * Given the cpu resources required to run the test suite on the arm
>> emulators,
>>it may be difficult to find a contributed buildbot worker. So it
>> remains to
>>find the hardware to run these buildbots.
>>
>> Proposal
>> 
>>
>> Support the Android platform on API 24 [1]_ for the x86_64, armv7 and
>> arm64
>> architectures built with NDK 14b.
>>
>> *API 24*
>>* API 21 is the first version to provide usable support for wide
>> characters
>>  and where SELinux is run in enforcing mode.
>>
>>* API 22 introduces an annoying bug on the linker that prints
>> something like
>>  this when python is started::
>>
>>``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
>> 0x6ffe arg 0x14554``.
>>
>>  The `termux`_ Android terminal emulator describes this problem at
>> the end
>>  of its `termux-packages`_ gitlab page and has implemented a
>>  ``termux-elf-cleaner`` tool to strip the useless entries from the ELF
>>  header of executables.
>>
>>* API 24 is the first version where the `adb`_ shell is run on the
>> emulator
>>  as a ``shell`` user instead of the ``root`` user previously, and the
>> first
>>  version that supports arm64.
>>
>> *x86_64*
>>It seems that no handheld device exists using that architecture. It is
>>supported because the x86_64 Android emulator runs fast and therefore
>> is a
>>good candidate as a buildbot worker.
>>
>> *NDK 14b*
>>This release of the NDK is the first one to use `Unified headers`_
>> fixing
>>numerous problems that had been fixed by updating the Python configure
>> script
>>until now (those changes have been reverted by now).
>>
>> Android idiosyncrasies
>> ==
>>
>> * The default shell is ``/system/bin/sh``.
>> * The file system layout is not a traditional unix layout, there is no
>>``/tmp`` for example. Most directories have user restricted access,
>>``/sdcard`` is mounted as ``noexec`` for example.
>> * The (java) applications are allocated a unix user id and a subdirectory
>> on
>>``/data/data``.
>> * SELinux is run in enforcing mode.
>> * Shared memory and semaphores are not supported.
>> * The default encoding is 

Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Guido van Rossum
I think someone may have to mentor Xavier on how to get this accepted. The
note already looks a bit like a PEP, but I suspect that Xavier is not
sufficiently familiar with our process to realize the difference.

On Sun, Dec 10, 2017 at 2:07 PM, Ned Deily  wrote:

> On Dec 10, 2017, at 16:26, Guido van Rossum  wrote:
> > On Dec 10, 2017 12:29, "Brett Cannon"  wrote:
> >> On Sun, 10 Dec 2017 at 06:19 Xavier de Gaye  wrote:
> >>> The following note is a proposal to add the support of the Android
> platform.
> >>> [...]
> >> While the note from a technical standpoint is interest, Xavier, I don't
> quite see what needs to be done to support Android at this point. Are you
> simply asking we add Android API 24 as an official platform? Or permission
> to add your note to the Misc/ directory? Basically what are you wanting to
> see happen? :)
> > Maybe it should be a PEP?
>
> Yes, I agree there needs to be a PEP for this.  I have conflicting
> thoughts about formalizing Android support.  On the one hand, it would be
> nice to have.  But on the other, it does add a large non-zero burden to all
> core developers and to the release teams, to the minimum extent of trying
> to make sure that all ongoing changes don't break platform support.  At a
> minimum a PEP needs to address the minimum platform support requirement
> outlined in PEP 11 (https://www.python.org/dev/peps/pep-0011/#supporting-
> platforms).  As long as Xavier is willing to keep supporting the
> platform, the first requirement, having a core developer, should be met.
> But for a platform that, understandably, has as many special requirements
> as Android does, the second requirement, having a stable buildbot, seems to
> me to be an absolute necessity, and the PEP needs to address exactly what
> sort of buildbot requirements make sense here: emulators, SDKs, etc.
> Otherwise, we run the risk of ending up with an ongoing maintenance
> headache and unhappy users, as has been the case in the past with support
> for other platforms.
>
> --
>   Ned Deily
>   n...@python.org -- []
>
>


-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Ned Deily
On Dec 10, 2017, at 16:26, Guido van Rossum  wrote:
> On Dec 10, 2017 12:29, "Brett Cannon"  wrote:
>> On Sun, 10 Dec 2017 at 06:19 Xavier de Gaye  wrote:
>>> The following note is a proposal to add the support of the Android platform.
>>> [...]
>> While the note from a technical standpoint is interest, Xavier, I don't 
>> quite see what needs to be done to support Android at this point. Are you 
>> simply asking we add Android API 24 as an official platform? Or permission 
>> to add your note to the Misc/ directory? Basically what are you wanting to 
>> see happen? :)
> Maybe it should be a PEP?

Yes, I agree there needs to be a PEP for this.  I have conflicting thoughts 
about formalizing Android support.  On the one hand, it would be nice to have.  
But on the other, it does add a large non-zero burden to all core developers 
and to the release teams, to the minimum extent of trying to make sure that all 
ongoing changes don't break platform support.  At a minimum a PEP needs to 
address the minimum platform support requirement outlined in PEP 11 
(https://www.python.org/dev/peps/pep-0011/#supporting-platforms).  As long as 
Xavier is willing to keep supporting the platform, the first requirement, 
having a core developer, should be met.  But for a platform that, 
understandably, has as many special requirements as Android does, the second 
requirement, having a stable buildbot, seems to me to be an absolute necessity, 
and the PEP needs to address exactly what sort of buildbot requirements make 
sense here: emulators, SDKs, etc.  Otherwise, we run the risk of ending up with 
an ongoing
  maintenance headache and unhappy users, as has been the case in the past with 
support for other platforms.

--
  Ned Deily
  n...@python.org -- []

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Skip Montanaro
I'm not familiar with software development on/for Android, but
wouldn't official support also involve suitable package creation or
does that just fall out for free from the build-for-emulator PR?

Skip
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Guido van Rossum
Maybe it should be a PEP?

On Dec 10, 2017 12:29, "Brett Cannon"  wrote:

> While the note from a technical standpoint is interest, Xavier, I don't
> quite see what needs to be done to support Android at this point. Are you
> simply asking we add Android API 24 as an official platform? Or permission
> to add your note to the Misc/ directory? Basically what are you wanting to
> see happen? :)
>
> On Sun, 10 Dec 2017 at 06:19 Xavier de Gaye  wrote:
>
>> The following note is a proposal to add the support of the Android
>> platform.
>>
>> The note is easier to read with clickable links at
>> https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
>>
>> Motivations
>> ===
>>
>> * Android is ubiquitous.
>> * This would be the first platform supported by Python that is
>> cross-compiled,
>>thanks to many contributors.
>> * Although the Android operating system is linux, it is different from
>> most
>>linux platforms, for example it does not use GNU libc and runs SELinux
>> in
>>enforcing mode. Therefore supporting this platform would make Python
>> more
>>robust and also would allow testing it on arm 64-bit processors.
>> * Python running on Android is also a handheld calculator, a successor of
>> the
>>slide rule and the `HP 41`_.
>>
>> Current status
>> ==
>>
>> * The Python test suite succeeds when run on Android emulators using
>> buildbot
>>strenuous settings with the following architectures on API 24: x86,
>> x86_64,
>>armv7 and arm64.
>> * The `Android build system`_ is described in another section.
>> * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
>> enable
>>buildbots to run a given Android API and architecture on the emulators.
>> * The Android emulator is actually ``qemu``, so the test suites for x86
>> and
>>x86_64 last about the same time as the test suite run natively when the
>>processor of the build system is of the x86 family. The test suites
>> for the
>>arm architectures last much longer: about 8 hours for arm64 and 10
>> hours for
>>armv7 on a four years old laptop.
>> * The changes that have been made to achieve this status are listed in
>>`bpo-26865`_, the Android meta-issue.
>> * Given the cpu resources required to run the test suite on the arm
>> emulators,
>>it may be difficult to find a contributed buildbot worker. So it
>> remains to
>>find the hardware to run these buildbots.
>>
>> Proposal
>> 
>>
>> Support the Android platform on API 24 [1]_ for the x86_64, armv7 and
>> arm64
>> architectures built with NDK 14b.
>>
>> *API 24*
>>* API 21 is the first version to provide usable support for wide
>> characters
>>  and where SELinux is run in enforcing mode.
>>
>>* API 22 introduces an annoying bug on the linker that prints
>> something like
>>  this when python is started::
>>
>>``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
>> 0x6ffe arg 0x14554``.
>>
>>  The `termux`_ Android terminal emulator describes this problem at
>> the end
>>  of its `termux-packages`_ gitlab page and has implemented a
>>  ``termux-elf-cleaner`` tool to strip the useless entries from the ELF
>>  header of executables.
>>
>>* API 24 is the first version where the `adb`_ shell is run on the
>> emulator
>>  as a ``shell`` user instead of the ``root`` user previously, and the
>> first
>>  version that supports arm64.
>>
>> *x86_64*
>>It seems that no handheld device exists using that architecture. It is
>>supported because the x86_64 Android emulator runs fast and therefore
>> is a
>>good candidate as a buildbot worker.
>>
>> *NDK 14b*
>>This release of the NDK is the first one to use `Unified headers`_
>> fixing
>>numerous problems that had been fixed by updating the Python configure
>> script
>>until now (those changes have been reverted by now).
>>
>> Android idiosyncrasies
>> ==
>>
>> * The default shell is ``/system/bin/sh``.
>> * The file system layout is not a traditional unix layout, there is no
>>``/tmp`` for example. Most directories have user restricted access,
>>``/sdcard`` is mounted as ``noexec`` for example.
>> * The (java) applications are allocated a unix user id and a subdirectory
>> on
>>``/data/data``.
>> * SELinux is run in enforcing mode.
>> * Shared memory and semaphores are not supported.
>> * The default encoding is UTF-8.
>>
>> Android build system
>> 
>>
>> The Android build system is implemented at `bpo-30386`_ with `PR 1629`_
>> and
>> is documented by its `README`_. It provides the following features:
>>
>> * To build a distribution for a device or an emulator with a given API
>> level
>>and a given architecture.
>> * To start the emulator and
>>  + install the distribution
>>  + start a remote interactive shell
>>  + or run remotely a python command
>>  + or 

Re: [Python-Dev] Support of the Android platform

2017-12-10 Thread Brett Cannon
While the note from a technical standpoint is interest, Xavier, I don't
quite see what needs to be done to support Android at this point. Are you
simply asking we add Android API 24 as an official platform? Or permission
to add your note to the Misc/ directory? Basically what are you wanting to
see happen? :)

On Sun, 10 Dec 2017 at 06:19 Xavier de Gaye  wrote:

> The following note is a proposal to add the support of the Android
> platform.
>
> The note is easier to read with clickable links at
> https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst
>
> Motivations
> ===
>
> * Android is ubiquitous.
> * This would be the first platform supported by Python that is
> cross-compiled,
>thanks to many contributors.
> * Although the Android operating system is linux, it is different from most
>linux platforms, for example it does not use GNU libc and runs SELinux
> in
>enforcing mode. Therefore supporting this platform would make Python
> more
>robust and also would allow testing it on arm 64-bit processors.
> * Python running on Android is also a handheld calculator, a successor of
> the
>slide rule and the `HP 41`_.
>
> Current status
> ==
>
> * The Python test suite succeeds when run on Android emulators using
> buildbot
>strenuous settings with the following architectures on API 24: x86,
> x86_64,
>armv7 and arm64.
> * The `Android build system`_ is described in another section.
> * The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to
> enable
>buildbots to run a given Android API and architecture on the emulators.
> * The Android emulator is actually ``qemu``, so the test suites for x86 and
>x86_64 last about the same time as the test suite run natively when the
>processor of the build system is of the x86 family. The test suites for
> the
>arm architectures last much longer: about 8 hours for arm64 and 10
> hours for
>armv7 on a four years old laptop.
> * The changes that have been made to achieve this status are listed in
>`bpo-26865`_, the Android meta-issue.
> * Given the cpu resources required to run the test suite on the arm
> emulators,
>it may be difficult to find a contributed buildbot worker. So it
> remains to
>find the hardware to run these buildbots.
>
> Proposal
> 
>
> Support the Android platform on API 24 [1]_ for the x86_64, armv7 and arm64
> architectures built with NDK 14b.
>
> *API 24*
>* API 21 is the first version to provide usable support for wide
> characters
>  and where SELinux is run in enforcing mode.
>
>* API 22 introduces an annoying bug on the linker that prints something
> like
>  this when python is started::
>
>``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type
> 0x6ffe arg 0x14554``.
>
>  The `termux`_ Android terminal emulator describes this problem at the
> end
>  of its `termux-packages`_ gitlab page and has implemented a
>  ``termux-elf-cleaner`` tool to strip the useless entries from the ELF
>  header of executables.
>
>* API 24 is the first version where the `adb`_ shell is run on the
> emulator
>  as a ``shell`` user instead of the ``root`` user previously, and the
> first
>  version that supports arm64.
>
> *x86_64*
>It seems that no handheld device exists using that architecture. It is
>supported because the x86_64 Android emulator runs fast and therefore
> is a
>good candidate as a buildbot worker.
>
> *NDK 14b*
>This release of the NDK is the first one to use `Unified headers`_
> fixing
>numerous problems that had been fixed by updating the Python configure
> script
>until now (those changes have been reverted by now).
>
> Android idiosyncrasies
> ==
>
> * The default shell is ``/system/bin/sh``.
> * The file system layout is not a traditional unix layout, there is no
>``/tmp`` for example. Most directories have user restricted access,
>``/sdcard`` is mounted as ``noexec`` for example.
> * The (java) applications are allocated a unix user id and a subdirectory
> on
>``/data/data``.
> * SELinux is run in enforcing mode.
> * Shared memory and semaphores are not supported.
> * The default encoding is UTF-8.
>
> Android build system
> 
>
> The Android build system is implemented at `bpo-30386`_ with `PR 1629`_ and
> is documented by its `README`_. It provides the following features:
>
> * To build a distribution for a device or an emulator with a given API
> level
>and a given architecture.
> * To start the emulator and
>  + install the distribution
>  + start a remote interactive shell
>  + or run remotely a python command
>  + or run remotely the buildbottest
> * Run gdb on the python process that is running on the emulator with python
>pretty-printing.
>
> The build system adds the ``Android/`` directory and the
> ``configure-android``
> script to the root of 

[Python-Dev] Support of the Android platform

2017-12-10 Thread Xavier de Gaye

The following note is a proposal to add the support of the Android platform.

The note is easier to read with clickable links at
https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst

Motivations
===

* Android is ubiquitous.
* This would be the first platform supported by Python that is cross-compiled,
  thanks to many contributors.
* Although the Android operating system is linux, it is different from most
  linux platforms, for example it does not use GNU libc and runs SELinux in
  enforcing mode. Therefore supporting this platform would make Python more
  robust and also would allow testing it on arm 64-bit processors.
* Python running on Android is also a handheld calculator, a successor of the
  slide rule and the `HP 41`_.

Current status
==

* The Python test suite succeeds when run on Android emulators using buildbot
  strenuous settings with the following architectures on API 24: x86, x86_64,
  armv7 and arm64.
* The `Android build system`_ is described in another section.
* The `buildmaster-config PR 26`_ proposes to update ``master.cfg`` to enable
  buildbots to run a given Android API and architecture on the emulators.
* The Android emulator is actually ``qemu``, so the test suites for x86 and
  x86_64 last about the same time as the test suite run natively when the
  processor of the build system is of the x86 family. The test suites for the
  arm architectures last much longer: about 8 hours for arm64 and 10 hours for
  armv7 on a four years old laptop.
* The changes that have been made to achieve this status are listed in
  `bpo-26865`_, the Android meta-issue.
* Given the cpu resources required to run the test suite on the arm emulators,
  it may be difficult to find a contributed buildbot worker. So it remains to
  find the hardware to run these buildbots.

Proposal


Support the Android platform on API 24 [1]_ for the x86_64, armv7 and arm64
architectures built with NDK 14b.

*API 24*
  * API 21 is the first version to provide usable support for wide characters
and where SELinux is run in enforcing mode.

  * API 22 introduces an annoying bug on the linker that prints something like
this when python is started::

  ``WARNING: linker: libpython3.6m.so.1.0: unused DT entry: type 0x6ffe 
arg 0x14554``.

The `termux`_ Android terminal emulator describes this problem at the end
of its `termux-packages`_ gitlab page and has implemented a
``termux-elf-cleaner`` tool to strip the useless entries from the ELF
header of executables.

  * API 24 is the first version where the `adb`_ shell is run on the emulator
as a ``shell`` user instead of the ``root`` user previously, and the first
version that supports arm64.

*x86_64*
  It seems that no handheld device exists using that architecture. It is
  supported because the x86_64 Android emulator runs fast and therefore is a
  good candidate as a buildbot worker.

*NDK 14b*
  This release of the NDK is the first one to use `Unified headers`_ fixing
  numerous problems that had been fixed by updating the Python configure script
  until now (those changes have been reverted by now).

Android idiosyncrasies
==

* The default shell is ``/system/bin/sh``.
* The file system layout is not a traditional unix layout, there is no
  ``/tmp`` for example. Most directories have user restricted access,
  ``/sdcard`` is mounted as ``noexec`` for example.
* The (java) applications are allocated a unix user id and a subdirectory on
  ``/data/data``.
* SELinux is run in enforcing mode.
* Shared memory and semaphores are not supported.
* The default encoding is UTF-8.

Android build system


The Android build system is implemented at `bpo-30386`_ with `PR 1629`_ and
is documented by its `README`_. It provides the following features:

* To build a distribution for a device or an emulator with a given API level
  and a given architecture.
* To start the emulator and
+ install the distribution
+ start a remote interactive shell
+ or run remotely a python command
+ or run remotely the buildbottest
* Run gdb on the python process that is running on the emulator with python
  pretty-printing.

The build system adds the ``Android/`` directory and the ``configure-android``
script to the root of the Python source directory on the master branch without
modifying any other file. The build system can be installed, upgraded (i.e. the
SDK and NDK) and run remotely, through ssh for example.

The following external libraries, when they are configured in the build system,
are downloaded from the internet and cross-compiled (only once, on the first
run of the build system) before the cross-compilation of the extension modules:

* ``ncurses``
* ``readline``
* ``sqlite``
* ``libffi``
* ``openssl``, the cross-compilation of openssl fails on x86_64 and arm64 and
  this step is skipped on those architectures.

The following extension modules are disabled 

Re: [Python-Dev] support of the Android platform

2017-01-15 Thread Xavier de Gaye

On 01/14/2017 09:56 PM, Victor Stinner wrote:
> Great job! Thank you and Chi Hsuan Yen!
>
> Did you get feedback from users? Maybe from the Kivy community?
>
> Victor
>
> Le 14 janv. 2017 18:31, "Xavier de Gaye" a écrit :
>
> Only a few minor issues are left to be fixed before the support of the
> Android platform may be considered. See the current status at msg285493 
[1]
> in the Android meta-issue 26865 [2].


Yes Chi Hsuan Yen is a great contributor to this project.

AFAIK Kivy uses the CrystaX NDK [1] for Python 3 instead of the
Android NDK, mainly because the Android NDK did not support wide
character until API level 21.

Xavier

[1] https://www.crystax.net/en

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] support of the Android platform

2017-01-14 Thread Xavier de Gaye

Only a few minor issues are left to be fixed before the support of the
Android platform may be considered. See the current status at msg285493 [1]
in the Android meta-issue 26865 [2].

Xavier

[1] http://bugs.python.org/issue26865#msg285493
[2] http://bugs.python.org/issue26865
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-26 Thread Stefan Krah
Xavier de Gaye  gmail.com> writes:
> Yes, I am re-licensing GPL code to the PSF for all the patches written by me
> in the issues listed on http://bugs.python.org/issue26865#msg264310.  I have
> only rewritten the patches from scratch in the following issues:

Thanks, this all sounds good.


> issue #26854: missing header on android for the ossaudiodev module
>(actually it's difficult to rewrite such an obvious patch)

Indeed. :)



Stefan Krah
 



___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-26 Thread Xavier de Gaye

On 04/26/2016 07:12 PM, Stefan Krah wrote:
> Xavier de Gaye  gmail.com> writes:
>> This code, or part of it, could be used to setup a buildbot and in this case
>> there would not be any conflict between the GPL v3 license and the Python
>> license, I think. I don't see how it can be combined with Python 3.
>
> For the patches on the tracker I just went by your contributor agreement.
> I didn't check the lineage of the patches. Can I assume that either you
> are re-licensing GPL-stuff written by yourself to the PSF (which is a
> perfectly valid use case of the agreement) or rewriting from scratch?


Yes, I am re-licensing GPL code to the PSF for all the patches written by me
in the issues listed on http://bugs.python.org/issue26865#msg264310.  I have
only rewritten the patches from scratch in the following issues:

issue #26849: android does not support versioning in SONAME
  (using a switch case on ac_sys_system)
issue #26854: missing header on android for the ossaudiodev module
  (actually it's difficult to rewrite such an obvious patch)
issue #26855: add platform.android_ver() for android
  (using configparser; Chi Hsuan Yen is proposing a more complete 
approach)

Fixes for those three issues can also be found in other projects porting
python3 to android, the ones that I know of are:
  * Python 3 Android at https://github.com/yan12125/python3-android, author
Chi Hsuan Yen
  * python-for-android at https://github.com/kuri65536/python-for-android,
author shimoda dragon

I also browsed rapidly issue 23496 and could not find any overlap with my
patches.

Xavier

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-26 Thread Stefan Krah
Xavier de Gaye  gmail.com> writes:
> This code, or part of it, could be used to setup a buildbot and in this case
> there would not be any conflict between the GPL v3 license and the Python
> license, I think. I don't see how it can be combined with Python 3.

For the patches on the tracker I just went by your contributor agreement.
I didn't check the lineage of the patches. Can I assume that either you
are re-licensing GPL-stuff written by yourself to the PSF (which is a
perfectly valid use case of the agreement) or rewriting from scratch?


Stefan Krah



___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-26 Thread Xavier de Gaye

On 04/26/2016 04:14 PM, Ethan Furman wrote:
> On 04/24/2016 12:20 AM, Xavier de Gaye wrote:
>
>> [1] https://bitbucket.org/xdegaye/pyona/src
>
> The license:
> ---
> This software is licensed under the GNU General Public License version 3 or 
later.
> ---
>
>
> Will combining your code with Python 3 be a problem?


This code, or part of it, could be used to setup a buildbot and in this case
there would not be any conflict between the GPL v3 license and the Python
license, I think. I don't see how it can be combined with Python 3.

Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-26 Thread Xavier de Gaye

On 04/26/2016 04:02 AM, Nick Coghlan wrote:
> On 26 April 2016 at 06:25, Xavier de Gaye > wrote:
>
> On 04/25/2016 04:53 PM, Stefan Krah wrote:
> > Eric Snow gmail.com > writes:
> >> On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye gmail.com 
>
> > wrote:
> >>> Starting with API level 21 (Android 5.0), the build of python3 with 
the
> >>> official android toolchains (that is, without resorting to external
> >
> >> How does this relate tohttp://bugs.python.org/issue23496?
> >
> > As I understand, that issue seems abandoned and the patches are
> > (despite core devs asking otherwise) against 3.4.
> >
> >
> > If Xavier is willing to do so, I think it would be best to start over
> > with a new issue that integrates his work into 3.6.
>
> I will enter a new issue that lists all the new issues and the other 
already
> existing issues that, would have they been fixed, would have allowed a
> successfull cross-build and the same test suite results as described in my
> previous post.
>
>
> Thanks for this, Xavier!
>
> Once you have that, in addition to posting the link back here, you may also 
want to ping the Mobile SIG list: 
https://www.python.org/community/sigs/current/mobile-sig/


Issue 26865 [1] lists issues that may have to be fixed in the perspective of a
future support of the android platform.

Xavier

[1] http://bugs.python.org/issue26865

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-26 Thread Ethan Furman

On 04/24/2016 12:20 AM, Xavier de Gaye wrote:


[1] https://bitbucket.org/xdegaye/pyona/src


The license:
---
This software is licensed under the GNU General Public License version 3 
or later.

---


Will combining your code with Python 3 be a problem?

--
~Ethan~
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Ryan Gonzalez
Oh wow, has a year passed already? I don't have access to an Android device
suitable for development, and Cyd seems to have disappeared, which is why
the issue ended up abandoned. I'd be happy to try to help with the new
effort if possible!

--
Ryan
[ERROR]: Your autotools build scripts are 200 lines longer than your
program. Something’s wrong.
http://kirbyfan64.github.io/
On Apr 25, 2016 3:24 PM, "Xavier de Gaye"  wrote:

> On 04/25/2016 04:36 PM, Eric Snow wrote:
> > On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye 
> wrote:
> >> Starting with API level 21 (Android 5.0), the build of python3 with the
> >> official android toolchains (that is, without resorting to external
> >> libraries
> >> for wide character support) runs correctly.  With the set of patches
> >> described
> >> in the patches/Makefile file at [1], the cpython test suite runs[2] on
> the
> >> android x86 and armv7 emulators with only few errors[3].  Those errors
> are
> >> listed with their corresponding error messages, this may give a raw
> idea of
> >> the effort needed to support this platform.
> >
> > How does this relate to http://bugs.python.org/issue23496?
>
>
> The patches in issue 23496 address the native compilation of Android 4.4.2
> on
> an android device using a port of gcc on this device.  Some of these
> patches
> are not needed anymore on Android 5.0 and it seems that the kbox_fix.patch
> is
> needed because the KBOX application is used to build python in issue 23496.
>
> The existing issues that are relevant to the android platform are, I think:
> issue #26723: Add an option to skip _decimal module
> issue #22747: Interpreter fails in initialize on systems where
>   HAVE_LANGINFO_H is undefined
> issue #16353: add function to os module for getting path to default
> shell
> issue #20306: Lack of pw_gecos field in Android's struct passwd causes
>   cross-compilation for the pwd module to fail
>
> Xavier
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Nick Coghlan
On 26 April 2016 at 06:25, Xavier de Gaye  wrote:

> On 04/25/2016 04:53 PM, Stefan Krah wrote:
> > Eric Snow  gmail.com> writes:
> >> On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye  gmail.com
> >
> > wrote:
> >>> Starting with API level 21 (Android 5.0), the build of python3 with the
> >>> official android toolchains (that is, without resorting to external
> >
> >> How does this relate to http://bugs.python.org/issue23496?
> >
> > As I understand, that issue seems abandoned and the patches are
> > (despite core devs asking otherwise) against 3.4.
> >
> >
> > If Xavier is willing to do so, I think it would be best to start over
> > with a new issue that integrates his work into 3.6.
>
> I will enter a new issue that lists all the new issues and the other
> already
> existing issues that, would have they been fixed, would have allowed a
> successfull cross-build and the same test suite results as described in my
> previous post.
>

Thanks for this, Xavier!

Once you have that, in addition to posting the link back here, you may also
want to ping the Mobile SIG list:
https://www.python.org/community/sigs/current/mobile-sig/

Regards,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Xavier de Gaye

On 04/25/2016 04:53 PM, Stefan Krah wrote:
> Eric Snow  gmail.com> writes:
>> On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye  gmail.com>
> wrote:
>>> Starting with API level 21 (Android 5.0), the build of python3 with the
>>> official android toolchains (that is, without resorting to external
>
>> How does this relate to http://bugs.python.org/issue23496?
>
> As I understand, that issue seems abandoned and the patches are
> (despite core devs asking otherwise) against 3.4.
>
>
> If Xavier is willing to do so, I think it would be best to start over
> with a new issue that integrates his work into 3.6.


I will enter a new issue that lists all the new issues and the other already
existing issues that, would have they been fixed, would have allowed a
successfull cross-build and the same test suite results as described in my
previous post.

Xavier

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Xavier de Gaye

On 04/25/2016 04:36 PM, Eric Snow wrote:
> On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye  wrote:
>> Starting with API level 21 (Android 5.0), the build of python3 with the
>> official android toolchains (that is, without resorting to external
>> libraries
>> for wide character support) runs correctly.  With the set of patches
>> described
>> in the patches/Makefile file at [1], the cpython test suite runs[2] on the
>> android x86 and armv7 emulators with only few errors[3].  Those errors are
>> listed with their corresponding error messages, this may give a raw idea of
>> the effort needed to support this platform.
>
> How does this relate to http://bugs.python.org/issue23496?


The patches in issue 23496 address the native compilation of Android 4.4.2 on
an android device using a port of gcc on this device.  Some of these patches
are not needed anymore on Android 5.0 and it seems that the kbox_fix.patch is
needed because the KBOX application is used to build python in issue 23496.

The existing issues that are relevant to the android platform are, I think:
issue #26723: Add an option to skip _decimal module
issue #22747: Interpreter fails in initialize on systems where
  HAVE_LANGINFO_H is undefined
issue #16353: add function to os module for getting path to default shell
issue #20306: Lack of pw_gecos field in Android's struct passwd causes
  cross-compilation for the pwd module to fail

Xavier

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Stefan Krah
Eric Snow  gmail.com> writes:
> On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye  gmail.com>
wrote:
> > Starting with API level 21 (Android 5.0), the build of python3 with the
> > official android toolchains (that is, without resorting to external

> How does this relate to http://bugs.python.org/issue23496?

As I understand, that issue seems abandoned and the patches are
(despite core devs asking otherwise) against 3.4.


If Xavier is willing to do so, I think it would be best to start over
with a new issue that integrates his work into 3.6.


Stefan Krah


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Eric Snow
On Sun, Apr 24, 2016 at 1:20 AM, Xavier de Gaye  wrote:
> Starting with API level 21 (Android 5.0), the build of python3 with the
> official android toolchains (that is, without resorting to external
> libraries
> for wide character support) runs correctly.  With the set of patches
> described
> in the patches/Makefile file at [1], the cpython test suite runs[2] on the
> android x86 and armv7 emulators with only few errors[3].  Those errors are
> listed with their corresponding error messages, this may give a raw idea of
> the effort needed to support this platform.

How does this relate to http://bugs.python.org/issue23496?

-eric
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-25 Thread Xavier de Gaye

On 04/24/2016 11:50 AM, Stefan Krah wrote:
> Xavier de Gaye  gmail.com> writes:
>> Starting with API level 21 (Android 5.0), the build of python3 with the
>> official android toolchains (that is, without resorting to external libraries
>> for wide character support) runs correctly.  With the set of patches 
described
>> in the patches/Makefile file at [1], the cpython test suite runs[2] on the
>> android x86 and armv7 emulators with only few errors[3].  Those errors are
>> listed with their corresponding error messages, this may give a raw idea of
>> the effort needed to support this platform.
>>
>> Xavier
>>
>> [1] https://bitbucket.org/xdegaye/pyona/src
>> [2] To reproduce these results, follow the instructions found in INSTALL
>>   at https://bitbucket.org/xdegaye/pyona/wiki/install
>> [3] https://bitbucket.org/xdegaye/pyona/wiki/testsuite
>
>
> This looks great, very clean!  As I understand the patches, the locale.h and
> langinfo.h problems are solved.  Do you think the following issues on the
> Python bug tracker could be closed?
>
>
> http://bugs.python.org/issue20305
> http://bugs.python.org/issue22747
> http://bugs.python.org/issue17905


Thanks.
A fix is still needed because Android does not HAVE_LANGINFO_H.
I have tried to answer your question directly in those issues.

Xavier
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] support of the android platform

2016-04-24 Thread Stefan Krah
Xavier de Gaye  gmail.com> writes:
> Starting with API level 21 (Android 5.0), the build of python3 with the
> official android toolchains (that is, without resorting to external libraries
> for wide character support) runs correctly.  With the set of patches described
> in the patches/Makefile file at [1], the cpython test suite runs[2] on the
> android x86 and armv7 emulators with only few errors[3].  Those errors are
> listed with their corresponding error messages, this may give a raw idea of
> the effort needed to support this platform.
> 
> Xavier
> 
> [1] https://bitbucket.org/xdegaye/pyona/src
> [2] To reproduce these results, follow the instructions found in INSTALL
>  at https://bitbucket.org/xdegaye/pyona/wiki/install
> [3] https://bitbucket.org/xdegaye/pyona/wiki/testsuite


This looks great, very clean!  As I understand the patches, the locale.h and
langinfo.h problems are solved.  Do you think the following issues on the
Python bug tracker could be closed?


http://bugs.python.org/issue20305
http://bugs.python.org/issue22747
http://bugs.python.org/issue17905


Stefan Krah







___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] support of the android platform

2016-04-24 Thread Xavier de Gaye

Starting with API level 21 (Android 5.0), the build of python3 with the
official android toolchains (that is, without resorting to external libraries
for wide character support) runs correctly.  With the set of patches described
in the patches/Makefile file at [1], the cpython test suite runs[2] on the
android x86 and armv7 emulators with only few errors[3].  Those errors are
listed with their corresponding error messages, this may give a raw idea of
the effort needed to support this platform.

Xavier

[1] https://bitbucket.org/xdegaye/pyona/src
[2] To reproduce these results, follow the instructions found in INSTALL
at https://bitbucket.org/xdegaye/pyona/wiki/install
[3] https://bitbucket.org/xdegaye/pyona/wiki/testsuite

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com