Re: [OE-core] [PATCH 1/4] xcb-proto: create .pyc files for python2

2016-10-12 Thread Robert Yang



On 10/12/2016 07:36 PM, Burton, Ross wrote:


On 12 October 2016 at 07:31, Robert Yang > wrote:

+cd  ${D}${libdir}/xcb-proto/xcbgen
+python -m py_compile *.py


The cd is redundant as you can pass absolute paths to py_compile.


Thanks, updated in the repo:

  git://git.openembedded.org/openembedded-core-contrib rbt/4fixes
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/4fixes

Robert Yang (4):
  xcb-proto: create .pyc files for python2
  xcb-proto: fix for python3
  libxcb: use python3 to build it
  source-highlight: use with-boost-libdir

// Robert



Ross

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] xcb-proto: create .pyc files for python2

2016-10-12 Thread Burton, Ross
On 12 October 2016 at 07:31, Robert Yang  wrote:

> +cd  ${D}${libdir}/xcb-proto/xcbgen
> +python -m py_compile *.py
>

The cd is redundant as you can pass absolute paths to py_compile.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] xcb-proto: create .pyc files for python2

2016-10-12 Thread Robert Yang



On 10/12/2016 04:00 PM, Jussi Kukkonen wrote:

On 12 October 2016 at 09:31, Robert Yang > wrote:

Its Makefile's do_install creates .pyc files for python3, now also
create them for python2 so that they will be recorded by manifest, and
can be cleaned correctly.


So this is about autotools byte-compiling for python3 at install time and then
something using those python modules with python2 during the build?


Yes.



I wonder if this is something that should/can be solved in a more generic way?
Alternatively, is the xcbgen user something in oe-core and can we tell it to not
use python2?


The only one in oe-core which used python2 to invoke xcb-proto's python
modules was libxcb, and I've fixed it to use python3, but we don't know
which one uses python2 out of oe-core, so I also fix xcb-proto for python2.

// Robert



- Jussi




Signed-off-by: Robert Yang >
---
 meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
 | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb

b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb 

index 8bdca32..54988fc 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb

+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb

@@ -28,3 +28,11 @@ RDEPENDS_${PN}-dev = ""
 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"

 BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+# Makefile's do_install creates .pyc files for python3, now also create
+# them for python2 so that they will be recorded by manifest, and can 
be
+# cleaned correctly.
+cd  ${D}${libdir}/xcb-proto/xcbgen
+python -m py_compile *.py
+}
--
2.9.0

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org

http://lists.openembedded.org/mailman/listinfo/openembedded-core




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] xcb-proto: create .pyc files for python2

2016-10-12 Thread Jussi Kukkonen
On 12 October 2016 at 09:31, Robert Yang  wrote:

> Its Makefile's do_install creates .pyc files for python3, now also
> create them for python2 so that they will be recorded by manifest, and
> can be cleaned correctly.


So this is about autotools byte-compiling for python3 at install time and
then something using those python modules with python2 during the build?

I wonder if this is something that should/can be solved in a more generic
way? Alternatively, is the xcbgen user something in oe-core and can we tell
it to not use python2?

- Jussi



>
Signed-off-by: Robert Yang 
> ---
>  meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | 8 
>  1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
> b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
> index 8bdca32..54988fc 100644
> --- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
> +++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
> @@ -28,3 +28,11 @@ RDEPENDS_${PN}-dev = ""
>  RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
>
>  BBCLASSEXTEND = "native nativesdk"
> +
> +do_install_append() {
> +# Makefile's do_install creates .pyc files for python3, now also
> create
> +# them for python2 so that they will be recorded by manifest, and can
> be
> +# cleaned correctly.
> +cd  ${D}${libdir}/xcb-proto/xcbgen
> +python -m py_compile *.py
> +}
> --
> 2.9.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core