Re: [android-building] Migrate to python3

2020-01-21 Thread 'Dan Willemsen' via Android Building
>
>  If the host does not have python2(20.04), we can use AOSP prebuilt
> python2.


No, even if the host does have python2, we'll be using our prebuilt
instead. (Unless someone is explicitly calling /usr/bin/python[2], which
would be a bug)

As far as I know, AOSP uses host python to build  and uses the prebuilt
> version to do some testing


The Soong python support (for host tools/tests and device tests) uses the
python source in external/python/..., not the prebuilt. (The prebuilt is
generated from the same sources)

Will you change soong_ui to set AOSP build with prebuilt python2?
>

That already happened with Android 10 (Q).

- Dan

On Tue, Jan 21, 2020 at 8:23 AM XING WANG 
wrote:

> Thanks Dan,
>
> Please let me clarify further.
>
> So AOSP will not modify all python2 in the build script to be python3
> compatible(like dict.iteritems), and we should build AOSP with python2,  If
> the host does not have python2(20.04), we can use AOSP prebuilt python2.
>
> As far as I know, AOSP uses host python to build  and uses the prebuilt
> version to do some testing
> Will you change soong_ui to set AOSP build with prebuilt python2?
>
>
> On Tuesday, January 21, 2020 at 3:24:12 PM UTC+8, Dan Willemsen wrote:
>>
>> There are no current plans to switch everything over to python3. We
>> provide our own prebuilt of python2 (in
>> prebuilts/build-tools/path/linux-x86/python2 ->
>> prebuilts/build-tools/linux-x86/bin/py2-cmd), so that script you linked
>> should continue working even if you remove python2 from your host.
>>
>> (I'm still working on getting a fully functional python3 prebuilt, so
>> we'll still use the host for that, I should have that done for the next
>> release).
>>
>> Let me know if you see failures on 20.04 without python2, it's possible
>> there are some scripts hardcoding /usr/bin/python[2] still.
>>
>> - Dan
>>
>> On Sun, Jan 19, 2020 at 8:24 AM XING WANG  wrote:
>>
>>> We found AOSP cant not build successfully without python2
>>>
>>> There is a example for python2 only scripts
>>>
>>> https://cs.android.com/android/platform/superproject/+/master:build/make/tools/post_process_props.py?q=iteritems=android%2Fplatform%2Fsuperproject:build%2F
>>>
>>> Is there a plan to switch to a pure python3 environment ?
>>>
>>> We are evaluating whether we can switch the build server to ubuntu 20.04
>>> which without python2 support  in the near future.
>>>
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-building?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Building" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/afa2ada5-0bea-41dd-a7ab-eb3a7c8b7e7d%40googlegroups.com
>>> 
>>> .
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/0cb5a861-f45e-4cea-8cc4-d59c792964f7%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: [android-building] Migrate to python3

2020-01-21 Thread XING WANG
Thanks Dan, 

Please let me clarify further. 

So AOSP will not modify all python2 in the build script to be python3 
compatible(like dict.iteritems), and we should build AOSP with python2,  If 
the host does not have python2(20.04), we can use AOSP prebuilt python2.

As far as I know, AOSP uses host python to build  and uses the prebuilt 
version to do some testing
Will you change soong_ui to set AOSP build with prebuilt python2?


On Tuesday, January 21, 2020 at 3:24:12 PM UTC+8, Dan Willemsen wrote:
>
> There are no current plans to switch everything over to python3. We 
> provide our own prebuilt of python2 (in 
> prebuilts/build-tools/path/linux-x86/python2 -> 
> prebuilts/build-tools/linux-x86/bin/py2-cmd), so that script you linked 
> should continue working even if you remove python2 from your host.
>
> (I'm still working on getting a fully functional python3 prebuilt, so 
> we'll still use the host for that, I should have that done for the next 
> release).
>
> Let me know if you see failures on 20.04 without python2, it's possible 
> there are some scripts hardcoding /usr/bin/python[2] still.
>
> - Dan
>
> On Sun, Jan 19, 2020 at 8:24 AM XING WANG  > wrote:
>
>> We found AOSP cant not build successfully without python2
>>
>> There is a example for python2 only scripts
>>
>> https://cs.android.com/android/platform/superproject/+/master:build/make/tools/post_process_props.py?q=iteritems=android%2Fplatform%2Fsuperproject:build%2F
>>
>> Is there a plan to switch to a pure python3 environment ?
>>
>> We are evaluating whether we can switch the build server to ubuntu 20.04 
>> which without python2 support  in the near future.
>>
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to android-...@googlegroups.com 
>> 
>> To unsubscribe from this group, send email to
>> android-...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/afa2ada5-0bea-41dd-a7ab-eb3a7c8b7e7d%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/0cb5a861-f45e-4cea-8cc4-d59c792964f7%40googlegroups.com.


[android-building] Migrate to python3

2020-01-19 Thread XING WANG
We found AOSP cant not build successfully without python2

There is a example for python2 only scripts
https://cs.android.com/android/platform/superproject/+/master:build/make/tools/post_process_props.py?q=iteritems=android%2Fplatform%2Fsuperproject:build%2F

Is there a plan to switch to a pure python3 environment ?

We are evaluating whether we can switch the build server to ubuntu 20.04 
which without python2 support  in the near future.


-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/afa2ada5-0bea-41dd-a7ab-eb3a7c8b7e7d%40googlegroups.com.