All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc
@ 2016-08-26 15:30 Ricardo Ribalda Delgado
  2016-08-26 18:14 ` Fabio Berton
  2016-08-29 16:56 ` Alejandro Hernandez
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-08-26 15:30 UTC (permalink / raw)
  To: openembedded-core, ross.burton

Fixes:

root@qt5022:~# python3
Python 3.5.1 (default, Aug  5 2016, 13:25:54)
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/collections/__init__.py", line 10, in <module>
    from operator import itemgetter as _itemgetter, eq as _eq
ImportError: No module named 'operator'
>>>

root@qt5022:~# dpkg -S /usr/lib/python3.5/collections/__init__.py
python3-core: /usr/lib/python3.5/collections/__init__.py

Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---

v2: also hack the generate file
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 304611432e37..fb05d6d36df3 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -38,7 +38,7 @@ RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-thread
 FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so "
 
 SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
+RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math ${PN}-misc"
 FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
 
 SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
index 2906cc66d042..1cac9a7fe1c6 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -166,7 +166,7 @@ if __name__ == "__main__":
     # Parameters: revision, name, description, dependencies, filenames
     #
 
-    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
+    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math ${PN}-misc",
     "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " +
     "genericpath.* getopt.* linecache.* new.* " +
     "os.* posixpath.* struct.* " +
-- 
2.9.3



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

