* [PATCH 0/2] python: fix breakage in minimal installs @ 2012-03-23 15:27 Gary Thomas 2012-03-23 15:27 ` [PATCH 1/2] python: remove a target dependency Gary Thomas 2012-03-23 15:27 ` [PATCH 2/2] python: Fix minimal packaging dependencies Gary Thomas 0 siblings, 2 replies; 9+ messages in thread From: Gary Thomas @ 2012-03-23 15:27 UTC (permalink / raw) To: openembedded-core Gary Thomas (2): python: remove a target dependency python: Fix minimal packaging dependencies meta/recipes-devtools/python/python_2.7.2.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -- 1.7.7.6 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] python: remove a target dependency 2012-03-23 15:27 [PATCH 0/2] python: fix breakage in minimal installs Gary Thomas @ 2012-03-23 15:27 ` Gary Thomas 2012-03-23 15:27 ` [PATCH 2/2] python: Fix minimal packaging dependencies Gary Thomas 1 sibling, 0 replies; 9+ messages in thread From: Gary Thomas @ 2012-03-23 15:27 UTC (permalink / raw) To: openembedded-core The target dependency DEPENDS_sharprom does not belong in this core recipe and should be moved to a .bbappend file in the appropriate layer if still required. Signed-off-by: Gary Thomas <gary@mlbassoc.com> --- meta/recipes-devtools/python/python_2.7.2.bb | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb index cb0a1d5..8111b31 100644 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ b/meta/recipes-devtools/python/python_2.7.2.bb @@ -1,6 +1,5 @@ require python.inc DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" -DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" PR = "${INC_PR}.8" DISTRO_SRC_URI ?= "file://sitecustomize.py" -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 15:27 [PATCH 0/2] python: fix breakage in minimal installs Gary Thomas 2012-03-23 15:27 ` [PATCH 1/2] python: remove a target dependency Gary Thomas @ 2012-03-23 15:27 ` Gary Thomas 2012-03-23 15:35 ` Martin Jansa 1 sibling, 1 reply; 9+ messages in thread From: Gary Thomas @ 2012-03-23 15:27 UTC (permalink / raw) To: openembedded-core If you install the top-level python package only on a minimal system which has no other python packages installed then python is not functional at all. Without any extra packages installed this error is seen: # python Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 64, in <module> import traceback ImportError: No module named traceback Installing python-lang only partly fixes the problem as this error still exists: # python Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 569, in <module> main() File "/usr/lib/python2.7/site.py", line 551, in main known_paths = addusersitepackages(known_paths) File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages user_site = getusersitepackages() File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/usr/lib/python2.7/site.py", line 243, in getuserbase USER_BASE = get_config_var('userbase') File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var return get_config_vars().get(name) File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars import re ImportError: No module named re Signed-off-by: Gary Thomas <gary@mlbassoc.com> --- meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb index 8111b31..f1ba42d 100644 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ b/meta/recipes-devtools/python/python_2.7.2.bb @@ -1,6 +1,6 @@ require python.inc DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" -PR = "${INC_PR}.8" +PR = "${INC_PR}.9" DISTRO_SRC_URI ?= "file://sitecustomize.py" DISTRO_SRC_URI_linuxstdbase = "" @@ -123,6 +123,7 @@ py_package_preprocess () { require python-${PYTHON_MAJMIN}-manifest.inc # manual dependency additions +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" RPROVIDES_${PN}-core = "${PN}" RRECOMMENDS_${PN}-core = "${PN}-readline" RRECOMMENDS_${PN}-crypt = "openssl" -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 15:27 ` [PATCH 2/2] python: Fix minimal packaging dependencies Gary Thomas @ 2012-03-23 15:35 ` Martin Jansa 2012-03-23 15:48 ` Martin Jansa 0 siblings, 1 reply; 9+ messages in thread From: Martin Jansa @ 2012-03-23 15:35 UTC (permalink / raw) To: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 2511 bytes --] On Fri, Mar 23, 2012 at 09:27:08AM -0600, Gary Thomas wrote: > If you install the top-level python package only on a minimal > system which has no other python packages installed then python > is not functional at all. Without any extra packages installed > this error is seen: > # python > Traceback (most recent call last): > File "/usr/lib/python2.7/site.py", line 64, in <module> > import traceback > ImportError: No module named traceback > > Installing python-lang only partly fixes the problem as this > error still exists: > # python > Traceback (most recent call last): > File "/usr/lib/python2.7/site.py", line 569, in <module> > main() > File "/usr/lib/python2.7/site.py", line 551, in main > known_paths = addusersitepackages(known_paths) > File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages > user_site = getusersitepackages() > File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages > user_base = getuserbase() # this will also set USER_BASE > File "/usr/lib/python2.7/site.py", line 243, in getuserbase > USER_BASE = get_config_var('userbase') > File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var > return get_config_vars().get(name) > File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars > import re > ImportError: No module named re > > Signed-off-by: Gary Thomas <gary@mlbassoc.com> > --- > meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb > index 8111b31..f1ba42d 100644 > --- a/meta/recipes-devtools/python/python_2.7.2.bb > +++ b/meta/recipes-devtools/python/python_2.7.2.bb > @@ -1,6 +1,6 @@ > require python.inc > DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" > -PR = "${INC_PR}.8" > +PR = "${INC_PR}.9" > > DISTRO_SRC_URI ?= "file://sitecustomize.py" > DISTRO_SRC_URI_linuxstdbase = "" > @@ -123,6 +123,7 @@ py_package_preprocess () { > require python-${PYTHON_MAJMIN}-manifest.inc This should be fixed probably in scripts/contrib/python/generate-manifest-2.7.py > > # manual dependency additions > +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" And here is typo, how did you test this change? Cheers, -- Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 205 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 15:35 ` Martin Jansa @ 2012-03-23 15:48 ` Martin Jansa 2012-03-23 16:19 ` Gary Thomas 0 siblings, 1 reply; 9+ messages in thread From: Martin Jansa @ 2012-03-23 15:48 UTC (permalink / raw) To: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 2809 bytes --] On Fri, Mar 23, 2012 at 04:35:53PM +0100, Martin Jansa wrote: > On Fri, Mar 23, 2012 at 09:27:08AM -0600, Gary Thomas wrote: > > If you install the top-level python package only on a minimal > > system which has no other python packages installed then python > > is not functional at all. Without any extra packages installed > > this error is seen: > > # python > > Traceback (most recent call last): > > File "/usr/lib/python2.7/site.py", line 64, in <module> > > import traceback > > ImportError: No module named traceback > > > > Installing python-lang only partly fixes the problem as this > > error still exists: > > # python > > Traceback (most recent call last): > > File "/usr/lib/python2.7/site.py", line 569, in <module> > > main() > > File "/usr/lib/python2.7/site.py", line 551, in main > > known_paths = addusersitepackages(known_paths) > > File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages > > user_site = getusersitepackages() > > File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages > > user_base = getuserbase() # this will also set USER_BASE > > File "/usr/lib/python2.7/site.py", line 243, in getuserbase > > USER_BASE = get_config_var('userbase') > > File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var > > return get_config_vars().get(name) > > File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars > > import re > > ImportError: No module named re > > > > Signed-off-by: Gary Thomas <gary@mlbassoc.com> > > --- > > meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb > > index 8111b31..f1ba42d 100644 > > --- a/meta/recipes-devtools/python/python_2.7.2.bb > > +++ b/meta/recipes-devtools/python/python_2.7.2.bb > > @@ -1,6 +1,6 @@ > > require python.inc > > DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" > > -PR = "${INC_PR}.8" > > +PR = "${INC_PR}.9" > > > > DISTRO_SRC_URI ?= "file://sitecustomize.py" > > DISTRO_SRC_URI_linuxstdbase = "" > > @@ -123,6 +123,7 @@ py_package_preprocess () { > > require python-${PYTHON_MAJMIN}-manifest.inc > > This should be fixed probably in > scripts/contrib/python/generate-manifest-2.7.py > > > > > # manual dependency additions > > +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" > > And here is typo, how did you test this change? And also notice that there is no ${PN} in PACKAGES, so by "top-level python package" you mean python-core right? Cheers, -- Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 205 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 15:48 ` Martin Jansa @ 2012-03-23 16:19 ` Gary Thomas 2012-03-23 16:28 ` Gary Thomas 0 siblings, 1 reply; 9+ messages in thread From: Gary Thomas @ 2012-03-23 16:19 UTC (permalink / raw) To: openembedded-core On 2012-03-23 09:48, Martin Jansa wrote: > On Fri, Mar 23, 2012 at 04:35:53PM +0100, Martin Jansa wrote: >> On Fri, Mar 23, 2012 at 09:27:08AM -0600, Gary Thomas wrote: >>> If you install the top-level python package only on a minimal >>> system which has no other python packages installed then python >>> is not functional at all. Without any extra packages installed >>> this error is seen: >>> # python >>> Traceback (most recent call last): >>> File "/usr/lib/python2.7/site.py", line 64, in<module> >>> import traceback >>> ImportError: No module named traceback >>> >>> Installing python-lang only partly fixes the problem as this >>> error still exists: >>> # python >>> Traceback (most recent call last): >>> File "/usr/lib/python2.7/site.py", line 569, in<module> >>> main() >>> File "/usr/lib/python2.7/site.py", line 551, in main >>> known_paths = addusersitepackages(known_paths) >>> File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages >>> user_site = getusersitepackages() >>> File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages >>> user_base = getuserbase() # this will also set USER_BASE >>> File "/usr/lib/python2.7/site.py", line 243, in getuserbase >>> USER_BASE = get_config_var('userbase') >>> File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var >>> return get_config_vars().get(name) >>> File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars >>> import re >>> ImportError: No module named re >>> >>> Signed-off-by: Gary Thomas<gary@mlbassoc.com> >>> --- >>> meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- >>> 1 files changed, 2 insertions(+), 1 deletions(-) >>> >>> diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb >>> index 8111b31..f1ba42d 100644 >>> --- a/meta/recipes-devtools/python/python_2.7.2.bb >>> +++ b/meta/recipes-devtools/python/python_2.7.2.bb >>> @@ -1,6 +1,6 @@ >>> require python.inc >>> DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" >>> -PR = "${INC_PR}.8" >>> +PR = "${INC_PR}.9" >>> >>> DISTRO_SRC_URI ?= "file://sitecustomize.py" >>> DISTRO_SRC_URI_linuxstdbase = "" >>> @@ -123,6 +123,7 @@ py_package_preprocess () { >>> require python-${PYTHON_MAJMIN}-manifest.inc >> >> This should be fixed probably in >> scripts/contrib/python/generate-manifest-2.7.py >> >>> >>> # manual dependency additions >>> +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" >> >> And here is typo, how did you test this change? > > And also notice that there is no ${PN} in PACKAGES, so by "top-level > python package" you mean python-core right? Yes. As far as my testing, it got muddled with something else and what I've proposed doesn't help, sorry. I'm looking into how to fix this via the generate-manifest script and will send a different patch shortly [I hope]. Query: if I change the script, should I also bum PR in this recipe? -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 16:19 ` Gary Thomas @ 2012-03-23 16:28 ` Gary Thomas 2012-03-23 16:36 ` Martin Jansa 0 siblings, 1 reply; 9+ messages in thread From: Gary Thomas @ 2012-03-23 16:28 UTC (permalink / raw) To: openembedded-core On 2012-03-23 10:19, Gary Thomas wrote: > On 2012-03-23 09:48, Martin Jansa wrote: >> On Fri, Mar 23, 2012 at 04:35:53PM +0100, Martin Jansa wrote: >>> On Fri, Mar 23, 2012 at 09:27:08AM -0600, Gary Thomas wrote: >>>> If you install the top-level python package only on a minimal >>>> system which has no other python packages installed then python >>>> is not functional at all. Without any extra packages installed >>>> this error is seen: >>>> # python >>>> Traceback (most recent call last): >>>> File "/usr/lib/python2.7/site.py", line 64, in<module> >>>> import traceback >>>> ImportError: No module named traceback >>>> >>>> Installing python-lang only partly fixes the problem as this >>>> error still exists: >>>> # python >>>> Traceback (most recent call last): >>>> File "/usr/lib/python2.7/site.py", line 569, in<module> >>>> main() >>>> File "/usr/lib/python2.7/site.py", line 551, in main >>>> known_paths = addusersitepackages(known_paths) >>>> File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages >>>> user_site = getusersitepackages() >>>> File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages >>>> user_base = getuserbase() # this will also set USER_BASE >>>> File "/usr/lib/python2.7/site.py", line 243, in getuserbase >>>> USER_BASE = get_config_var('userbase') >>>> File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var >>>> return get_config_vars().get(name) >>>> File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars >>>> import re >>>> ImportError: No module named re >>>> >>>> Signed-off-by: Gary Thomas<gary@mlbassoc.com> >>>> --- >>>> meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- >>>> 1 files changed, 2 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb >>>> index 8111b31..f1ba42d 100644 >>>> --- a/meta/recipes-devtools/python/python_2.7.2.bb >>>> +++ b/meta/recipes-devtools/python/python_2.7.2.bb >>>> @@ -1,6 +1,6 @@ >>>> require python.inc >>>> DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" >>>> -PR = "${INC_PR}.8" >>>> +PR = "${INC_PR}.9" >>>> >>>> DISTRO_SRC_URI ?= "file://sitecustomize.py" >>>> DISTRO_SRC_URI_linuxstdbase = "" >>>> @@ -123,6 +123,7 @@ py_package_preprocess () { >>>> require python-${PYTHON_MAJMIN}-manifest.inc >>> >>> This should be fixed probably in >>> scripts/contrib/python/generate-manifest-2.7.py >>> >>>> >>>> # manual dependency additions >>>> +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" >>> >>> And here is typo, how did you test this change? >> >> And also notice that there is no ${PN} in PACKAGES, so by "top-level >> python package" you mean python-core right? > > Yes. As far as my testing, it got muddled with something else and > what I've proposed doesn't help, sorry. I'm looking into how to fix > this via the generate-manifest script and will send a different patch > shortly [I hope]. Sadly, my attempt to fix this doesn't work. Here's what I tried, but it has no effect: diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py index 85ca353..bde7db9 100755 --- a/scripts/contrib/python/generate-manifest-2.7.py +++ b/scripts/contrib/python/generate-manifest-2.7.py @@ -160,7 +160,7 @@ if __name__ == "__main__": # Parameters: revision, name, description, dependencies, filenames # - m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "", + m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "${PN}-lang ${PN}-re", "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " + "genericpath.* getopt.* linecache.* new.* " + "os.* posixpath.* struct.* " + @@ -276,7 +276,7 @@ if __name__ == "__main__": m.addPackage( "${PN}-json", "Python JSON Support", "${PN}-core ${PN}-math ${PN}-re", "json lib-dynload/_json.so" ) # package - m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "${PN}-core", + m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "", "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_funct "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " + "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* rep @@ -322,7 +322,7 @@ if __name__ == "__main__": m.addPackage( "${PN}-profile", "Python Basic Profiling Support", "${PN}-core ${PN}-textutils", "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" ) - m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core", + m.addPackage( "${PN}-re", "Python Regular Expression APIs", "", "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin m.addPackage( "${PN}-readline", "Python Readline Support", "${PN}-core", > > Query: if I change the script, should I also bum PR in this recipe? > > For now, I'll just have to install python-lang and python-re manually... -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 16:28 ` Gary Thomas @ 2012-03-23 16:36 ` Martin Jansa 2012-03-23 17:00 ` Gary Thomas 0 siblings, 1 reply; 9+ messages in thread From: Martin Jansa @ 2012-03-23 16:36 UTC (permalink / raw) To: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 6319 bytes --] On Fri, Mar 23, 2012 at 10:28:55AM -0600, Gary Thomas wrote: > On 2012-03-23 10:19, Gary Thomas wrote: > > On 2012-03-23 09:48, Martin Jansa wrote: > >> On Fri, Mar 23, 2012 at 04:35:53PM +0100, Martin Jansa wrote: > >>> On Fri, Mar 23, 2012 at 09:27:08AM -0600, Gary Thomas wrote: > >>>> If you install the top-level python package only on a minimal > >>>> system which has no other python packages installed then python > >>>> is not functional at all. Without any extra packages installed > >>>> this error is seen: > >>>> # python > >>>> Traceback (most recent call last): > >>>> File "/usr/lib/python2.7/site.py", line 64, in<module> > >>>> import traceback > >>>> ImportError: No module named traceback > >>>> > >>>> Installing python-lang only partly fixes the problem as this > >>>> error still exists: > >>>> # python > >>>> Traceback (most recent call last): > >>>> File "/usr/lib/python2.7/site.py", line 569, in<module> > >>>> main() > >>>> File "/usr/lib/python2.7/site.py", line 551, in main > >>>> known_paths = addusersitepackages(known_paths) > >>>> File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages > >>>> user_site = getusersitepackages() > >>>> File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages > >>>> user_base = getuserbase() # this will also set USER_BASE > >>>> File "/usr/lib/python2.7/site.py", line 243, in getuserbase > >>>> USER_BASE = get_config_var('userbase') > >>>> File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var > >>>> return get_config_vars().get(name) > >>>> File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars > >>>> import re > >>>> ImportError: No module named re > >>>> > >>>> Signed-off-by: Gary Thomas<gary@mlbassoc.com> > >>>> --- > >>>> meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- > >>>> 1 files changed, 2 insertions(+), 1 deletions(-) > >>>> > >>>> diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb > >>>> index 8111b31..f1ba42d 100644 > >>>> --- a/meta/recipes-devtools/python/python_2.7.2.bb > >>>> +++ b/meta/recipes-devtools/python/python_2.7.2.bb > >>>> @@ -1,6 +1,6 @@ > >>>> require python.inc > >>>> DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" > >>>> -PR = "${INC_PR}.8" > >>>> +PR = "${INC_PR}.9" > >>>> > >>>> DISTRO_SRC_URI ?= "file://sitecustomize.py" > >>>> DISTRO_SRC_URI_linuxstdbase = "" > >>>> @@ -123,6 +123,7 @@ py_package_preprocess () { > >>>> require python-${PYTHON_MAJMIN}-manifest.inc > >>> > >>> This should be fixed probably in > >>> scripts/contrib/python/generate-manifest-2.7.py > >>> > >>>> > >>>> # manual dependency additions > >>>> +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" > >>> > >>> And here is typo, how did you test this change? > >> > >> And also notice that there is no ${PN} in PACKAGES, so by "top-level > >> python package" you mean python-core right? > > > > Yes. As far as my testing, it got muddled with something else and > > what I've proposed doesn't help, sorry. I'm looking into how to fix > > this via the generate-manifest script and will send a different patch > > shortly [I hope]. > > Sadly, my attempt to fix this doesn't work. Here's what I tried, but > it has no effect: have you executed updated script to actually regenerate manifest and rebuild python with updated manifest? > diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py > index 85ca353..bde7db9 100755 > --- a/scripts/contrib/python/generate-manifest-2.7.py > +++ b/scripts/contrib/python/generate-manifest-2.7.py > @@ -160,7 +160,7 @@ if __name__ == "__main__": > # Parameters: revision, name, description, dependencies, filenames > # > > - m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "", > + m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "${PN}-lang ${PN}-re", > "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " + > "genericpath.* getopt.* linecache.* new.* " + > "os.* posixpath.* struct.* " + > @@ -276,7 +276,7 @@ if __name__ == "__main__": > m.addPackage( "${PN}-json", "Python JSON Support", "${PN}-core ${PN}-math ${PN}-re", > "json lib-dynload/_json.so" ) # package > > - m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "${PN}-core", > + m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "", why? what if someone tries to install python-lang, how he get python-core? > "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_funct > "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " + > "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* rep > @@ -322,7 +322,7 @@ if __name__ == "__main__": > m.addPackage( "${PN}-profile", "Python Basic Profiling Support", "${PN}-core ${PN}-textutils", > "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" ) > > - m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core", > + m.addPackage( "${PN}-re", "Python Regular Expression APIs", "", the same, why? what if someone tries to install python-re, how he get python-core? > "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin > > m.addPackage( "${PN}-readline", "Python Readline Support", "${PN}-core", > > > > > Query: if I change the script, should I also bum PR in this recipe? > > > > > > For now, I'll just have to install python-lang and python-re manually... > > -- > ------------------------------------------------------------ > Gary Thomas | Consulting for the > MLB Associates | Embedded world > ------------------------------------------------------------ > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core -- Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 205 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] python: Fix minimal packaging dependencies 2012-03-23 16:36 ` Martin Jansa @ 2012-03-23 17:00 ` Gary Thomas 0 siblings, 0 replies; 9+ messages in thread From: Gary Thomas @ 2012-03-23 17:00 UTC (permalink / raw) To: openembedded-core On 2012-03-23 10:36, Martin Jansa wrote: > On Fri, Mar 23, 2012 at 10:28:55AM -0600, Gary Thomas wrote: >> On 2012-03-23 10:19, Gary Thomas wrote: >>> On 2012-03-23 09:48, Martin Jansa wrote: >>>> On Fri, Mar 23, 2012 at 04:35:53PM +0100, Martin Jansa wrote: >>>>> On Fri, Mar 23, 2012 at 09:27:08AM -0600, Gary Thomas wrote: >>>>>> If you install the top-level python package only on a minimal >>>>>> system which has no other python packages installed then python >>>>>> is not functional at all. Without any extra packages installed >>>>>> this error is seen: >>>>>> # python >>>>>> Traceback (most recent call last): >>>>>> File "/usr/lib/python2.7/site.py", line 64, in<module> >>>>>> import traceback >>>>>> ImportError: No module named traceback >>>>>> >>>>>> Installing python-lang only partly fixes the problem as this >>>>>> error still exists: >>>>>> # python >>>>>> Traceback (most recent call last): >>>>>> File "/usr/lib/python2.7/site.py", line 569, in<module> >>>>>> main() >>>>>> File "/usr/lib/python2.7/site.py", line 551, in main >>>>>> known_paths = addusersitepackages(known_paths) >>>>>> File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages >>>>>> user_site = getusersitepackages() >>>>>> File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages >>>>>> user_base = getuserbase() # this will also set USER_BASE >>>>>> File "/usr/lib/python2.7/site.py", line 243, in getuserbase >>>>>> USER_BASE = get_config_var('userbase') >>>>>> File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var >>>>>> return get_config_vars().get(name) >>>>>> File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars >>>>>> import re >>>>>> ImportError: No module named re >>>>>> >>>>>> Signed-off-by: Gary Thomas<gary@mlbassoc.com> >>>>>> --- >>>>>> meta/recipes-devtools/python/python_2.7.2.bb | 3 ++- >>>>>> 1 files changed, 2 insertions(+), 1 deletions(-) >>>>>> >>>>>> diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb >>>>>> index 8111b31..f1ba42d 100644 >>>>>> --- a/meta/recipes-devtools/python/python_2.7.2.bb >>>>>> +++ b/meta/recipes-devtools/python/python_2.7.2.bb >>>>>> @@ -1,6 +1,6 @@ >>>>>> require python.inc >>>>>> DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" >>>>>> -PR = "${INC_PR}.8" >>>>>> +PR = "${INC_PR}.9" >>>>>> >>>>>> DISTRO_SRC_URI ?= "file://sitecustomize.py" >>>>>> DISTRO_SRC_URI_linuxstdbase = "" >>>>>> @@ -123,6 +123,7 @@ py_package_preprocess () { >>>>>> require python-${PYTHON_MAJMIN}-manifest.inc >>>>> >>>>> This should be fixed probably in >>>>> scripts/contrib/python/generate-manifest-2.7.py >>>>> >>>>>> >>>>>> # manual dependency additions >>>>>> +RRDEPENDS_${PN} = "${PN}-lang ${PN}-re" >>>>> >>>>> And here is typo, how did you test this change? >>>> >>>> And also notice that there is no ${PN} in PACKAGES, so by "top-level >>>> python package" you mean python-core right? >>> >>> Yes. As far as my testing, it got muddled with something else and >>> what I've proposed doesn't help, sorry. I'm looking into how to fix >>> this via the generate-manifest script and will send a different patch >>> shortly [I hope]. >> >> Sadly, my attempt to fix this doesn't work. Here's what I tried, but >> it has no effect: > > have you executed updated script to actually regenerate manifest and > rebuild python with updated manifest? Ah, missed that step :-) > >> diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py >> index 85ca353..bde7db9 100755 >> --- a/scripts/contrib/python/generate-manifest-2.7.py >> +++ b/scripts/contrib/python/generate-manifest-2.7.py >> @@ -160,7 +160,7 @@ if __name__ == "__main__": >> # Parameters: revision, name, description, dependencies, filenames >> # >> >> - m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "", >> + m.addPackage( "${PN}-core", "Python Interpreter and core modules (needed!)", "${PN}-lang ${PN}-re", >> "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " + >> "genericpath.* getopt.* linecache.* new.* " + >> "os.* posixpath.* struct.* " + >> @@ -276,7 +276,7 @@ if __name__ == "__main__": >> m.addPackage( "${PN}-json", "Python JSON Support", "${PN}-core ${PN}-math ${PN}-re", >> "json lib-dynload/_json.so" ) # package >> >> - m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "${PN}-core", >> + m.addPackage( "${PN}-lang", "Python Low-Level Language Support", "", > > why? what if someone tries to install python-lang, how he get > python-core? > >> "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_funct >> "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " + >> "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* rep >> @@ -322,7 +322,7 @@ if __name__ == "__main__": >> m.addPackage( "${PN}-profile", "Python Basic Profiling Support", "${PN}-core ${PN}-textutils", >> "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" ) >> >> - m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core", >> + m.addPackage( "${PN}-re", "Python Regular Expression APIs", "", > > the same, why? what if someone tries to install python-re, how he get > python-core? I thought I was having trouble with circular dependencies. These still exist without those changes, but it's now working with ipk packaging. Here's what I see now on a virgin system which has no python packages at all: # opkg install python-core Installing python-core (2.7.2-r1.9) to root... Downloading http://192.168.1.116/poky-feeds-arm/armv7a-vfp-neon/python-core_2.7.2-r1.9_armv7a-vfp-neon.ipk. Installing python-re (2.7.2-r1.9) to root... Downloading http://192.168.1.116/poky-feeds-arm/armv7a-vfp-neon/python-re_2.7.2-r1.9_armv7a-vfp-neon.ipk. Installing python-core (2.7.2-r1.9) to root... Breaking cicular dependency on python-core for python-re. Installing libpython2.7-1.0 (2.7.2-r1.9) to root... Downloading http://192.168.1.116/poky-feeds-arm/armv7a-vfp-neon/libpython2.7-1.0_2.7.2-r1.9_armv7a-vfp-neon.ipk. Installing python-lang (2.7.2-r1.9) to root... Downloading http://192.168.1.116/poky-feeds-arm/armv7a-vfp-neon/python-lang_2.7.2-r1.9_armv7a-vfp-neon.ipk. Installing python-core (2.7.2-r1.9) to root... Breaking cicular dependency on python-core for python-re. Breaking cicular dependency on python-core for libpython2.7-1.0. Breaking cicular dependency on python-core for python-lang. Installing python-readline (2.7.2-r1.9) to root... Downloading http://192.168.1.116/poky-feeds-arm/armv7a-vfp-neon/python-readline_2.7.2-r1.9_armv7a-vfp-neon.ipk. Installing libreadline6 (6.2-r2) to root... Downloading http://192.168.1.116/poky-feeds-arm/armv7a-vfp-neon/libreadline6_6.2-r2_armv7a-vfp-neon.ipk. Configuring python-re. Configuring libpython2.7-1.0. Configuring python-lang. Configuring python-core. Configuring libreadline6. Configuring python-readline. and it now works with just this single install :-) > >> "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin >> >> m.addPackage( "${PN}-readline", "Python Readline Support", "${PN}-core", >> >>> >>> Query: if I change the script, should I also bum PR in this recipe? >>> >>> >> >> For now, I'll just have to install python-lang and python-re manually... Thanks for helping me through this. I'll send a patch for this later today. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-03-23 17:09 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-23 15:27 [PATCH 0/2] python: fix breakage in minimal installs Gary Thomas 2012-03-23 15:27 ` [PATCH 1/2] python: remove a target dependency Gary Thomas 2012-03-23 15:27 ` [PATCH 2/2] python: Fix minimal packaging dependencies Gary Thomas 2012-03-23 15:35 ` Martin Jansa 2012-03-23 15:48 ` Martin Jansa 2012-03-23 16:19 ` Gary Thomas 2012-03-23 16:28 ` Gary Thomas 2012-03-23 16:36 ` Martin Jansa 2012-03-23 17:00 ` Gary Thomas
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox