Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe
@ 2014-07-14 14:46 Jate Sujjavanich
  2014-07-14 15:31 ` Enrico Scholz
  0 siblings, 1 reply; 6+ messages in thread
From: Jate Sujjavanich @ 2014-07-14 14:46 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

Previously, the python recipe did not have a way to add a DEPENDS on
tk.

This makes the option available for users of the meta-oe/meta-oe layer.

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
---
 meta/recipes-devtools/python/python_2.7.3.bb |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 0d64172..cc54296 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -42,6 +42,8 @@ S = "${WORKDIR}/Python-${PV}"
 
 inherit autotools multilib_header python-dir pythonnative
 
+PACKAGECONFIG[tkinter] = ",,tk,tk tk-lib"
+
 # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
 #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
 TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe
  2014-07-14 14:46 [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe Jate Sujjavanich
@ 2014-07-14 15:31 ` Enrico Scholz
  2014-07-14 17:58   ` Jate S
  0 siblings, 1 reply; 6+ messages in thread
From: Enrico Scholz @ 2014-07-14 15:31 UTC (permalink / raw)
  To: openembedded-core

Jate Sujjavanich <jatedev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
writes:

> +PACKAGECONFIG[tkinter] = ",,tk,tk tk-lib"

What do you want to reach with this?  Afais, build is not more deterministic
than before and requiring both 'tk' and 'tk-lib' when 'tkinter' is *not*
enabled does not look sane to me either.

You probably want something like

| PACKAGECONFIG[tkinter]="--with-tkinter, --without-tkinter, tk tk-lib"

although I do not know/checked whether '--with*-tkinter' is supported by
python's configure script.


Enrico


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe
  2014-07-14 15:31 ` Enrico Scholz
@ 2014-07-14 17:58   ` Jate S
  2014-07-14 18:32     ` Enrico Scholz
  0 siblings, 1 reply; 6+ messages in thread
From: Jate S @ 2014-07-14 17:58 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

Python 2.7.x does not use an explicit configure option for tk support.
Instead, it tries to detect the tk and tcl libraries before compiling
python-tkinter.

In PACKAGECONFIG[*], items three and four are the DEPENDS and RDEPENDS,
respectively. They are only added to the python DEPENDS/RDEPENDS when the
user adds tkinter to the PACKAGECONFIG value.

This thread contains more discussion:

https://lists.yoctoproject.org/pipermail/yocto/2014-July/thread.html#20415

- Jate S.



On Mon, Jul 14, 2014 at 11:31 AM, Enrico Scholz <
enrico.scholz@sigma-chemnitz.de> wrote:

> Jate Sujjavanich <jatedev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> writes:
>
> > +PACKAGECONFIG[tkinter] = ",,tk,tk tk-lib"
>
> What do you want to reach with this?  Afais, build is not more
> deterministic
> than before and requiring both 'tk' and 'tk-lib' when 'tkinter' is *not*
> enabled does not look sane to me either.
>
> You probably want something like
>
> | PACKAGECONFIG[tkinter]="--with-tkinter, --without-tkinter, tk tk-lib"
>
> although I do not know/checked whether '--with*-tkinter' is supported by
> python's configure script.
>
>
> Enrico
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2304 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe
  2014-07-14 17:58   ` Jate S
@ 2014-07-14 18:32     ` Enrico Scholz
  2014-07-21  1:01       ` Jate S
  0 siblings, 1 reply; 6+ messages in thread
From: Enrico Scholz @ 2014-07-14 18:32 UTC (permalink / raw)
  To: Jate S; +Cc: openembedded-core

Jate S <jatedev@gmail.com> writes:

> Python 2.7.x does not use an explicit configure option for tk support.
> Instead, it tries to detect the tk and tcl libraries before compiling
> python-tkinter.

Your patch does not solve the issue of non-deterministic builds.  When
tk was added by some other way, python will get tkinter support although
PACKAGECONFIG was not set.

An idea to make build deterministic might be patching of detect_modules()
in setup.py to add disabled modules to 'missing'.  E.g.

|             missing.append('_tkinter')
| 
|+        missing.extend(os.environ('OE_HACK_MISSING').split())
|         return missing

Probably there are better/cleaner ways but I am not familar with python
distutils.


Enrico


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe
  2014-07-14 18:32     ` Enrico Scholz