* Re: [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc
  2016-08-26 15:30 [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc Ricardo Ribalda Delgado
@ 2016-08-26 18:14 ` Fabio Berton
  2016-08-30 13:37   ` Ricardo Ribalda Delgado
  2016-08-29 16:56 ` Alejandro Hernandez
  1 sibling, 1 reply; 5+ messages in thread
From: Fabio Berton @ 2016-08-26 18:14 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: Patches and discussions about the oe-core layer

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

Hi Ricardo,

Are you using krogoth branch? If yes, look here:
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python-3.5-manifest.inc?h=krogoth#n122

It's missing ${libdir}/python3.5/operator.*

You don't need to add misc package to core.

Fabio.

On Fri, Aug 26, 2016 at 12:30 PM, Ricardo Ribalda Delgado <
ricardo.ribalda@gmail.com> wrote:

> Fixes:
>
> root@qt5022:~# python3
> Python 3.5.1 (default, Aug  5 2016, 13:25:54)
> [GCC 5.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import collections
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python3.5/collections/__init__.py", line 10, in <module>
>     from operator import itemgetter as _itemgetter, eq as _eq
> ImportError: No module named 'operator'
> >>>
>
> root@qt5022:~# dpkg -S /usr/lib/python3.5/collections/__init__.py
> python3-core: /usr/lib/python3.5/collections/__init__.py
>
> Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>
> v2: also hack the generate file
>  meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
>  scripts/contrib/python/generate-manifest-3.5.py      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc
> b/meta/recipes-devtools/python/python-3.5-manifest.inc
> index 304611432e37..fb05d6d36df3 100644
> --- a/meta/recipes-devtools/python/python-3.5-manifest.inc
> +++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
> @@ -38,7 +38,7 @@ RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs
> ${PN}-importlib ${PN}-thread
>  FILES_${PN}-compression="${libdir}/python3.5/gzip.*
> ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.*
> ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so
> "
>
>  SUMMARY_${PN}-core="Python interpreter and core modules"
> -RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs
> ${PN}-io ${PN}-math"
> +RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs
> ${PN}-io ${PN}-math ${PN}-misc"
>  FILES_${PN}-core="${libdir}/python3.5/__future__.*
> ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.*
> ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.*
> ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.*
> ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.*
> ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.*
> ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.*
> ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.*
> ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.*
> ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.*
> ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so
> ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so
> ${libdir}/python3.5/lib-dynload/xreadlines.*.so
> ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.*
> ${bindir}/python* ${libdir}/python3.5/_weakrefset.*
> ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.*
> ${libdir}/python
>  3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h
> ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.*
> ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py
> "
>
>  SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
> diff --git a/scripts/contrib/python/generate-manifest-3.5.py
> b/scripts/contrib/python/generate-manifest-3.5.py
> index 2906cc66d042..1cac9a7fe1c6 100755
> --- a/scripts/contrib/python/generate-manifest-3.5.py
> +++ b/scripts/contrib/python/generate-manifest-3.5.py
> @@ -166,7 +166,7 @@ if __name__ == "__main__":
>      # Parameters: revision, name, description, dependencies, filenames
>      #
>
> -    m.addPackage( "${PN}-core", "Python interpreter and core modules",
> "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
> +    m.addPackage( "${PN}-core", "Python interpreter and core modules",
> "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math
> ${PN}-misc",
>      "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* "
> +
>      "genericpath.* getopt.* linecache.* new.* " +
>      "os.* posixpath.* struct.* " +
> --
> 2.9.3
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

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

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

* Re: [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc
  2016-08-26 15:30 [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc Ricardo Ribalda Delgado
  2016-08-26 18:14 ` Fabio Berton
@ 2016-08-29 16:56 ` Alejandro Hernandez
  1 sibling, 0 replies; 5+ messages in thread
From: Alejandro Hernandez @ 2016-08-29 16:56 UTC (permalink / raw)
  To: openembedded-core, ricardo.ribalda

Hello Ricardo,

On 08/26/2016 10:30 AM, Ricardo Ribalda Delgado wrote:
> Fixes:
>
> root@qt5022:~# python3
> Python 3.5.1 (default, Aug  5 2016, 13:25:54)
> [GCC 5.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import collections
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File "/usr/lib/python3.5/collections/__init__.py", line 10, in <module>
>      from operator import itemgetter as _itemgetter, eq as _eq
> ImportError: No module named 'operator'
> root@qt5022:~# dpkg -S /usr/lib/python3.5/collections/__init__.py
> python3-core: /usr/lib/python3.5/collections/__init__.py
>
> Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>
> v2: also hack the generate file
>   meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
>   scripts/contrib/python/generate-manifest-3.5.py      | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
> index 304611432e37..fb05d6d36df3 100644
> --- a/meta/recipes-devtools/python/python-3.5-manifest.inc
> +++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
> @@ -38,7 +38,7 @@ RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-thread
>   FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so "
>   
>   SUMMARY_${PN}-core="Python interpreter and core modules"
> -RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
> +RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math ${PN}-misc"
It seems that you are trying to include the python3-misc package on the 
python3-core package, and while this in fact would fix the issue you are 
having, it goes against the the very reason we create several python 
packages, specifically the python3-core and python3-misc packages.

We create the python3-core package to include the very minimal (core) 
modules needed to run python3 (since we may need to save up space on our 
embedded system).

And we create lots of other packages to simulate granularity amongst the 
build system, so whoever wants to use a certain python package would 
just need to include that specific module on the system, again, to save 
up space on the embedded device

And the python3-misc package contains everything else.

So it doesn't make any sense to include everything on the python3-core 
package.

>   FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python
>   3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
>   
>   SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
> diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
> index 2906cc66d042..1cac9a7fe1c6 100755
> --- a/scripts/contrib/python/generate-manifest-3.5.py
> +++ b/scripts/contrib/python/generate-manifest-3.5.py
> @@ -166,7 +166,7 @@ if __name__ == "__main__":
>       # Parameters: revision, name, description, dependencies, filenames
>       #
>   
> -    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
> +    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math ${PN}-misc",
>       "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " +
>       "genericpath.* getopt.* linecache.* new.* " +
>       "os.* posixpath.* struct.* " +


So in this case, I believe that a patch is not needed, and what you need 
to do is search for the module you are looking for (operator) within the 
manifest file, and include it on your system.

by doing a quick search I believe that perhaps doing a

IMAGE_INSTALL += "python3-lang"

on your local.conf would fix the issue.



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

* Re: [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc
  2016-08-26 18:14 ` Fabio Berton
@ 2016-08-30 13:37   ` Ricardo Ribalda Delgado
  2016-09-09 17:58     ` Fabio Berton
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-08-30 13:37 UTC (permalink / raw)
  To: Fabio Berton; +Cc: Patches and discussions about the oe-core layer

Hi Fabio

Thanks for your the reply. Yes I was using krogoth. There is no need
for my patch in master.

Thanks for your help!


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

* Re: [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc
  2016-08-30 13:37   ` Ricardo Ribalda Delgado
@ 2016-09-09 17:58     ` Fabio Berton
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Berton @ 2016-09-09 17:58 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: Patches and discussions about the oe-core layer

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

Hi Ricardo,

Take a look at commit:
http://cgit.openembedded.org/openembedded-core/commit/?h=krogoth&id=8bbfe9bd229e3f795577eb5df1cd5104651e2ba2

this commit fix your issue.

Regards

On Tue, Aug 30, 2016 at 10:37 AM, Ricardo Ribalda Delgado <
ricardo.ribalda@gmail.com> wrote:

> Hi Fabio
>
> Thanks for your the reply. Yes I was using krogoth. There is no need
> for my patch in master.
>
> Thanks for your help!
>

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

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

end of thread, other threads:[~2016-09-09 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 15:30 [PATCH v2] python-3.5-manifest.inc: the core module RDEPENDS on misc Ricardo Ribalda Delgado
2016-08-26 18:14 ` Fabio Berton
2016-08-30 13:37   ` Ricardo Ribalda Delgado
2016-09-09 17:58     ` Fabio Berton
2016-08-29 16:56 ` Alejandro Hernandez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.