From patchwork Tue Apr 7 11:15:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1072 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3D31F3F379 for ; Tue, 7 Apr 2020 13:15:44 +0200 (CEST) Received: by mail-il1-f197.google.com with SMTP id t10sf2784921ilf.2 for ; Tue, 07 Apr 2020 04:15:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586258143; cv=pass; d=google.com; s=arc-20160816; b=VPTyosLMROKE8+A80nFeSvhZ5syIrYKknOMGxTcLZwLVtanIGQt8HsEnDX6jMORC2+ IDQdMllI0sDSUmH+ch7tOwi1bAiYAmWpdAZnPm6FFjhCOrqhR6rzAp8mZQHCG8L8V/le HVG+7eHYnJ9s4l0e62PgstRTaI8mLx6UfCoXB2wcCFel9FiZpMpY3ewGwMdPepDcN4Uy qBlBbAOyIhELnJ8PE+0ACM7P/z1ATfk+6La3Io/9LDaO3UIcZ/cj/rIIe/lzSHgVQoy1 cxhWTfzY6Kt+kYqIw5GH1XMbGOKy7T9Arsfqec23dO7ma99gUhxxhKMx8bFyRilNf4Ky U9qA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=JOS7foj68HNiR90bWsC2m0RGgqCm08PClq1SwT9aSI4=; b=nEWIzhgdYTXoSnKFGx9GBkez+2Kb0k/mcZjK/gxYFdS0aVN8ZGELDyxPkcL34OHhxU m+20SOJ/Df7sECmie2ySVOW/vIqCUNwleoNI2YEnYWlv33mvET+L8JYfoF4l4MTLdvXZ xXlNq1opb4xHiDdWFgqLWPAzmL5zYi6XPafgr0wLOWURH1Ohr1/PJXALnPe96uY5k/5e 1fbnSBfp+cW1Xvd1HwqsRo3PXA50e2QqDUZ+MR2p7+42t578NyCKQ0FtdYypNGeHvdUp +zMJ7lw6eqSiFxNzPv3DeoWNx1ZH/LI+665uLu5eH8AKiU7ywzqT0UDm1ETVRkyVOLrg 4ZhA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=C2hAeUc1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JOS7foj68HNiR90bWsC2m0RGgqCm08PClq1SwT9aSI4=; b=J/nQj0tgLCJTMsKF2W7eOwXbUpX1rV1C5jG8H9OE5SrgZFIqdDEXKiRmT0M6srPymg kWmpdebdnR4fb8YH+aW3KcsaAtf6vPan+DlZhns6ThbXdG9xbOWMHPYhSuhEN5fvzm7l Vugo1ygRKkTISXzfAe1YJ0V28rT1bMWUAJK3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=JOS7foj68HNiR90bWsC2m0RGgqCm08PClq1SwT9aSI4=; b=BMLwKAWbeaXT7pQ6ViPKmrRLPtq4EuUNEF4bY0aChI3Rx+W5avrP8LoIpp5CtPs8h8 7AADY1HpY8NZfPfhnyQcL4jEYdstgVMQ6sx0fZICQCHO/jLCAs5ENC/wv+vhHy9qqABi DRUAu9gyU9hu+uUUGWIiDIDA5uw03eA8Vw9yY21v6Bv6tk00iQRL0vg/Cxpy/q2DoAcg 0HZdaowfu8wSs/ZTZnytfPFgRoafXdaomPsj9HNhE3J+tI9fCLkIHUBVO/Xf3gb1Wf95 0vTqz40MokIjUmaYE6a85L8aMo+8xJWMQ6p5XXH5lQdTP4UnjMrykTg16TlJFwzS5MRW lhyQ== X-Gm-Message-State: AGi0PuaeistRglyY5x6WIiGiA31EynEETJ2BfcjeBeQLUWTk9nmVxBoi aD+h6NwipgmuPAtnGZtQch+p95G3 X-Google-Smtp-Source: APiQypInBKHsQT1BO/894Q5uSDrW7sN1k0cChA/E0u4W57u2C1Ei6uowCVsj9WSm8eEC5iOvMtU20Q== X-Received: by 2002:a05:6e02:10d0:: with SMTP id s16mr1865405ilj.30.1586258143296; Tue, 07 Apr 2020 04:15:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6638:229:: with SMTP id f9ls692050jaq.10.gmail; Tue, 07 Apr 2020 04:15:43 -0700 (PDT) X-Received: by 2002:a02:69d4:: with SMTP id e203mr1412535jac.12.1586258142738; Tue, 07 Apr 2020 04:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586258142; cv=none; d=google.com; s=arc-20160816; b=nkYnS3ZEYhX20WdcC31MV/Pfq1da9Qz/EyFvi7MpNDlkOBRksOrz6oM4uvXkbs8uTY OSb88F22h3yium8IXRsN+0Wt+ESrkYtLEs+wJBBnDskhjfrlgmRREt9JMYWzXEVjOlWf l9KFpFHVe54v6nDWQurLPQlzunD3ftamsZn3mTs6mYfmCq2NaQM5oqoeePz9jSoaqIZk uH/exy6NmyZK2Tu+spbAfVy15XXZpDzclP7JSHY5s8uANinjjjqTBgddMLGYv2grzX6Q D7L+fUfLDn0glYJgejPcIp33WV6YAgSrNyUyfvuY5haRASZc9Q2yx+KIAjmRB4N3gdoS xsTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xWqwo4NFm1G/c2A2cbd8Gmeg5ghG1JUGeOkcfmOAgi8=; b=HtfRsaHxFLv+WnPMueqMAR+THZ9noye3LEbt1V80walc4/KtIpDJXg77KDdDodEfpd uxRbi1Vbezv3FbO+pC9itBgvfde2e2I9GPOmSv6/ktTb2bCIlYeg9eiztodavQvwYZ3l Ub+xdYsaUnuOAS+VoNxJmfAHTYM6CBQlVQTlUFobcqd0xLTPHSP+22oH1Qb2TzynL8uT WHoRq7/ERZz+duVqcjCb4K3qfByGvFljCHzfE2JrOmMvUEqu8/uNF4r0OjiHPULc77lI Ak5s8ovqF7ONhVHkp3wdbG+hQN2KvpWq1QkEC7gcCdHXSVQ+CbECJV3y9Ypyi8eKqiQX F13w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=C2hAeUc1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q73sor2884642ilb.146.2020.04.07.04.15.42 for (Google Transport Security); Tue, 07 Apr 2020 04:15:42 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:5989:: with SMTP id p9mr1989564pli.279.1586258142317; Tue, 07 Apr 2020 04:15:42 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:79b0:3a91:34a5:abd7]) by smtp.gmail.com with ESMTPSA id e187sm13788802pfe.50.2020.04.07.04.15.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 04:15:41 -0700 (PDT) From: Jagan Teki To: buildroot@buildroot.org Cc: "Yann E . MORIN" , Angelo Compagnucci , Suniel Mahesh , Esben Haabendal , Yegor Yefremov , linux-amarula@amarulasolutions.com, Jagan Teki , Samuel Martin , Gwenhael Goavec-Merou Subject: [PATCH v8 1/5] package/python-numpy: Bump to version 1.18.2 Date: Tue, 7 Apr 2020 16:45:11 +0530 Message-Id: <20200407111515.21131-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407111515.21131-1-jagan@amarulasolutions.com> References: <20200407111515.21131-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=C2hAeUc1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Bump the python-numpy version to 1.18.2, this version of python-numpy will support python3 only, not python2. Drop python2 dependency from opencv3, gnuadio packages since the python support on these are selecting python-numpy. Cc: Samuel Martin Cc: Gwenhael Goavec-Merou Cc: Esben Haabendal Signed-off-by: Jagan Teki --- Changes for v8: - none Changes for v7: - bump 1.181.2 numpy - drop 'BR2_PACKAGE_HOST_PYTHON_CYTHON' selection from numpy - drop python2 dependency from gnuradio.mk - drop python2 dependency from opencv3.mk - update the commit message package/gnuradio/Config.in | 2 +- package/gnuradio/gnuradio.mk | 4 ++-- package/opencv3/Config.in | 2 +- package/opencv3/opencv3.mk | 14 -------------- package/python-numpy/Config.in | 1 + package/python-numpy/python-numpy.hash | 14 +++++++------- package/python-numpy/python-numpy.mk | 4 +++- 7 files changed, 15 insertions(+), 26 deletions(-) diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in index 6d438bcd6f..bf69ed605b 100644 --- a/package/gnuradio/Config.in +++ b/package/gnuradio/Config.in @@ -63,7 +63,7 @@ config BR2_PACKAGE_GNURADIO_FEC config BR2_PACKAGE_GNURADIO_PYTHON bool "python support" - depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_PYTHON3 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy select BR2_PACKAGE_BOOST_PYTHON diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk index 41d4619f72..ab5b79e3e5 100644 --- a/package/gnuradio/gnuradio.mk +++ b/package/gnuradio/gnuradio.mk @@ -13,7 +13,7 @@ GNURADIO_SUPPORTS_IN_SOURCE_BUILD = NO # host-python-mako and host-python-six are needed for volk to compile GNURADIO_DEPENDENCIES = \ - $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) \ + host-python3 \ host-python-mako \ host-python-six \ host-swig \ @@ -108,7 +108,7 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF endif ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) -GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),python3,python) +GNURADIO_DEPENDENCIES += python3 GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON else GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in index d4b17b6acf..18c390c515 100644 --- a/package/opencv3/Config.in +++ b/package/opencv3/Config.in @@ -156,7 +156,7 @@ config BR2_PACKAGE_OPENCV3_LIB_PHOTO config BR2_PACKAGE_OPENCV3_LIB_PYTHON bool "python" - depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_PYTHON3 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy select BR2_PACKAGE_PYTHON_NUMPY diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk index 8a8257b387..fe41f6f382 100644 --- a/package/opencv3/opencv3.mk +++ b/package/opencv3/opencv3.mk @@ -312,19 +312,6 @@ OPENCV3_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF endif ifeq ($(BR2_PACKAGE_OPENCV3_LIB_PYTHON),y) -ifeq ($(BR2_PACKAGE_PYTHON),y) -OPENCV3_CONF_OPTS += \ - -DBUILD_opencv_python2=ON \ - -DBUILD_opencv_python3=OFF \ - -DPYTHON2_EXECUTABLE=$(HOST_DIR)/bin/python2 \ - -DPYTHON2_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \ - -DPYTHON2_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so \ - -DPYTHON2_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \ - -DPYTHON2_PACKAGES_PATH=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ - -DPYTHON2_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION) -OPENCV3_DEPENDENCIES += python -OPENCV3_KEEP_PY_FILES += usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/cv2/config*.py -else OPENCV3_CONF_OPTS += \ -DBUILD_opencv_python2=OFF \ -DBUILD_opencv_python3=ON \ @@ -336,7 +323,6 @@ OPENCV3_CONF_OPTS += \ -DPYTHON3_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION) OPENCV3_DEPENDENCIES += python3 OPENCV3_KEEP_PY_FILES += usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/cv2/config*.py -endif OPENCV3_CONF_ENV += $(PKG_PYTHON_DISTUTILS_ENV) OPENCV3_DEPENDENCIES += python-numpy else diff --git a/package/python-numpy/Config.in b/package/python-numpy/Config.in index 5b9ee5803b..507d52c4d8 100644 --- a/package/python-numpy/Config.in +++ b/package/python-numpy/Config.in @@ -15,6 +15,7 @@ config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS config BR2_PACKAGE_PYTHON_NUMPY bool "python-numpy" + depends on BR2_PACKAGE_PYTHON3 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # python-numpy needs fenv.h which is not provided by uclibc depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/python-numpy/python-numpy.hash b/package/python-numpy/python-numpy.hash index eb4123e3f6..ff9d02643c 100644 --- a/package/python-numpy/python-numpy.hash +++ b/package/python-numpy/python-numpy.hash @@ -1,9 +1,9 @@ -# Copied from https://github.com/numpy/numpy/releases/tag/v1.16.4 -sha256 a3bccb70ad94091a5b9e2469fabd41ac877c140a6828c2022e35560a2ec0346c numpy-1.16.4.tar.gz +# Copied from https://github.com/numpy/numpy/releases/tag/v1.18.1 +sha256 da204ce460aa4247e595b7c7189d2fb2ed5f796bc03197055de01dac61d0125e numpy-1.18.2.tar.gz # License files, locally calculated -sha256 6b5086f61fe0c71564a79304ecbaa60f11fa3f3debf82f73d16a611cab102adc LICENSE.txt -sha256 426a5a484480f57a295db48c2c04f47bb3274752dd82a7fd6541dfa2cb90f641 doc/sphinxext/LICENSE.txt +sha256 ad81d0c21843ba6ce6fe5fa3eaacb61120be70cd798c52f63df3f4c12a843f0c LICENSE.txt +sha256 d3045980e80a6b39f98586c24bc7f39a7625b4b9f08ce72e367d12814743d047 numpy/core/src/multiarray/dragon4.c +sha256 426a5a484480f57a295db48c2c04f47bb3274752dd82a7fd6541dfa2cb90f641 doc/sphinxext/LICENSE.txt sha256 154a8706fa0fdeff1073bf6239c4ecf51f562ab107066eef839dade1a45c824c doc/scipy-sphinx-theme/LICENSE.txt -sha256 a14cc25e10d40a3aa705b7de2fb764a6535d8ee9b2db4e1724900585457dfd55 numpy/linalg/lapack_lite/LICENSE.txt -sha256 badf51c7e3e7de9c7630bd069780f5c197b846ef7660b342a1e58d5553592d8e tools/npy_tempita/license.txt -sha256 d37526b4a34c0aa859afe6f9b7e64ca7c306b7430df8113dd5ac6fcb246bd2d4 numpy/core/src/multiarray/dragon4.c +sha256 a14cc25e10d40a3aa705b7de2fb764a6535d8ee9b2db4e1724900585457dfd55 numpy/linalg/lapack_lite/LICENSE.txt +sha256 badf51c7e3e7de9c7630bd069780f5c197b846ef7660b342a1e58d5553592d8e tools/npy_tempita/license.txt diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk index 3b474efa6e..3f0df7a640 100644 --- a/package/python-numpy/python-numpy.mk +++ b/package/python-numpy/python-numpy.mk @@ -4,7 +4,7 @@ # ################################################################################ -PYTHON_NUMPY_VERSION = 1.16.4 +PYTHON_NUMPY_VERSION = 1.18.2 PYTHON_NUMPY_SOURCE = numpy-$(PYTHON_NUMPY_VERSION).tar.gz PYTHON_NUMPY_SITE = https://github.com/numpy/numpy/releases/download/v$(PYTHON_NUMPY_VERSION) PYTHON_NUMPY_LICENSE = BSD-3-Clause, BSD-2-Clause, PSF, Apache-2.0, MIT, Zlib @@ -14,6 +14,8 @@ PYTHON_NUMPY_LICENSE_FILES = LICENSE.txt doc/sphinxext/LICENSE.txt \ tools/npy_tempita/license.txt \ numpy/core/src/multiarray/dragon4.c PYTHON_NUMPY_SETUP_TYPE = setuptools +PYTHON_NUMPY_DEPENDENCIES += host-python-cython +HOST_PYTHON_NUMPY_DEPENDENCIES += host-python-cython ifeq ($(BR2_PACKAGE_CLAPACK),y) PYTHON_NUMPY_DEPENDENCIES += clapack From patchwork Tue Apr 7 11:15:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1073 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8B8F13F379 for ; Tue, 7 Apr 2020 13:15:51 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id o18sf2153232pgh.9 for ; Tue, 07 Apr 2020 04:15:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586258149; cv=pass; d=google.com; s=arc-20160816; b=wQjmD7pbkljZ0z28hxziq+fIW/ACh/SnWW/FdHL46FyW7N7oifcQmFYY+Y4qRaeXj5 11HTmnJMjLN56j3oqT2X1M1LIeJLo2zQAaDYzGLqQL+Q9DlUvjiMyfPsKe+at+iEYGol MMv5AJSycs1nAv0R4lGmLmt0CSiYmPLQR83NY4nuBG7YarU/FYvkTpmFkIHF1eoYWsen v2pXwZv+jPsIssCpOqftxvZWiczg0g+5QCQ4WVQqCsjkOoyLOtck1ZBziqVpjvSlLJx0 OCf+4zK71VGpBtOHeGqnD2jKTuwbaWlKZHnEuk8xuk9MWy/7LiKPVLh6RG143idunXEp 5vsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=z8TL8jCbd2h6zh/NfaJSKt5JH4OTvNOLF5G45au8TWM=; b=XI4KKN8w/oyS1/GQxzKkLpc6aH/HEs7XfosMOJNB0TSR/nEkPGw6eMSISW7+NaW1So 9rk/OuqUEFdA4F8P8R8EA4IvbuHFl+4amjwAaJ4+W/pIqFTDKWH45CGeWJy/g6YutdnD lpTc/K6AP+sFKCasXBSr8d0broYaogP1ohsE5MyuEB+Y/9+YifWGueAXIqQ7ju6/+TfA w2Gq7Ev6g/nUfmwktKBiPc6ZHTVBoVHvRcjkh4BqCQ4kzmjZp7VeJHycSL9DShUVqdgh kONmiCOyMO3xqFd0dzRNp8cvlsrSozPHYj+sXEYIxfp5I5spPq3g16h/7Fey0eHWTFin ta6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pRGICktr; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=z8TL8jCbd2h6zh/NfaJSKt5JH4OTvNOLF5G45au8TWM=; b=X8ypoajAUc7nR08VLKJcn8EdAlhDX/4FGHVf/SZqvAx2J/l+0tQAAgSYKgZVrC38tu 2imwqECkXfoCRxwFVH8R4/axI5wipREFS5GNWmKxKqjA3C1hMm4z0Msz8eUrc5/k9NC9 qYtEslu9II3DuJUI38T0kZY8kcGeuQKk18VsY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=z8TL8jCbd2h6zh/NfaJSKt5JH4OTvNOLF5G45au8TWM=; b=Zap38hx4JEl8h73OBCYqsIb4yoEE2W0hclh5+wc8t6j5x3Z78wLCNQfXSa46JiVc7w Y5T0dfJW+f9Di+0Q0NSj8RLOgDB7v5re58+uVTsk+IcX9uWg/+Pf302x4d56IJpN2Xhw RqLlqeTGK1f1ttx10G9CinescE3tjiY3WCgQ/cL+8S0lVr9d1qKnysEeUtHGoBohWX/2 ZuMKpdqOu+wExUfa7A7gQqIqw37rPoDHKPBaIqi9IQxyuNIHPgl4o6rrzimB3HqbWLYo /tPZour83etHErJpKaLGH3NLyPE8kvRazH3BJPtVdg8yH2SlRB9fH/h5tjIiOLErsPiE GkUw== X-Gm-Message-State: AGi0PuY3cCwVpJ3egwRHecCtEZZFa2WHF0oEv4okC1sJvHmJlmHp5VM9 gZdOoFBid/xW4srBiY1KFz75ilzM X-Google-Smtp-Source: APiQypJ6PMcYJjMhfpqR6WhE9rPgXGXvWUpSKPtyw6zmCoTFbN3im5fcOJBRSRhsDzDbus+lEAzqjA== X-Received: by 2002:a17:90a:c583:: with SMTP id l3mr2233302pjt.84.1586258149336; Tue, 07 Apr 2020 04:15:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:3087:: with SMTP id w129ls1687255pfw.1.gmail; Tue, 07 Apr 2020 04:15:49 -0700 (PDT) X-Received: by 2002:aa7:990e:: with SMTP id z14mr2168787pff.274.1586258148706; Tue, 07 Apr 2020 04:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586258148; cv=none; d=google.com; s=arc-20160816; b=rLBzHEZ0g9EmIK700tJtUFpKONSEjSOaEqhVzcsUehy1jKsSN9pHxE9WGNusr6uurh fVxeDdUX2C8YvN8dvT9VWIR4hJsX9fcUW01HB5yX/G+CcvWkTqwIN7VZSIcyspT+VvuK fia0nEP4Btr6Eww96NMHXw8+42Zdufbi+DAPIvko5AYVz+OaX6aZ/APr8fA/KQH8WNAd WPZfQnAj/3Hcw/Mfn3zqk3EwVdYo4wwFK0dfNUA3DJKzO8UJ1kBo8d0c/aesPnZVVbGn shK3REfjHIgAkekJ3Av6PdJdWZDBu3dE3Ejx5fa+mwbBpZnWvoQzvF7x4OY9srhX9yAK 064A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6kh9vjUcc7UbiBXkEMeBnXaCNKghKw7ie/iR6uSjFOw=; b=WAg/qlrszOJDq7q5kuFzMOfRJFnk4+J3geYB69O4+7IBlRPc11gO9NnYP7U7yF2GIP EM3GxTEazznJ4PU6cLmhFgtJqqJhq1kFeMOd1h6vr98OIqFQ1fBBIbqjxm0sBazJ4LhW elZLttVkg8UiqJWdCAH/CiDE66yxeozRjU3HzWRuoPqPF/4qSmfQywIradpkMJWzupyH MGYqvicXAVeE9h+jMrQhYBgezrXxsskDEJvdj9ucamOaksC9pbuYv8i51kSFfhSChnEK 02e+wa9bA6+WhmsYfVz49f2cH52pmne/rf/ez52RXUFIwWBG7PGCQb1mj6f6ZZ0fd+wO 3h4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pRGICktr; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h93sor1634100pje.31.2020.04.07.04.15.48 for (Google Transport Security); Tue, 07 Apr 2020 04:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:868b:: with SMTP id p11mr2270707pjn.34.1586258148403; Tue, 07 Apr 2020 04:15:48 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:79b0:3a91:34a5:abd7]) by smtp.gmail.com with ESMTPSA id e187sm13788802pfe.50.2020.04.07.04.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 04:15:47 -0700 (PDT) From: Jagan Teki To: buildroot@buildroot.org Cc: "Yann E . MORIN" , Angelo Compagnucci , Suniel Mahesh , Esben Haabendal , Yegor Yefremov , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v8 2/5] package/python-numpy: fixup npymath.ini for numpy extensions Date: Tue, 7 Apr 2020 16:45:12 +0530 Message-Id: <20200407111515.21131-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407111515.21131-1-jagan@amarulasolutions.com> References: <20200407111515.21131-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pRGICktr; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Esben Haabendal Inorder to build the numpy distutils extension packages like python-scipy, python-numba, it require an explicit pkg-config path fixup for npymath.ini. This pkg-config path fixup would update the prefix path of npymath.ini with actual target staging area where numpy core was built, so-that numpy distutils extension packages would explicitly link this config path for their package environment. Without this extension packages cannot find -lnpymath since it uses host libraries (like libnpymath.a). So, attach the post install staging hook with pkg-config path fixup for npymath.ini. Signed-off-by: Esben Haabendal Signed-off-by: Jagan Teki --- Changes for v8: - none Changes for v7: - rephrase commit and comments of fixup npymath.ini package/python-numpy/python-numpy.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk index 3f0df7a640..4d2e852b43 100644 --- a/package/python-numpy/python-numpy.mk +++ b/package/python-numpy/python-numpy.mk @@ -32,6 +32,21 @@ define PYTHON_NUMPY_CONFIGURE_CMDS echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg endef +# Fixup the npymath.ini prefix path with actual target staging area where +# numpy core was built. Without this, target builds using numpy distutils +# extensions like python-scipy, python-numba cannot find -lnpymath since +# it uses host libraries (like libnpymath.a). +# So, the numpy distutils extension packages would explicitly link this +# config path for their package environment. +PYTHON_NUMPY_STAGING_DIR = $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy +PYTHON_NUMPY_NPY_PKG_CONFIG_PATH=$(PYTHON_NUMPY_STAGING_DIR)/core/lib/npy-pkg-config +define PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES + sed -e '/^pkgdir=/d' \ + -e '/^prefix=/i pkgdir=$(PYTHON_NUMPY_STAGING_DIR)/core' \ + -i $(PYTHON_NUMPY_NPY_PKG_CONFIG_PATH)/npymath.ini +endef +PYTHON_NUMPY_POST_INSTALL_STAGING_HOOKS += PYTHON_NUMPY_FIXUP_NPY_PKG_CONFIG_FILES + # Some package may include few headers from NumPy, so let's install it # in the staging area. PYTHON_NUMPY_INSTALL_STAGING = YES From patchwork Tue Apr 7 11:15:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1074 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D1DE53F379 for ; Tue, 7 Apr 2020 13:15:55 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id h125sf2163974pfg.3 for ; Tue, 07 Apr 2020 04:15:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586258154; cv=pass; d=google.com; s=arc-20160816; b=PujnejlVQ9sAKakgcEhkdKtDdb89dP2QDhUMo1go+9CY+6Xc18AyNBCvZ95wOMZQNK WaQTGpk6uaX8+C4Uu+RPnWMqoH3JPnMt8gHc7CdpN1UJtjIv9E7WXwMSgESYFVLzmK+L /cYoo0y+i6uP23qXLjxfMCUaOPlYR9RckoHd3m/DltxF4QLbhwCNEiRFhG9M2/YdvfqJ FqYSowbUzdIKpf2pSui74AW5wOqIa3Er17N6cHVbPVEm+0vVLfiVm4RQQ+C8vG5RCwck dPfCBzmJhijKr492ht/5ABBsWFjAUuBHj/w2SCg8QiFAUvLdCvSvKqlkMDWHfw4rJD3G l6HA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=fDdaUzeDA4eHGo3H8Ofy105NdAoaojZd5M/2SWNEAR0=; b=QR84t43nnJ7iDrl2Cr0GdLSPX9a2wTX3foCdiawWuhD5l8Mj/EVB/xLJr6wKARGLgi 4RDdTIKohjeazOlrR+QUgD3eS1AVmZ/qKVlhWltLkIDb29wB9QfkZNQh1bDoQkNlbnvg J9degKopqhiH1e0hIjx58G8Lk03aoEkGKAjMK3vSwOI53WHP52U7ToHFluOJ5CYOoou3 9mvoQPk/Sgd1QYKyUQlSt+8Wl0dytgm1HsB4NGWAqUupJ3M27UFnnXgYhtZOIGSRqXzj Hug4iyoZRFEtQc/Mvoi/gruB/nAqG24WVgVcQR758R4Fu8ZH6jm1k7GRy1ZAoGVcBLSC fSKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EBGzSYMD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fDdaUzeDA4eHGo3H8Ofy105NdAoaojZd5M/2SWNEAR0=; b=qjp1fic1PBhvYJa2XOx9bizy9tAN/cEaKbmfiuiRk+vZ/8BZEenSeuiZ6DyBdsEMVf kG78fDZ7FZMxUargmVp0oYymyTZvfhXrceKHFGJx2OoXXnRl5K/XEErtt4mtLHh6Xyte YmtF0/ezlzs38QQmrQ8V8LQIQm3Ys56CJ95BI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=fDdaUzeDA4eHGo3H8Ofy105NdAoaojZd5M/2SWNEAR0=; b=KGZGccprQmtaYcAcfO1qf5YGgars4V8iW2AQmAs6qd3OFIJd0TKTO1JLhGZBY48UMA K0a0l9KIWSBOcrzcDTJQtDZ5zl/bdc/kbjyjOxXo15GA3ewsVDa5nkJC4oXgJPtcTPC6 YFiuEY2LfGefij1FSOk9lmT+2nL1W/zEal54skBq6X0i5SGHq1kkAWRzK4GvRQ+PlYYF j5WODjAtbBw0zY92HKMnzvYadzBEo8K5QMuHg91H6kgKK7pINCI5TvU1CSq/nUNGSLZ5 ORmMaUdA3U0dBUFEXktNtdteHi+2379jaDEFeMh+tmjhUPlQmbQTPVqZ4Qk0CYKn0y21 SpYw== X-Gm-Message-State: AGi0PubWF5BPZzx8tUr5DZ16zDIk7w5g0qIjLalJz2v78tnoYGNjRsSC tG0nwOhSvqQRhdMVDo18+ZNPG6eY X-Google-Smtp-Source: APiQypKccSqmuVzcDr2jwFZ85fcDxNxxm/WOSec3G4j9mgrGqk2CuWH2PzZXyXlSkJUlU+jhHxTcRA== X-Received: by 2002:a17:902:b183:: with SMTP id s3mr1971353plr.33.1586258154189; Tue, 07 Apr 2020 04:15:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1853:: with SMTP id 80ls1672123pfy.11.gmail; Tue, 07 Apr 2020 04:15:53 -0700 (PDT) X-Received: by 2002:a63:3402:: with SMTP id b2mr1581133pga.280.1586258153625; Tue, 07 Apr 2020 04:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586258153; cv=none; d=google.com; s=arc-20160816; b=B0pjRo9/m2VGGiAXAtRreotWDXxu4fGwUK0nJDLzSfXVIOGh+JYdqjMK8Tin0gg8jJ CeX8+HJB4rZVrvTUXmSb47RKao4hkGQCjyzTOXLrKKnvc1NhVmNVZm4D7DpT5nkk7nPe VWC7UIgaCIRV7a40qFKipNoTjnN9nIXhaHxW5N/mMWQHwEMFADZ76ul4g5Vn0UlMIS4g U/zpULQQIQsa11wtIsM2q54NEjoZ9r6US+VLzfRpmMYX1sz0ojWC8qxN3+IeBoF7fq0S cGQ3uLiI5c7PTNn34+koSJ6LVV60wv7ZxqrBWqC9q0Aj5aqyIFN2twJVIuT7bftoKjrM cvDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pEuvRRR8JgzrINrD8BS+AaLopDetLY6OT+UFrqUtIT0=; b=heIbQBV0ncKmcsv5lj0GXu5n/O+KGiTAO9lgyF/8D7wW3v5FcMZET8yn+37SrYWqIK ILYHMmdy3ww1Ej+672Rn7LeY8S/z6+sR5Xv4omLEaXltDA2DkDstmuMWx92MT8fvCnsw 1N8lHhBycubrQ8fm17ykrx/X4XWhFYuavUTdpmVmxRqSgesvVKGPS3oCA8UhMPL2Q1AV zZdFPE1WIw6UektnsdbWq9SM0lGXkpVanfjTs/PeSEwZg80Bi5ByWJKjin2/24dcVdda g6h32i9bcl06ffRBKsajeUMqdDQ30E5j8XjhIpM++WEgYahziiRz6/Hxfuw1/PK1cGWZ gz/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EBGzSYMD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 10sor3402830pfu.83.2020.04.07.04.15.53 for (Google Transport Security); Tue, 07 Apr 2020 04:15:53 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:648f:: with SMTP id y137mr2133818pfb.199.1586258152879; Tue, 07 Apr 2020 04:15:52 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:79b0:3a91:34a5:abd7]) by smtp.gmail.com with ESMTPSA id e187sm13788802pfe.50.2020.04.07.04.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 04:15:52 -0700 (PDT) From: Jagan Teki To: buildroot@buildroot.org Cc: "Yann E . MORIN" , Angelo Compagnucci , Suniel Mahesh , Esben Haabendal , Yegor Yefremov , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v8 3/5] package/python-pybind11: new host package Date: Tue, 7 Apr 2020 16:45:13 +0530 Message-Id: <20200407111515.21131-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407111515.21131-1-jagan@amarulasolutions.com> References: <20200407111515.21131-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EBGzSYMD; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add python-pybind11 package with 2.4.3 release version. Cc: Esben Haabendal Signed-off-by: Jagan Teki --- Changes for v8: - none Changes for v7: - update the commit message - fix sha256 value of pybind11 LICENCE DEVELOPERS | 1 + package/Config.in.host | 1 + package/python-pybind11/Config.in.host | 7 +++++++ package/python-pybind11/python-pybind11.hash | 5 +++++ package/python-pybind11/python-pybind11.mk | 14 ++++++++++++++ 5 files changed, 28 insertions(+) create mode 100644 package/python-pybind11/Config.in.host create mode 100644 package/python-pybind11/python-pybind11.hash create mode 100644 package/python-pybind11/python-pybind11.mk diff --git a/DEVELOPERS b/DEVELOPERS index a2c6da208b..308a59b264 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1151,6 +1151,7 @@ F: configs/orangepi_win_defconfig F: configs/orangepi_zero_plus2_defconfig F: configs/pine64_defconfig F: configs/pine64_sopine_defconfig +F: package/python-pybind11 N: James Hilliard F: package/gensio/ diff --git a/package/Config.in.host b/package/Config.in.host index dfea478868..d63bf54aa7 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -57,6 +57,7 @@ menu "Host utilities" source "package/python/Config.in.host" source "package/python-cython/Config.in.host" source "package/python-lxml/Config.in.host" + source "package/python-pybind11/Config.in.host" source "package/python-six/Config.in.host" source "package/python-xlrd/Config.in.host" source "package/python3/Config.in.host" diff --git a/package/python-pybind11/Config.in.host b/package/python-pybind11/Config.in.host new file mode 100644 index 0000000000..e4164efd9d --- /dev/null +++ b/package/python-pybind11/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_PYTHON_PYBIND11 + bool "host python-pybind11" + help + Python module for Seamless operability between + C++11 and Python. + + https://github.com/pybind/pybind11 diff --git a/package/python-pybind11/python-pybind11.hash b/package/python-pybind11/python-pybind11.hash new file mode 100644 index 0000000000..880b678b94 --- /dev/null +++ b/package/python-pybind11/python-pybind11.hash @@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.python.org/pypi/pybind11/json +md5 23fdca8191b16ce3e7f38fb9e4252b2d pybind11-2.4.3.tar.gz +sha256 72e6def53fb491f7f4e92692029d2e7bb5a0783314f20d80222735ff10a75758 pybind11-2.4.3.tar.gz +# sha256 for LICENSE is locally computed +sha256 9a37ea54aa3cf12c7f3292799f20822ffd4b9b7142b36a7a9997b28c39264dc9 LICENSE diff --git a/package/python-pybind11/python-pybind11.mk b/package/python-pybind11/python-pybind11.mk new file mode 100644 index 0000000000..833ec92c86 --- /dev/null +++ b/package/python-pybind11/python-pybind11.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pybind11 +# +################################################################################ + +PYTHON_PYBIND11_VERSION = 2.4.3 +PYTHON_PYBIND11_SOURCE = pybind11-$(PYTHON_PYBIND11_VERSION).tar.gz +PYTHON_PYBIND11_SITE = https://pypi.python.org/packages/aa/91/deb6743e79e22ab01502296570b39b8404f10cc507a6692d612a7fee8d51 +PYTHON_PYBIND11_SETUP_TYPE = setuptools +PYTHON_PYBIND11_LICENSE = BSD +PYTHON_PYBIND11_LICENSE_FILES = LICENSE + +$(eval $(host-python-package)) From patchwork Tue Apr 7 11:15:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1075 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3748F3F379 for ; Tue, 7 Apr 2020 13:16:18 +0200 (CEST) Received: by mail-oi1-f200.google.com with SMTP id a69sf2460887oib.11 for ; Tue, 07 Apr 2020 04:16:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586258176; cv=pass; d=google.com; s=arc-20160816; b=b3QIHBjIRCpoCE7EBdGRffELZMbjswGu440wTAGKQnyVvG+mhTDCQiyOUDgSfdWnJ1 z+MSKXjYuR/LvtL7c4baJ5XoiAP4uIf9UyOj1zBPwbE/P+7l7fjPKSbLzaj3LaGv/Nsv vIeZObuhvEpyteumvpXrbVZxhkrjwfG/8ZS7+zm7UPyy0BsopgzNR1qP0Aq84ckHBQXq SLMyc9y6mjm4KTbEmNTmsFTOf5amPkR9l/isSnnynh4WvFr+wpe1FftQMLX27yx3F2w9 CMWJqOS8d2/yUcKZ6hXaBs78vW5tXYWGwzx4vSi4PLsaaZIxEYlaTNws83BRm1x03UHs 8Otw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from:mime-version :dkim-signature; bh=l1gRXUzFN3aHX727OME7XhgN0VEFMJLMUhx+Xs06z0E=; b=hxIwnzO6/p63msvDe24NZxofGmH/rT/TPIlTUHUGSDvpR6GYJTCxdBb7eBc2bl7QhP wSu2670KUA6XcpSjsi5/2dZr4Bz3Zdc08xSVuElzUuucOpihPMRWQOS7baAAAW6fg8C/ O6Yxdt1P+UOBtSsjaby8jTyfOmqbO4QHwd9MFeGYaShJjub3LnHIu+DDNEpsf4gFNom5 gGTUZsYBwSUFVXvJnBAMCrIpoyMVtTwW7v2EiP9aTqyX7she7iwzvu/YLRAE70stjOpF QDIjviEex+FucpvZmas+udT+elVDEq1sDUKebWdy7pRTR5lCAsVDSqFkfr7MO+NwSKW/ OLFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=O70b+R1k; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :content-transfer-encoding:precedence:mailing-list:list-id:list-post :list-help:list-archive:list-unsubscribe; bh=l1gRXUzFN3aHX727OME7XhgN0VEFMJLMUhx+Xs06z0E=; b=Kxhxcp6EQEaYcvDkzPsEZ7C230BW26W26L0vcJK3I6RPvHzkFSoZiiOOpiHMKBcc5P 4lsqYrtr/PFU7AU5qQ4iGvKdoiQIjeWsNzyPx8aSarK7WcDM+vfRl1iNRi/Q2y7+mesW s60gVBSzVyCwf//rTsYeziNwt+N2mfRMouRpo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:content-transfer-encoding :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-unsubscribe; bh=l1gRXUzFN3aHX727OME7XhgN0VEFMJLMUhx+Xs06z0E=; b=Kb2iE3edizI5NWT5AaQF2Q0jeK+70U1Xa6Q99eNr+TSFm9mCNDEKPOniYKbPw2iyAu jBWftbLxdVDEzhmvc6FQazQV/aXgZAKdBr1M6ColHHgcMWCmJ3kFn+fsdK3Gzfi4Afwt vuHBZcbih04CcTQqCr98+t0mks52lcr2itlDAIS1QULIlcLcg2fq7SnV+SoQsQ4U+lKU pKFivsmS5sppWI2aqVr8SjHokffSUwPLvRfrgGylajSYxqbpE0WykTIQvwBqTREC03Zq T15czizpP0WCiaopytj5FUGAUkBdUOzvAG+oeJd3uxVYtQmMip4kjOvQKrkkvl1IwfXu 0X+g== X-Gm-Message-State: AGi0PuYGtFsOyt/gJuOfi919WQ02GNUb+ZEV8at5cqnkNzCzf4IVMzxr mwyDGmd0Kb8qTwQMClH/Jajxbgyn X-Google-Smtp-Source: APiQypLUbLPLE7Ii+MAAnSWdh4kfbBFalt7DHHisp3qsP0HBWob4TxZZl/6+QccF1VjTwlJ1jAh2tg== X-Received: by 2002:a9d:b8f:: with SMTP id 15mr1082790oth.256.1586258176117; Tue, 07 Apr 2020 04:16:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aca:ec0a:: with SMTP id k10ls441061oih.8.gmail; Tue, 07 Apr 2020 04:16:15 -0700 (PDT) X-Received: by 2002:aca:abcd:: with SMTP id u196mr1247559oie.86.1586258175567; Tue, 07 Apr 2020 04:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586258175; cv=none; d=google.com; s=arc-20160816; b=jbxWto/N37SlYBgVtV2QdbsV1DrCWqKV7D7ksX++xX1mxdTbuCYWMB5g8m2U5uRmQq boV72hHpQJ1ZEwsMWy95HiaZ2OdvDZ1FKxHyW59EbmXq6sty+ivm2v1MeIalpB1qFGRP 7zqr/kmF4ILs1jdAz6G455U8R3yeSZJYrOAJ+tKfZjIoGaR/I+d9QB3oLuX9p/Py7qDI NO0iK0EF/Nup3RLGAWnqdiyR/DpkIsFiFzKvq+z7SjdS7g2nK8tSwz/DfT1ahDXO7HxP Sp41T8V6ZfmTJonbR1YbJeupkT7YV1Kr5erRMMXwoLNzSOhcNDJqNUULY9FnxzLsy4dz xhBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DY4gm/2gckIRThfc01K7LpoTCXd7W3t+Gf9gufa5/Jo=; b=o5UZKnxx+4pJV62VsVSowHOlyH9Np28RmHBlpQL+RrKcrvTR2453QnUgCqy1LddnXV mptvWb7eI73S/h6G4dKjbnJKKCa2i3ti4tP7Yirvg4fgBZj1DMd0nRslY+hQd65jbA/h YaLpmDQWZntGn6B9+Qwd/tQFT1ea7nqgAT5D8m55zqElMrFUgy6eOYaLemqlwvW0QN9d NCMEv7PeUrl+C3cqFEDzO9kzhPDZ7/29VHZPROiHxw1gW1X141xFK1IkNyelKOXIziep +8buNf31JffXlLujCwFrTJTHDm+vrbQ9U7flc1tfARwC9kWv/O3SD6Y4r2qXRNJ9QQm+ zK8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=O70b+R1k; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id n65sor2556061oib.107.2020.04.07.04.16.14 for (Google Transport Security); Tue, 07 Apr 2020 04:16:14 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:90a:2a06:: with SMTP id i6mr1915292pjd.99.1586258173594; Tue, 07 Apr 2020 04:16:13 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:79b0:3a91:34a5:abd7]) by smtp.gmail.com with ESMTPSA id e187sm13788802pfe.50.2020.04.07.04.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 04:16:12 -0700 (PDT) From: Jagan Teki To: buildroot@buildroot.org Cc: "Yann E . MORIN" , Angelo Compagnucci , Suniel Mahesh , Esben Haabendal , Yegor Yefremov , linux-amarula@amarulasolutions.com, Adam Duskett , Jagan Teki Subject: [PATCH v8 4/5] support/testing: add python-pybind11 test Date: Tue, 7 Apr 2020 16:45:14 +0530 Message-Id: <20200407111515.21131-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407111515.21131-1-jagan@amarulasolutions.com> References: <20200407111515.21131-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=O70b+R1k; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Adam Duskett This test is a simple integration test of the python-pybind11 package. It consists of the following: - The python-pybind11-addition-example package compiles a simple cpp file which adds two given numbers together and returns the results and installs the compiled file to /root/ This example is from the following URL: https://pybind11.readthedocs.io/en/stable/basics.html - The python-pybind11-addition-example package installs the sample_python_pybind11.py file which imports the above-compiled file and adds 1 and 2 together to /root/ - Execute the sample_python_pybind11.py in an emulator with the expected output of 3 and an exit code of 0. Signed-off-by: Adam Duskett [jagan: rebase, fix trailing whitespace, new line warninings] Signed-off-by: Jagan Teki --- Changes for v8 - new patch .gitlab-ci.yml | 2 + DEVELOPERS | 2 + .../br2-external/python-pybind11/Config.in | 1 + .../python-pybind11/external.desc | 1 + .../br2-external/python-pybind11/external.mk | 1 + .../Config.in | 5 ++ .../pybind11_addition_example.cpp | 9 +++ .../python-pybind11-addition-example.mk | 39 ++++++++++ .../sample_python_pybind11.py | 4 + .../tests/package/test_python_pybind11.py | 76 +++++++++++++++++++ 10 files changed, 140 insertions(+) create mode 100644 support/testing/tests/package/br2-external/python-pybind11/Config.in create mode 100644 support/testing/tests/package/br2-external/python-pybind11/external.desc create mode 100644 support/testing/tests/package/br2-external/python-pybind11/external.mk create mode 100644 support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/Config.in create mode 100644 support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/pybind11_addition_example.cpp create mode 100644 support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/python-pybind11-addition-example.mk create mode 100644 support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/sample_python_pybind11.py create mode 100644 support/testing/tests/package/test_python_pybind11.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9519c3812..ce524337cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -471,6 +471,8 @@ tests.package.test_python_passlib.TestPythonPy2Passlib: { extends: .runtime_test tests.package.test_python_passlib.TestPythonPy3Passlib: { extends: .runtime_test } tests.package.test_python_pexpect.TestPythonPy2Pexpect: { extends: .runtime_test } tests.package.test_python_pexpect.TestPythonPy3Pexpect: { extends: .runtime_test } +tests.package.test_python_pybind11.TestPythonPy2Pybind11: { extends: .runtime_test } +tests.package.test_python_pybind11.TestPythonPy3Pybind11: { extends: .runtime_test } tests.package.test_python_pynacl.TestPythonPy2Pynacl: { extends: .runtime_test } tests.package.test_python_pynacl.TestPythonPy3Pynacl: { extends: .runtime_test } tests.package.test_python_pyyaml.TestPythonPy2Pyyaml: { extends: .runtime_test } diff --git a/DEVELOPERS b/DEVELOPERS index 308a59b264..f06d54a662 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -85,6 +85,8 @@ F: package/sngrep/ F: package/spidermonkey/ F: package/systemd/ F: support/testing/tests/package/test_python_gobject.py +F: support/testing/tests/package/br2-external/python-pybind11/ +F: support/testing/tests/package/test_python_pybind11.py N: Adam Heinrich F: package/jack1/ diff --git a/support/testing/tests/package/br2-external/python-pybind11/Config.in b/support/testing/tests/package/br2-external/python-pybind11/Config.in new file mode 100644 index 0000000000..27b502313b --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/Config.in @@ -0,0 +1 @@ +source "$BR2_EXTERNAL_PYTHON_PYBIND11_PATH/package/python-pybind11-addition-example/Config.in" diff --git a/support/testing/tests/package/br2-external/python-pybind11/external.desc b/support/testing/tests/package/br2-external/python-pybind11/external.desc new file mode 100644 index 0000000000..04a636053a --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/external.desc @@ -0,0 +1 @@ +name: PYTHON_PYBIND11 diff --git a/support/testing/tests/package/br2-external/python-pybind11/external.mk b/support/testing/tests/package/br2-external/python-pybind11/external.mk new file mode 100644 index 0000000000..db34e5f54d --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_PYTHON_PYBIND11_PATH)/package/*/*.mk)) diff --git a/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/Config.in b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/Config.in new file mode 100644 index 0000000000..7860559a13 --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_PYTHON_PYBIND11_ADDITION_EXAMPLE + bool "python-pybind11 addition example" + depends on BR2_PACKAGE_PYTHON_PYBIND11 + help + Simple class for testing python-pybind11 diff --git a/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/pybind11_addition_example.cpp b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/pybind11_addition_example.cpp new file mode 100644 index 0000000000..61b3fce051 --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/pybind11_addition_example.cpp @@ -0,0 +1,9 @@ +#include + +int add(int i, int j) { + return i + j; +} + +PYBIND11_MODULE(pybind11_addition_example, m) { + m.def("add", &add, "A function which adds two numbers"); +} diff --git a/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/python-pybind11-addition-example.mk b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/python-pybind11-addition-example.mk new file mode 100644 index 0000000000..f620424fca --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/python-pybind11-addition-example.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# python-pybind11_addition_example +# +################################################################################ + +PYTHON_PYBIND11_ADDITION_EXAMPLE_DEPENDENCIES = python-pybind11 + +ifeq ($(BR2_PACKAGE_PYTHON),y) +PYTHON_PYBIND11_ADDITION_EXAMPLE_INCLUDES=`$(STAGING_DIR)/usr/bin/python2-config --includes` +PYTHON_PYBIND11_ADDITION_EXAMPLE_SUFFIX=`$(STAGING_DIR)/usr/bin/python2-config --extension-suffix` +else +PYTHON_PYBIND11_ADDITION_EXAMPLE_INCLUDES=`$(STAGING_DIR)/usr/bin/python3-config --includes` +PYTHON_PYBIND11_ADDITION_EXAMPLE_SUFFIX=`$(STAGING_DIR)/usr/bin/python3-config --extension-suffix` +endif +PYTHON_PYBIND11_ADDITION_EXAMPLE_OUTPUT=pybind11_addition_example$(PYTHON_PYBIND11_ADDITION_EXAMPLE_SUFFIX) + +define PYTHON_PYBIND11_ADDITION_EXAMPLE_BUILD_CMDS + $(INSTALL) -D $(PYTHON_PYBIND11_ADDITION_EXAMPLE_PKGDIR)/pybind11_addition_example.cpp \ + $(@D)/pybind11_addition_example.cpp + + $(INSTALL) -D $(PYTHON_PYBIND11_ADDITION_EXAMPLE_PKGDIR)/sample_python_pybind11.py \ + $(@D)/sample_python_pybind11.py + + cd $(@D); \ + $(TARGET_CXX) -std=c++11 -fPIC -shared \ + $(PYTHON_PYBIND11_ADDITION_EXAMPLE_INCLUDES) pybind11_addition_example.cpp \ + -o $(PYTHON_PYBIND11_ADDITION_EXAMPLE_OUTPUT) +endef + +define PYTHON_PYBIND11_ADDITION_EXAMPLE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/$(PYTHON_PYBIND11_ADDITION_EXAMPLE_OUTPUT) \ + $(TARGET_DIR)/root/$(PYTHON_PYBIND11_ADDITION_EXAMPLE_OUTPUT) + + $(INSTALL) -D -m 755 $(@D)/sample_python_pybind11.py \ + $(TARGET_DIR)/root/sample_python_pybind11.py +endef + +$(eval $(generic-package)) diff --git a/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/sample_python_pybind11.py b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/sample_python_pybind11.py new file mode 100644 index 0000000000..29196481e1 --- /dev/null +++ b/support/testing/tests/package/br2-external/python-pybind11/package/python-pybind11-addition-example/sample_python_pybind11.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +import pybind11_addition_example + +print(pybind11_addition_example.add(1, 2)) diff --git a/support/testing/tests/package/test_python_pybind11.py b/support/testing/tests/package/test_python_pybind11.py new file mode 100644 index 0000000000..12bd77807e --- /dev/null +++ b/support/testing/tests/package/test_python_pybind11.py @@ -0,0 +1,76 @@ +import os +import infra.basetest + +class TestPythonPy2Pybind11(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/package/br2-external/python-pybind11")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.86" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ROOTFS_CPIO_GZIP=y + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_PYBIND11=y + BR2_PACKAGE_PYTHON_PYBIND11_ADDITION_EXAMPLE=y + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio.gz") + kern = os.path.join(self.builddir, "images", "Image") + self.emulator.boot(arch="aarch64", + kernel=kern, + kernel_cmdline=["console=ttyAMA0"], + options=["-M", "virt", "-cpu", "cortex-a57", "-m", "512M", "-initrd", img]) + self.emulator.login() + + def test_run(self): + self.login() + cmd = "python sample_python_pybind11.py" + output, exit_code = self.emulator.run(cmd, 120) + print(output) + self.assertEqual(exit_code, 0) + self.assertEqual(output, ["3"]) + +class TestPythonPy3Pybind11(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/package/br2-external/python-pybind11")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.86" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ROOTFS_CPIO_GZIP=y + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYBIND11=y + BR2_PACKAGE_PYTHON_PYBIND11_ADDITION_EXAMPLE=y + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio.gz") + kern = os.path.join(self.builddir, "images", "Image") + self.emulator.boot(arch="aarch64", + kernel=kern, + kernel_cmdline=["console=ttyAMA0"], + options=["-M", "virt", "-cpu", "cortex-a57", "-m", "512M", "-initrd", img]) + self.emulator.login() + + def test_run(self): + self.login() + cmd = "python3 sample_python_pybind11.py" + output, exit_code = self.emulator.run(cmd, 120) + print(output) + self.assertEqual(exit_code, 0) + self.assertEqual(output, ["3"]) From patchwork Tue Apr 7 11:15:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1076 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AAE873F379 for ; Tue, 7 Apr 2020 13:16:19 +0200 (CEST) Received: by mail-oi1-f199.google.com with SMTP id p2sf2466014oic.7 for ; Tue, 07 Apr 2020 04:16:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586258178; cv=pass; d=google.com; s=arc-20160816; b=uSxbqGQXzH6IFb2aTKtRfzI/gabnnYEDslFcHEmNMkJgIro8vEIRDB+Ot1+ubscM3W XsxF8pzjTUtGjzwGPa8NE1GXyrj2J/VncPZEOcA9SJEawNdrEduCi3/z3dvEox6gJi1y gkIs8Ov8Ks11wrUb33/HzYFhJLUIWLEBlLHobMzjatqID8yZGYuhx4E0n0afjctx2SN0 LGT4jybgSzlVJmwm179tTwVfJ/eWfB6qxIZDM9FXyVNUegzwARVYGr5hNcU+Ba83Y3nA xJ0lpmdTB6NLXpvUuM6fJrrTIzLPwEuJGVmXJQFOJt9F9Z4HGgn2Bl9XDJ65EfAzxmCT BTlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=JhE8Am8DIc8h4tx/CRHarnxX4azRcxaQi83Hg9sCsBo=; b=rmh/muVM715MZcWtfpDxG+ASfW2kPN2QeViX4Rgeg4tkDScxgqb4tv4C9w7EhPjBhZ 9LrAJ5SBN/84nvKGZr6KWu1ZF1yOIMF7Ov+npLN1Ld+qC/c9mM40228Y/wm+Sm6HHvz6 pZWImC3AO8+201ar6b3CkJ3Q//QTA/MbN4G2XlAlm8bIXf2iPHNsz4QKBmdsaTu4Cyuy TzBs7pqqH2PMuXDjDNiijXkD+0/zgnz3V5rFwDmmGgiiJHb+kF0jyO23tss6L54ZyCV2 l6WYcg13QfOBYerIsYFVjFcuEdR1zQJgpPxUZ2pkzLplYbtpoAamOJ9EhAg5/XYNJ3i3 GIyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZLppAfSn; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JhE8Am8DIc8h4tx/CRHarnxX4azRcxaQi83Hg9sCsBo=; b=i6TbUyPwTdIT6JMi8hSB7y/feVD/83a5F3SBfmuPkw9ZQbqpGpR6GSxXe9m/Vu9vmk kU9dVLQpmrqa2YlEvPHeFr0jZHXtxaxyfKQuaZ63BZ6K53YMOZCHU/18NP+lqdc+SIEn U5z7vG8X6YcTMKIjlenBhZlGHVFcmpcshwL54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=JhE8Am8DIc8h4tx/CRHarnxX4azRcxaQi83Hg9sCsBo=; b=Wj801/i3+tSDkhVOfASir01ytNS4tBkcQIXERC5qITQe8gW8VQ23GnHg1YNyUO6eH9 JccuaIAJ/1naVtxZS3v13TpmEfC5CFcIOcXuaPD02RBUxT/TXEDbA1mxjwCpRFRO5GhW QnH9LzGq1FgcDpzvl3RP+YQ1eiBmxUK4UvMsJ6knAywfA/WkhCnly/v8SaLA3pbHfxQG ZcicR2yqpZKDtRWWwEfrrjEhyYTIYjq4fT3mnWKb5xjJq+b2/3pF7yorZ6WXLdpYxMfB KynwisNgxE8ev/iJ0KDhOK1WbuudSAKPNoQFZdud2k4I3gUus+gIQwIBT6rees9VMmLV TcVA== X-Gm-Message-State: AGi0Puapx9gUMdwSdxJXD3BwJgfdFAquWyukRun3++o5SHBmzN8EJvgw Fp4QqS70gpUjaU80RblpSuuQtLPe X-Google-Smtp-Source: APiQypJ5zrP8ExyG4wUKg3PiQj6O+mXcY84tmN1DdWn201RRx2VtMfTPA1WoW/06s2UmyQxKge2r+g== X-Received: by 2002:a05:6808:207:: with SMTP id l7mr1248354oie.171.1586258178702; Tue, 07 Apr 2020 04:16:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a4a:df19:: with SMTP id i25ls293283oou.2.gmail; Tue, 07 Apr 2020 04:16:18 -0700 (PDT) X-Received: by 2002:a4a:625b:: with SMTP id y27mr1444996oog.70.1586258177849; Tue, 07 Apr 2020 04:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586258177; cv=none; d=google.com; s=arc-20160816; b=PXPej7UvFBgCDK0q8CB6Vq8HuYy3vaCfP4SVJiZPqcFR/OHNGIw4lgHvivJGA1an2g ujkwir5CC65OZzP4t/y3RsqhHkg6GzW4P4wuaPpLjtvQUv2Cy/vf8b5ogxrT6p0RJIvh exxxe3SJRHoiWAclPiSPIKhuFAUOjaio4rfbK9d6ialDWtS7suqlCjPuiG23oTVHh2gH Z4pjvqnSh918RjscAViex1VMtfQedJM0ATCQ6CC7kCUeVMMXbP1/wBvzz/CgbK2zIjPB F+C6r8jr87mBNUGmJlXptcAvJGkjFlErLws1vG2cJgJRKZYe1jhx3xlAi+8ffLjbfOFQ G4LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Axw6sdOpCuX7J1I7gewz4HF25W9d9NODH8N/A47FrD4=; b=WD/IuFmCsXjJ4DkO44m0q14oCcUo/+sk6bmczQJFGNBbIJ0nOjr1qzF7vbQJ5xfeXu 5O4NgJoP7+pJgO43geMhijIxPCPd28RcStpXX1JUYQ7RO9s234lF5NJzQK2onzk6a22F DD2NFoBf2ZQuiKfReHbyclgwtp41k2WYnWkoq4XWm8G24w3oQNWzfBoAB+CCZ7SmgoTJ IHUPcNMMhViMshKvJlszLnDDxDkI3a5n5tsm2R2C3xmjEaekoUg0XlsOdxnKm1nEil8+ HxrTTqTN5pN4UCUHYSdb47x2NUT19qNFz225R8T/MQUNErKujNg0SY1QSi7joXsrE/lW 7dMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZLppAfSn; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k67sor2548441oib.128.2020.04.07.04.16.17 for (Google Transport Security); Tue, 07 Apr 2020 04:16:17 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:8dc7:: with SMTP id z190mr1548482pgd.39.1586258177481; Tue, 07 Apr 2020 04:16:17 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:79b0:3a91:34a5:abd7]) by smtp.gmail.com with ESMTPSA id e187sm13788802pfe.50.2020.04.07.04.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 04:16:16 -0700 (PDT) From: Jagan Teki To: buildroot@buildroot.org Cc: "Yann E . MORIN" , Angelo Compagnucci , Suniel Mahesh , Esben Haabendal , Yegor Yefremov , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v8 5/5] package/python-scipy: new package Date: Tue, 7 Apr 2020 16:45:15 +0530 Message-Id: <20200407111515.21131-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407111515.21131-1-jagan@amarulasolutions.com> References: <20200407111515.21131-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZLppAfSn; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add python-scipy with 1.4.1 release version. Signed-off-by: Jagan Teki --- Changes for v8: - none Changes for v7: - update the commit message - fix sha256 value of pybind11 LICENCE DEVELOPERS | 1 + package/Config.in | 1 + package/python-scipy/Config.in | 22 ++++++++++++ package/python-scipy/python-scipy.hash | 9 +++++ package/python-scipy/python-scipy.mk | 46 ++++++++++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 package/python-scipy/Config.in create mode 100644 package/python-scipy/python-scipy.hash create mode 100644 package/python-scipy/python-scipy.mk diff --git a/DEVELOPERS b/DEVELOPERS index f06d54a662..3203b0bc47 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1154,6 +1154,7 @@ F: configs/orangepi_zero_plus2_defconfig F: configs/pine64_defconfig F: configs/pine64_sopine_defconfig F: package/python-pybind11 +F: package/python-scipy N: James Hilliard F: package/gensio/ diff --git a/package/Config.in b/package/Config.in index afe32f52b4..f5af9b07ea 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1120,6 +1120,7 @@ menu "External python modules" source "package/python-scandir/Config.in" source "package/python-scapy/Config.in" source "package/python-schedule/Config.in" + source "package/python-scipy/Config.in" source "package/python-sdnotify/Config.in" source "package/python-secretstorage/Config.in" source "package/python-see/Config.in" diff --git a/package/python-scipy/Config.in b/package/python-scipy/Config.in new file mode 100644 index 0000000000..4d8227c31a --- /dev/null +++ b/package/python-scipy/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_PYTHON_SCIPY + bool "python-scipy" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy + depends on BR2_TOOLCHAIN_HAS_FORTRAN + depends on BR2_TOOLCHAIN_BUILDROOT_CXX + depends on BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_NUMPY + select BR2_PACKAGE_LAPACK + select BR2_PACKAGE_OPENBLAS + help + The SciPy library is one of the core packages that make up the SciPy + stack. It provides many user-friendly and efficient numerical + routines such as routines for numerical integration, interpolation, + optimization, linear algebra and statistics. + + https://www.scipy.org/scipylib/ + +comment "python-scipy needs toolchain w/ fortran and c++ and glibc or musl" + depends on BR2_PACKAGE_PYTHON3 + depends on !BR2_TOOLCHAIN_HAS_FORTRAN || \ + !BR2_TOOLCHAIN_BUILDROOT_CXX || \ + (!BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL) diff --git a/package/python-scipy/python-scipy.hash b/package/python-scipy/python-scipy.hash new file mode 100644 index 0000000000..c9d295ef6b --- /dev/null +++ b/package/python-scipy/python-scipy.hash @@ -0,0 +1,9 @@ +# Locally generated +sha256 dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59 scipy-1.4.1.tar.gz +sha256 5cbdbe33385779958be8b9310497e32d2eec144d82ef425780d3e19f8af6de76 LICENSE.txt +sha256 37e64a498894ac7c3b070023e3689e954a8ecf8a23b90968d09a455f1b4f7b35 scipy/linalg/src/lapack_deprecations/LICENSE +sha256 606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609 scipy/ndimage/LICENSE.txt +sha256 3df9207af2fdb861af0ae3b22026f163b9bcfab4e525dc4943afe2ffa3f77624 scipy/optimize/tnc/LICENSE +sha256 f0cedf52503b2d42b83411a0a16e6fefac346dfad8fddc66f50050150123470c scipy/sparse/linalg/dsolve/SuperLU/License.txt +sha256 0926566f9f406178d1214f8cc796e166b1213dd7c05e0c5b461a8b8ac9e50bbe scipy/sparse/linalg/eigen/arpack/ARPACK/COPYING +sha256 34db0c0c4f931861d720555c9cd7a2e228d1290ba29af0f2ee80c41bb2038afb scipy/spatial/qhull_src/COPYING.txt diff --git a/package/python-scipy/python-scipy.mk b/package/python-scipy/python-scipy.mk new file mode 100644 index 0000000000..1d66b146ec --- /dev/null +++ b/package/python-scipy/python-scipy.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# python-scipy +# +################################################################################ + +PYTHON_SCIPY_VERSION = 1.4.1 +PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz +PYTHON_SCIPY_SITE = https://pypi.python.org/packages/04/ab/e2eb3e3f90b9363040a3d885ccc5c79fe20c5b8a3caa8fe3bf47ff653260 +PYTHON_SCIPY_LICENSE = BSD-3-Clause, BSD-2-Clause, BSD, BSD-Style, \ + Apache-2.0, MIT +PYTHON_SCIPY_LICENSE_FILES = \ + LICENSE.txt \ + scipy/linalg/src/lapack_deprecations/LICENSE \ + scipy/ndimage/LICENSE.txt \ + scipy/optimize/tnc/LICENSE \ + scipy/sparse/linalg/dsolve/SuperLU/License.txt \ + scipy/sparse/linalg/eigen/arpack/ARPACK/COPYING \ + scipy/spatial/qhull_src/COPYING.txt +PYTHON_SCIPY_SETUP_TYPE = setuptools +PYTHON_SCIPY_DEPENDENCIES += \ + host-python-numpy \ + host-python-pybind11 \ + lapack \ + openblas \ + python-numpy + +PYTHON_SCIPY_BUILD_OPTS = config_fc --fcompiler=gnu95 +PYTHON_SCIPY_ENV += F90=$(TARGET_CROSS)gfortran F77=$(TARGET_CROSS)gfortran + +# Provide system configuration options to numpy distutils extenions, telling +# to find all include files and libraries in staging directory. +define PYTHON_SCIPY_CONFIGURE_CMDS + -rm -f $(@D)/site.cfg + echo "[DEFAULT]" >> $(@D)/site.cfg + echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg + echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg +endef + +# Use the target numpy pkg-config configuration files modified for target +# cross-compilation. Without this, numpy distutils will cause the linker to +# link with host libnpymath.a. +PYTHON_SCIPY_ENV += NPY_PKG_CONFIG_PATH=$(PYTHON_NUMPY_NPY_PKG_CONFIG_PATH) +PYTHON_SCIPY_INSTALL_STAGING = YES + +$(eval $(python-package))