@ 2014-07-21  1:01       ` Jate S
  2014-07-21  3:08         ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Jate S @ 2014-07-21  1:01 UTC (permalink / raw)
  To: Enrico Scholz, martin.jansa; +Cc: openembedded-core

The presence of the tk library determines whether python's compile
task will build tkinter. Then the presence of python-tkinter in
IMAGE_INSTALL will then determine whether it is installed.

In the absence of tk provided by meta-oe, the python recipe will
install an empty python-tkinter package.

I cannot think of a cleaner way to do this right now. Ideally the
package python-tkinter could trigger a python DEPENDS on tk...


Martin, you originally suggested the PACKAGECONFIG. Do you have any
further thoughts on this?

- Jate S.


On Mon, Jul 14, 2014 at 2:32 PM, Enrico Scholz
<enrico.scholz@sigma-chemnitz.de> wrote:
> Jate S <jatedev@gmail.com> writes:
>
>> Python 2.7.x does not use an explicit configure option for tk support.
>> Instead, it tries to detect the tk and tcl libraries before compiling
>> python-tkinter.
>
> Your patch does not solve the issue of non-deterministic builds.  When
> tk was added by some other way, python will get tkinter support although
> PACKAGECONFIG was not set.
>
> An idea to make build deterministic might be patching of detect_modules()
> in setup.py to add disabled modules to 'missing'.  E.g.
>
> |             missing.append('_tkinter')
> |
> |+        missing.extend(os.environ('OE_HACK_MISSING').split())
> |         return missing
>
> Probably there are better/cleaner ways but I am not familar with python
> distutils.
>
>
> Enrico


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe
  2014-07-21  1:01       ` Jate S
@ 2014-07-21  3:08         ` Martin Jansa
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2014-07-21  3:08 UTC (permalink / raw)
  To: Jate S; +Cc: Enrico Scholz, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1880 bytes --]

On Sun, Jul 20, 2014 at 09:01:05PM -0400, Jate S wrote:
> The presence of the tk library determines whether python's compile
> task will build tkinter. Then the presence of python-tkinter in
> IMAGE_INSTALL will then determine whether it is installed.
> 
> In the absence of tk provided by meta-oe, the python recipe will
> install an empty python-tkinter package.
> 
> I cannot think of a cleaner way to do this right now. Ideally the
> package python-tkinter could trigger a python DEPENDS on tk...
> 
> 
> Martin, you originally suggested the PACKAGECONFIG. Do you have any
> further thoughts on this?

Richard just submitted patch to explicitly disable tk, extend the patch
to make it configurable and use this new option from PACKAGECONFIG

http://git.openembedded.org/openembedded-core/commit/?id=53ae544cfdac22c82af452b8c7ebe6664296bd9b

> 
> - Jate S.
> 
> 
> On Mon, Jul 14, 2014 at 2:32 PM, Enrico Scholz
> <enrico.scholz@sigma-chemnitz.de> wrote:
> > Jate S <jatedev@gmail.com> writes:
> >
> >> Python 2.7.x does not use an explicit configure option for tk support.
> >> Instead, it tries to detect the tk and tcl libraries before compiling
> >> python-tkinter.
> >
> > Your patch does not solve the issue of non-deterministic builds.  When
> > tk was added by some other way, python will get tkinter support although
> > PACKAGECONFIG was not set.
> >
> > An idea to make build deterministic might be patching of detect_modules()
> > in setup.py to add disabled modules to 'missing'.  E.g.
> >
> > |             missing.append('_tkinter')
> > |
> > |+        missing.extend(os.environ('OE_HACK_MISSING').split())
> > |         return missing
> >
> > Probably there are better/cleaner ways but I am not familar with python
> > distutils.
> >
> >
> > Enrico

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-21  3:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14 14:46 [PATCH] python2: Add PACKAGECONFIG for tkinter to support tk from meta-oe Jate Sujjavanich
2014-07-14 15:31 ` Enrico Scholz
2014-07-14 17:58   ` Jate S
2014-07-14 18:32     ` Enrico Scholz
2014-07-21  1:01       ` Jate S
2014-07-21  3:08         ` Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox