Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8
@ 2019-10-24  7:53 Khem Raj
  2019-10-24  7:53 ` [meta-oe][PATCH 2/6] libftdi: Add target deps for python bindings Khem Raj
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Khem Raj @ 2019-10-24  7:53 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/{python3-astor_0.7.1.bb => python3-astor_0.8.bb}     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-astor_0.7.1.bb => python3-astor_0.8.bb} (87%)

diff --git a/meta-python/recipes-devtools/python/python3-astor_0.7.1.bb b/meta-python/recipes-devtools/python/python3-astor_0.8.bb
similarity index 87%
rename from meta-python/recipes-devtools/python/python3-astor_0.7.1.bb
rename to meta-python/recipes-devtools/python/python3-astor_0.8.bb
index c2dc9245c2..efd56c1b06 100644
--- a/meta-python/recipes-devtools/python/python3-astor_0.7.1.bb
+++ b/meta-python/recipes-devtools/python/python3-astor_0.8.bb
@@ -5,7 +5,7 @@ LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=561205fdabc3ec52cae2d30815b8ade7"
 
 SRC_URI = "git://github.com/berkerpeksag/astor.git"
-SRCREV ?= "4ca3a26e52f08678854c2841cd0fdf223461e47d"
+SRCREV ?= "3a7607e31f0c17e747ded5cfe0b582d99f7caecf"
 
 inherit setuptools3
 
-- 
2.23.0



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

* [meta-oe][PATCH 2/6] libftdi: Add target deps for python bindings
  2019-10-24  7:53 [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8 Khem Raj
@ 2019-10-24  7:53 ` Khem Raj
  2019-10-24  7:53 ` [meta-python][PATCH 3/6] python3-astor: Fix build with setuptools>=41.4 Khem Raj
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2019-10-24  7:53 UTC (permalink / raw)
  To: openembedded-devel

helps linking with right libraries for python bindings

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-support/libftdi/libftdi_1.4.bb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-support/libftdi/libftdi_1.4.bb b/meta-oe/recipes-support/libftdi/libftdi_1.4.bb
index 4fc6eb0907..c33c791110 100644
--- a/meta-oe/recipes-support/libftdi/libftdi_1.4.bb
+++ b/meta-oe/recipes-support/libftdi/libftdi_1.4.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM= "\
     file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
 "
 
-DEPENDS = "libusb1"
+DEPENDS = "libusb1 python3"
 
 SRC_URI = "http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2"
 SRC_URI[md5sum] = "0c09fb2bb19a57c839fa6845c6c780a2"
@@ -17,11 +17,17 @@ SRC_URI[sha256sum] = "ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681c
 
 S = "${WORKDIR}/${BPN}1-${PV}"
 
-inherit cmake binconfig pkgconfig
+inherit cmake binconfig pkgconfig python3native
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[cpp-wrapper] = "-DFTDI_BUILD_CPP=on -DFTDIPP=on,-DFTDI_BUILD_CPP=off -DFTDIPP=off,boost"
 
-EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}"
+EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
+                 -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \
+                 -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES += "${PN}-python"
+
+FILES_${PN}-python = "${libdir}/${PYTHON_DIR}/site-packages/"
-- 
2.23.0



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

* [meta-python][PATCH 3/6] python3-astor: Fix build with setuptools>=41.4
  2019-10-24  7:53 [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8 Khem Raj
  2019-10-24  7:53 ` [meta-oe][PATCH 2/6] libftdi: Add target deps for python bindings Khem Raj
@ 2019-10-24  7:53 ` Khem Raj
  2019-10-24  7:53 ` [meta-oe][PATCH 4/6] libiio: Inherit distutils-base for packaging python files Khem Raj
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2019-10-24  7:53 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...f3ff7ad8818475b6e107e63aa9a54252d2a9.patch | 87 +++++++++++++++++++
 .../python/python3-astor_0.8.bb               |  4 +-
 2 files changed, 90 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch

diff --git a/meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch b/meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch
new file mode 100644
index 0000000000..823699339e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-astor/f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch
@@ -0,0 +1,87 @@
+From f820f3ff7ad8818475b6e107e63aa9a54252d2a9 Mon Sep 17 00:00:00 2001
+From: Jonathan Ringer <jonringer117@gmail.com>
+Date: Thu, 17 Oct 2019 16:54:16 -0700
+Subject: [PATCH] Fix packaging for setuptools>=41.4
+
+---
+ astor/VERSION     |  1 +
+ astor/__init__.py |  5 ++++-
+ setup.cfg         |  3 ++-
+ setup.py          | 16 +---------------
+ 4 files changed, 8 insertions(+), 17 deletions(-)
+ create mode 100644 astor/VERSION
+
+diff --git a/astor/VERSION b/astor/VERSION
+new file mode 100644
+index 0000000..a3df0a6
+--- /dev/null
++++ b/astor/VERSION
+@@ -0,0 +1 @@
++0.8.0
+diff --git a/astor/__init__.py b/astor/__init__.py
+index 3b02983..8dfcdb1 100644
+--- a/astor/__init__.py
++++ b/astor/__init__.py
+@@ -9,6 +9,7 @@
+ 
+ """
+ 
++import os
+ import warnings
+ 
+ from .code_gen import SourceGenerator, to_source  # NOQA
+@@ -19,7 +20,9 @@
+ from .op_util import symbol_data  # NOQA
+ from .tree_walk import TreeWalk  # NOQA
+ 
+-__version__ = '0.8.0'
++ROOT = os.path.dirname(__file__)
++with open(os.path.join(ROOT, 'VERSION')) as version_file:
++    __version__ = version_file.read().strip
+ 
+ parse_file = code_to_ast.parse_file
+ 
+diff --git a/setup.cfg b/setup.cfg
+index 1baf6fc..a43634f 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -2,6 +2,7 @@
+ name = astor
+ description = Read/rewrite/write Python ASTs
+ long_description = file:README.rst
++version = file: astor/VERSION
+ author = Patrick Maupin
+ author_email = pmaupin@gmail.com
+ platforms = Independent
+@@ -40,7 +41,7 @@ test_suite = nose.collector
+ [options.packages.find]
+ exclude = tests
+ 
+-[wheel]
++[bdist_wheel]
+ universal = 1
+ 
+ [build-system]
+diff --git a/setup.py b/setup.py
+index 4a111b5..6068493 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,17 +1,3 @@
+-import os
+-import sys
+-
+ from setuptools import setup
+-from setuptools.config import read_configuration
+-
+-from setuputils import find_version
+-
+-
+-def here(*paths):
+-    return os.path.join(os.path.dirname(__file__), *paths)
+-
+-config = read_configuration(here('setup.cfg'))
+-config['metadata']['version'] = find_version(here('astor', '__init__.py'))
+-config['options'].update(config['metadata'])
+ 
+-setup(**config['options'])
++setup()
diff --git a/meta-python/recipes-devtools/python/python3-astor_0.8.bb b/meta-python/recipes-devtools/python/python3-astor_0.8.bb
index efd56c1b06..17cc540f00 100644
--- a/meta-python/recipes-devtools/python/python3-astor_0.8.bb
+++ b/meta-python/recipes-devtools/python/python3-astor_0.8.bb
@@ -4,7 +4,9 @@ SECTION = "devel/python"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=561205fdabc3ec52cae2d30815b8ade7"
 
-SRC_URI = "git://github.com/berkerpeksag/astor.git"
+SRC_URI = "git://github.com/berkerpeksag/astor.git \
+           file://f820f3ff7ad8818475b6e107e63aa9a54252d2a9.patch \
+          "
 SRCREV ?= "3a7607e31f0c17e747ded5cfe0b582d99f7caecf"
 
 inherit setuptools3
-- 
2.23.0



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

* [meta-oe][PATCH 4/6] libiio: Inherit distutils-base for packaging python files
  2019-10-24  7:53 [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8 Khem Raj
  2019-10-24  7:53 ` [meta-oe][PATCH 2/6] libftdi: Add target deps for python bindings Khem Raj
  2019-10-24  7:53 ` [meta-python][PATCH 3/6] python3-astor: Fix build with setuptools>=41.4 Khem Raj
@ 2019-10-24  7:53 ` Khem Raj
  2019-10-24 14:15   ` Adrian Bunk
  2019-10-24  7:53 ` [meta-oe][PATCH 5/6] mraa: Define PYTHON_LIBRARY and PYTHON_INCLUDE_DIR Khem Raj
  2019-10-24  7:53 ` [meta-oe][PATCH 6/6] upm: Define PYTHON_INCLUDE_DIR and PYTHON_LIBRARY for cmake Khem Raj
  4 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2019-10-24  7:53 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-support/libiio/libiio_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
index 4e57d5b77b..489cb1a9e0 100644
--- a/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
-inherit cmake python3native systemd
+inherit cmake python3native systemd distutils-base
 
 DEPENDS = " \
     flex-native bison-native libaio \
-- 
2.23.0



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

* [meta-oe][PATCH 5/6] mraa: Define PYTHON_LIBRARY and PYTHON_INCLUDE_DIR
  2019-10-24  7:53 [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8 Khem Raj
                   ` (2 preceding siblings ...)
  2019-10-24  7:53 ` [meta-oe][PATCH 4/6] libiio: Inherit distutils-base for packaging python files Khem Raj
@ 2019-10-24  7:53 ` Khem Raj
  2019-10-24  7:53 ` [meta-oe][PATCH 6/6] upm: Define PYTHON_INCLUDE_DIR and PYTHON_LIBRARY for cmake Khem Raj
  4 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2019-10-24  7:53 UTC (permalink / raw)
  To: openembedded-devel

Otherwise it starts to look into native sysroot which we really do not
want

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-extended/mraa/mraa_git.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-oe/recipes-extended/mraa/mraa_git.bb b/meta-oe/recipes-extended/mraa/mraa_git.bb
index 17ca262734..6d42c67719 100644
--- a/meta-oe/recipes-extended/mraa/mraa_git.bb
+++ b/meta-oe/recipes-extended/mraa/mraa_git.bb
@@ -22,6 +22,8 @@ DEPENDS += "json-c"
 
 EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON \
                          -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages \
+                         -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \
+                         -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \
                        "
 
 # Prepend mraa-utils to make sure bindir ends up in there
-- 
2.23.0



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

* [meta-oe][PATCH 6/6] upm: Define PYTHON_INCLUDE_DIR and PYTHON_LIBRARY for cmake
  2019-10-24  7:53 [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8 Khem Raj
                   ` (3 preceding siblings ...)
  2019-10-24  7:53 ` [meta-oe][PATCH 5/6] mraa: Define PYTHON_LIBRARY and PYTHON_INCLUDE_DIR Khem Raj
@ 2019-10-24  7:53 ` Khem Raj
  4 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2019-10-24  7:53 UTC (permalink / raw)
  To: openembedded-devel

Otherwise it peeks into native sysroot now and starts using native
python which is undesirable, this is happening after the oe-core change

https://git.openembedded.org/openembedded-core/commit/?id=7847f431cd8db59fce8c9401a603c4b0678ee16d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-extended/upm/upm_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/upm/upm_git.bb b/meta-oe/recipes-extended/upm/upm_git.bb
index a6b379ec36..fb22e83359 100644
--- a/meta-oe/recipes-extended/upm/upm_git.bb
+++ b/meta-oe/recipes-extended/upm/upm_git.bb
@@ -36,7 +36,7 @@ BINDINGS_armv5 ??= "python"
 PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
  ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
 
-PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
+PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
 PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
 
 FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
-- 
2.23.0



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

* Re: [meta-oe][PATCH 4/6] libiio: Inherit distutils-base for packaging python files
  2019-10-24  7:53 ` [meta-oe][PATCH 4/6] libiio: Inherit distutils-base for packaging python files Khem Raj
@ 2019-10-24 14:15   ` Adrian Bunk
  0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2019-10-24 14:15 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

On Thu, Oct 24, 2019 at 12:53:53AM -0700, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-oe/recipes-support/libiio/libiio_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
> index 4e57d5b77b..489cb1a9e0 100644
> --- a/meta-oe/recipes-support/libiio/libiio_git.bb
> +++ b/meta-oe/recipes-support/libiio/libiio_git.bb
> @@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
>  
>  S = "${WORKDIR}/git"
>  
> -inherit cmake python3native systemd
> +inherit cmake python3native systemd distutils-base
>...

This pulls in pythonnative, which ends up "fixing" the issue
by installing the python-native Python2 binary that gets used
instead of the Python3 binary from python3-native.

Installing the python module fails silently during install,
with libiio-python ending up empty.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

end of thread, other threads:[~2019-10-24 14:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-24  7:53 [meta-python][PATCH 1/6] python3-astor: Upgrade to 0.8 Khem Raj
2019-10-24  7:53 ` [meta-oe][PATCH 2/6] libftdi: Add target deps for python bindings Khem Raj
2019-10-24  7:53 ` [meta-python][PATCH 3/6] python3-astor: Fix build with setuptools>=41.4 Khem Raj
2019-10-24  7:53 ` [meta-oe][PATCH 4/6] libiio: Inherit distutils-base for packaging python files Khem Raj
2019-10-24 14:15   ` Adrian Bunk
2019-10-24  7:53 ` [meta-oe][PATCH 5/6] mraa: Define PYTHON_LIBRARY and PYTHON_INCLUDE_DIR Khem Raj
2019-10-24  7:53 ` [meta-oe][PATCH 6/6] upm: Define PYTHON_INCLUDE_DIR and PYTHON_LIBRARY for cmake Khem Raj

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