From patchwork Fri Mar 10 09:54:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20742 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65707C64EC4 for ; Fri, 10 Mar 2023 09:54:38 +0000 (UTC) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mx.groups.io with SMTP id smtpd.web10.15611.1678442071133061892 for ; Fri, 10 Mar 2023 01:54:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CL4kZkoa; spf=pass (domain: gmail.com, ip: 209.85.208.49, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f49.google.com with SMTP id a25so18359207edb.0 for ; Fri, 10 Mar 2023 01:54:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678442069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CmNA2apU145Tb6HVv/TehXX1cqNX7UgTk4nwrin/fZA=; b=CL4kZkoaICFdagc53AalkAFmB5RkIxWm2LINCd8CZvGpNkI9FZ9IHi5JPhT+8ZxwOJ Agu4eaot5TH34bOEops3qFHvhNHQdYQ9oezk6gSEbsnHdy7sgMLeW9IaCESehO3y7icn Pfa//iRPTdSTUKStQl/5FrE9tYNwl+5RMmA2prc8V2iwQDjuFi7LDqQOba+LodPYA7hk yAuIAe6YXA2e3pQX75ZE64QE27vdpnBFE0gHzxVD9B93Sf+pR36ok5lEC6PLHEasW+on gCfehCJT53xuIYR68oSjT9rOydRP3J2q6NEVr92tvExeTzo+jiCwdrgtUmJQFo63KCHX rZsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678442069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CmNA2apU145Tb6HVv/TehXX1cqNX7UgTk4nwrin/fZA=; b=Dw6T4tAUja13ULxx9Fjhu74qSZL6EBIpFOdjelUDstRQ9Uvs0mJG//b2of9fpwpW0v fiV3WjcMWSac90utOAl0PY79D/ns8IlvD/9yrnF50eT/vVLhBdaN/ZWcYSf9iCZHCDDc +CLL8FshrWk1mXiaLA0WV7r+5+SAkMJBZOjbyYiTkagUWV0ZpmVX9it/iVGD2s05QdmL oktj0HNlLEUb7B2N7W0qJlAQOEZryF3J4YrKxrjDD+8kXGE2KtnNeNq5fuuiFV4hMg2N +vebRvWbUtSo+FCvBPvBYY8MbTdHKaY+Ysyv0Rd0Rz1oDOTW9u5XQ1eDfv9HfAvSxGiH B+0Q== X-Gm-Message-State: AO0yUKUUCXTLvxiBzwoVevzhjquF90HJMjbp0DR3a0SJQ6yi8YTZy32U zueXamhCNtKC3BhnZKeTsl2mI5ShQ7M= X-Google-Smtp-Source: AK7set9d5UsodyCp8A/U9c0cOG6IPTpXsdFFev0k953WWQvwWvUq80YBE3nKf0KD4bByFEnc7c2fAw== X-Received: by 2002:a17:906:1411:b0:8b1:779c:a8ac with SMTP id p17-20020a170906141100b008b1779ca8acmr26060122ejc.13.1678442069397; Fri, 10 Mar 2023 01:54:29 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id kq10-20020a170906abca00b008c405ebc32esm759549ejb.28.2023.03.10.01.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 01:54:29 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 1/4] cmake, cmake-native: Modify download filename Date: Fri, 10 Mar 2023 10:54:16 +0100 Message-Id: <20230310095419.3487056-2-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310095419.3487056-1-zboszor@gmail.com> References: <174B040A85AB843D.27660@lists.openembedded.org> <20230310095419.3487056-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 10 Mar 2023 09:54:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178316 So it won't clash with python3-cmake's download filename from pypi.org which obviously has a diffferent checksum. Signed-off-by: Zoltán Böszörményi --- meta/recipes-devtools/cmake/cmake.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc index b7e674c4c4..9005255a23 100644 --- a/meta/recipes-devtools/cmake/cmake.inc +++ b/meta/recipes-devtools/cmake/cmake.inc @@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://Copyright.txt;md5=09069e0fffe4e5eaf6dde04c3b1932e5 \ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" -SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ +SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz;downloadfilename=cmake-src-${PV}.tar.gz \ " SRC_URI[sha256sum] = "c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c" From patchwork Fri Mar 10 09:54:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20744 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73AF4C6FD1E for ; Fri, 10 Mar 2023 09:54:38 +0000 (UTC) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mx.groups.io with SMTP id smtpd.web10.15612.1678442072044393068 for ; Fri, 10 Mar 2023 01:54:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iUB8W3xX; spf=pass (domain: gmail.com, ip: 209.85.208.46, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f46.google.com with SMTP id da10so18244678edb.3 for ; Fri, 10 Mar 2023 01:54:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678442070; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oEUmDiiSY2vXc4Ezu14bEkCe2rERqKhXafQPtxYddtU=; b=iUB8W3xXlnbjE4xyN1g4y/ib/MZRUmgVMk4ku1HRqAvvZ56bqnKzzIpdgNbe+1D8yo JfDxZJTzcJiukiu95+nuHmfAJGIASn8i5hdFO2Cy9k7gXwrCwMP4+GqsT/MEmINDev4L l8CmgMw4udNQmu6BeoM2amenPsn5QHXrsXyVaddYZY1/WccXTbWJgoWUF62VFwa5UN9A zpXQJxc5mA0dDt7mUboCmEfwic0lT+qW4jgzI5Vii4u/XGobGJB+whKS1yx7gE5L+7NZ 3nT2+gQFUyDaZY+2D4UMqIUAqt16jpe9hbXcvkZKahjmTchqQ75voaBDWt3be8/lbZ9Y 4kcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678442070; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oEUmDiiSY2vXc4Ezu14bEkCe2rERqKhXafQPtxYddtU=; b=jP36eNovop6ly2emMRJfNbti6/qLd3xc1R2z7duM1lZHuxpr/1lPm6PmA+7Q9v8Hlb crwlQj0j7tN2D71+5VemHGgyDbUs2CjgPQqSAmhpZVX9eDVdwkukZhl9CbJpbO23mhdU Iaw/Ooh/KhfA6EXAw5XAshXGWewbHnMK+fWhKvfpPgydcVF/V8CHpKgawqLWGlz8bs2m g8JOBpMLSmNoNi/0SG6oweewBCqWAVikQCZRi390yUrcZOsgcSallFi/8HJbD4U2C7y3 BqF+h/0kE9SUbJIULOpwTU9iYgdW0e8LTBjstI8oh7KBlKZVL7H/wg1V9lowWeKJDt5/ Rirw== X-Gm-Message-State: AO0yUKUQkGAB7xbwsE0va7ypC9mcaTttBkFDKOv0ugPX5m+wQwFrFL4+ q7QPNPZvu7Tuo8WUVxeHGASdgnETwG8= X-Google-Smtp-Source: AK7set/WTsWhWL6JyUhh55x/rsYarAijbTyZ6u+qyv8cN9Z//BNqIdmgRMaJF1wIP1vFyLEqT7ECFA== X-Received: by 2002:a17:907:7b0a:b0:88c:6345:d0e7 with SMTP id mn10-20020a1709077b0a00b0088c6345d0e7mr25297980ejc.36.1678442070103; Fri, 10 Mar 2023 01:54:30 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id kq10-20020a170906abca00b008c405ebc32esm759549ejb.28.2023.03.10.01.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 01:54:29 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 2/4] python3-scikit-build: New recipe Date: Fri, 10 Mar 2023 10:54:17 +0100 Message-Id: <20230310095419.3487056-3-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310095419.3487056-1-zboszor@gmail.com> References: <174B040A85AB843D.27660@lists.openembedded.org> <20230310095419.3487056-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 10 Mar 2023 09:54:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178317 Used by python3-cmake and python3-ninja. Signed-off-by: Zoltán Böszörményi --- .../python/python3-scikit-build_0.16.7.bb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-scikit-build_0.16.7.bb diff --git a/meta/recipes-devtools/python/python3-scikit-build_0.16.7.bb b/meta/recipes-devtools/python/python3-scikit-build_0.16.7.bb new file mode 100644 index 0000000000..c033c56bad --- /dev/null +++ b/meta/recipes-devtools/python/python3-scikit-build_0.16.7.bb @@ -0,0 +1,21 @@ +SUMMARY = "Improved build system generator for Python C/C++/Fortran/Cython extensions" +LICENSE = "MIT & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c96d2b08b3cec6d3c67fb864d1fd8cc" + +DEPENDS = "python3-setuptools-scm-native" + +PYPI_PACKAGE = "scikit-build" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "a9b9cc7479b71e6c8d434596dfade025253aae23adb22a9a2d85850fd51cecfd" + +RDEPENDS:${PN} = " \ + python3-distro \ + python3-packaging \ + python3-setuptools \ + python3-typing-extensions \ + python3-wheel \ + cmake \ +" + +BBCLASSEXTEND = "native nativesdk" From patchwork Fri Mar 10 09:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63A70C6FD1C for ; Fri, 10 Mar 2023 09:54:38 +0000 (UTC) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mx.groups.io with SMTP id smtpd.web10.15613.1678442072399232988 for ; Fri, 10 Mar 2023 01:54:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kwMpXuI2; spf=pass (domain: gmail.com, ip: 209.85.208.48, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f48.google.com with SMTP id k10so18075450edk.13 for ; Fri, 10 Mar 2023 01:54:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678442070; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q+asOmW+fp9UlSBQESjY0SCc1U2hSn9YUW587rYwxOM=; b=kwMpXuI2giwudBcOfhFRKgouTO8gNOQoi40LOCk9YV4mgS/gdyH0W6+V2XOO2ZLGx/ XgQK0l0DGD7uie6UZH4HhTPzjO1T71swsonB/pom1jfplNvTjtxvjFypgQq0NzOOygbE w5LnsR9lw6rJHXRAtYYU67ArU8oOS4OmJRKLnhGoW96ugLDbZhvGkG9f0d8q1cuxZxJm 7LLH3+8W+2j3ce/6cqoNMDhFpv8iVz4xDyfw9A8bQ3m90lDg1GF/kMb9ssAokX3r0DRE iv2gSeZ8ph+BNCTHqQzlZ0MTYljqgn/uzfuZZeV3VYCrblWYsiHzOz5vsdNuDK6wPJaA 5L6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678442070; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q+asOmW+fp9UlSBQESjY0SCc1U2hSn9YUW587rYwxOM=; b=x4oGMKhO3ZCz2XyE0fOkcJcZut3Px5FdNasDxVdUYyMwbc5cjHLlYEzKb4d4fujspc PJGlrdI+2/3/Tk6t+6ns8bsRRr06G+GFOM9xGhBzTMp5TqvtCYzZQb/PLE8bgd26Fo8Q bQWxCC8dT0JLdQr3grPlwNz8wdCdEzc1hkdb/Hq5jwhawwud+H03CU+nt/xa0W57nqH8 uhNbGvrnwyuDr0fgk/ZarL1lW8R8Ly53pkINaW2SOM3+92tAOsYYgtKGBjOZj3HXVoA6 xoeUurgZ6D1rlJD9eVbJxDQl3YbZQyXei/tmKcD18IE0wQ3L0NY4X7ISR4+i2idnxPmy 8ZRQ== X-Gm-Message-State: AO0yUKWr4JqN+A7fTtn5PAy4nf8EwEWO6MYoUW8cMR04dDRRKIoTQckl YfHVIo/iu7fxRGy40gZCbozMDtD2etg= X-Google-Smtp-Source: AK7set9cUOdGkCzYb4h+M8e/S2FpaisGB070bG9O35qvvlpYTrHiEJoH8yZKyYCY/b1qE4ChcOWw9g== X-Received: by 2002:a17:906:ce46:b0:8b1:ce91:a40c with SMTP id se6-20020a170906ce4600b008b1ce91a40cmr21913399ejb.53.1678442070669; Fri, 10 Mar 2023 01:54:30 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id kq10-20020a170906abca00b008c405ebc32esm759549ejb.28.2023.03.10.01.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 01:54:30 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 3/4] python3-cmake: New recipe Date: Fri, 10 Mar 2023 10:54:18 +0100 Message-Id: <20230310095419.3487056-4-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310095419.3487056-1-zboszor@gmail.com> References: <174B040A85AB843D.27660@lists.openembedded.org> <20230310095419.3487056-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 10 Mar 2023 09:54:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178318 Some python modules rely on "import cmake". Only build and ship the python parts, and don't download and build cmake from sources. Use the already built cmake instead. The CMakeLists.txt file is a crippled copy from this cmake python module's sources, removing almost everything, and adding a dummy install target, so do_install() doesn't fail. The python code is patched so cmake is used from PATH. Signed-off-by: Zoltán Böszörményi --- .../python/python3-cmake/CMakeLists.txt | 11 +++++++ .../python3-cmake/run-cmake-from-path.patch | 11 +++++++ .../python/python3-cmake_3.25.2.bb | 33 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-cmake/CMakeLists.txt create mode 100644 meta/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch create mode 100644 meta/recipes-devtools/python/python3-cmake_3.25.2.bb diff --git a/meta/recipes-devtools/python/python3-cmake/CMakeLists.txt b/meta/recipes-devtools/python/python3-cmake/CMakeLists.txt new file mode 100644 index 0000000000..8ba81970ff --- /dev/null +++ b/meta/recipes-devtools/python/python3-cmake/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.6) + +# +# For more details, see docs/building.rst +# + +project(CMakePythonDistributions NONE) + +install(CODE " + message(STATUS \"Install CMake project\") +") diff --git a/meta/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch b/meta/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch new file mode 100644 index 0000000000..5c38fadce0 --- /dev/null +++ b/meta/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch @@ -0,0 +1,11 @@ +--- cmake-3.25.2/src/cmake/__init__.py.old 2023-03-10 09:40:43.582315753 +0100 ++++ cmake-3.25.2/src/cmake/__init__.py 2023-03-10 09:41:38.030874047 +0100 +@@ -36,7 +36,7 @@ + + + def _program(name, args): +- return subprocess.call([os.path.join(CMAKE_BIN_DIR, name)] + args, close_fds=False) ++ return subprocess.call([name] + args, close_fds=False) + + + def cmake(): diff --git a/meta/recipes-devtools/python/python3-cmake_3.25.2.bb b/meta/recipes-devtools/python/python3-cmake_3.25.2.bb new file mode 100644 index 0000000000..e843293d68 --- /dev/null +++ b/meta/recipes-devtools/python/python3-cmake_3.25.2.bb @@ -0,0 +1,33 @@ +SUMMARY = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = " \ + file://LICENSE_BSD_3;md5=9134cb61aebbdd79dd826ccb9ae6afcd \ + file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5 \ +" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "cmake" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "bcf9f0369743278ec26961542b31ed1610e6f4cfc20c00a3f1c61985abb3b0d2" + +SRC_URI += " \ + file://CMakeLists.txt \ + file://run-cmake-from-path.patch \ +" + +addtask do_patchbuild after do_patch before do_configure + +do_patchbuild () { + rm -f ${S}/CMakeLists.txt + cp ${WORKDIR}/CMakeLists.txt ${S}/ +} + +do_install:append () { + rm -rf ${D}${bindir} +} + +RDEPENDS:${PN} = "cmake" + +BBCLASSEXTEND = "native nativesdk" From patchwork Fri Mar 10 09:54:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 743D3C74A4B for ; Fri, 10 Mar 2023 09:54:38 +0000 (UTC) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mx.groups.io with SMTP id smtpd.web10.15614.1678442073313015206 for ; Fri, 10 Mar 2023 01:54:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OCFEF/O9; spf=pass (domain: gmail.com, ip: 209.85.208.42, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f42.google.com with SMTP id da10so18244923edb.3 for ; Fri, 10 Mar 2023 01:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678442071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aNCoznBFWUyYbr6Cf8QuFEz6cg5GvyEvPHn4+xOK0ts=; b=OCFEF/O9Te3xKsKAiSChCGqJGOFdFq8PD8ixGZGMclLrtOxTyVFIuCtf+0Loastueh 4dQ6PWrpElSSwDY7FsZ4rAAfRKB3obk0zj6/bUeMjmnY46tgmUgbDp2H4AwSxVL9+lUn l8CNeP6t912ghRNC2C27lb63W82hyJWeXS0hIg/CJ3vHTAp2TA7FSlgeMeKKAT6t8NVj qBnJCHW8ieE+S7rVzv1JSzPeYLIrK1sq8laeCLVJ8xQRumgO1xzF9DhIsYRfZgLPU1fU pRFE67ZULwQkVTqJRZFg0/t4r5TkOJqs0mWZhNMeYaiIFatptZGxKbi0dZZenmj/5K58 /sEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678442071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aNCoznBFWUyYbr6Cf8QuFEz6cg5GvyEvPHn4+xOK0ts=; b=G2znh1pudhOnZMsX5aPbM4UOR0YoyIDpqX2uMIU0ZTjVz+gm9NJ/dktTRGAOgR3xeW k9h6kXDl97QlB2Eu2/0Yf+LzGVnAPboqOXuW/IPAAnAlP5B2YCyJix0NAzuhWKW75LMJ v03s70L2A6KzKeDyxX0N77gjiBkXj4CQuMIef0ltuL6HYtpA+bw8bbPYN7aNDq1OO8gq RfScwg7Fyhf9Kf38q/ZP24Z+VFHlY2jCr4h05id+BetYWJaTjIy2Z8/Pji2rN1jD96yH byPTT4bOegxod3ouay5zq+s/sDjZ/T2ECPb21Kxuu4NvFXZQXh+gw6HjDNIwrwh6jrTW uEvA== X-Gm-Message-State: AO0yUKVsjHC9izSyRqslXI7gb+1yxgaI3om6qXwCt7mMk9pXUAurSgWP 2nkPpON9+Sdl6XxlwoXmR7dejzbPwSI= X-Google-Smtp-Source: AK7set8/hDzhbQsaVkDMX9ILC9AXo9625pE4EN4LPeRMhYBtag9/P2vIbZutd8u4uUYii19syWFBGA== X-Received: by 2002:a17:907:868b:b0:907:9bda:93b9 with SMTP id qa11-20020a170907868b00b009079bda93b9mr33882707ejc.17.1678442071281; Fri, 10 Mar 2023 01:54:31 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id kq10-20020a170906abca00b008c405ebc32esm759549ejb.28.2023.03.10.01.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 01:54:30 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 4/4] python3-ninja: New recipe Date: Fri, 10 Mar 2023 10:54:19 +0100 Message-Id: <20230310095419.3487056-5-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310095419.3487056-1-zboszor@gmail.com> References: <174B040A85AB843D.27660@lists.openembedded.org> <20230310095419.3487056-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 10 Mar 2023 09:54:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178319 Some python modules rely on "import ninja". Only build and ship the python parts, and don't download and build ninja from sources. Use the already built ninja instead. The CMakeLists.txt file is a crippled copy from this ninja python module's sources, removing almost everything, and adding a dummy install target, so do_install() doesn't fail. The python code is patched so ninja is used from PATH. Signed-off-by: Zoltán Böszörményi --- .../python/python3-ninja/CMakeLists.txt | 9 ++++++ .../python3-ninja/run-ninja-from-path.patch | 11 +++++++ .../python/python3-ninja_1.11.1.bb | 30 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-ninja/CMakeLists.txt create mode 100644 meta/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch create mode 100644 meta/recipes-devtools/python/python3-ninja_1.11.1.bb diff --git a/meta/recipes-devtools/python/python3-ninja/CMakeLists.txt b/meta/recipes-devtools/python/python3-ninja/CMakeLists.txt new file mode 100644 index 0000000000..04fa451e72 --- /dev/null +++ b/meta/recipes-devtools/python/python3-ninja/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(NinjaPythonDistributions) + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH}) + +install(CODE " + message(STATUS \"Install ninja project\") +") diff --git a/meta/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch b/meta/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch new file mode 100644 index 0000000000..26bd037373 --- /dev/null +++ b/meta/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch @@ -0,0 +1,11 @@ +--- ninja-1.11.1/src/ninja/__init__.py.old 2022-11-05 09:49:23.000000000 +0100 ++++ ninja-1.11.1/src/ninja/__init__.py 2023-03-10 09:45:13.452082888 +0100 +@@ -44,7 +44,7 @@ + + + def _program(name, args): +- return subprocess.call([os.path.join(BIN_DIR, name)] + args, close_fds=False) ++ return subprocess.call([name] + args, close_fds=False) + + + def ninja(): diff --git a/meta/recipes-devtools/python/python3-ninja_1.11.1.bb b/meta/recipes-devtools/python/python3-ninja_1.11.1.bb new file mode 100644 index 0000000000..64f5c5c32b --- /dev/null +++ b/meta/recipes-devtools/python/python3-ninja_1.11.1.bb @@ -0,0 +1,30 @@ +SUMMARY = "Ninja is a small build system with a focus on speed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "ninja" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "c833a47d39b2d1eee3f9ca886fa1581efd5be6068b82734ac229961ee8748f90" + +SRC_URI += " \ + file://CMakeLists.txt \ + file://run-ninja-from-path.patch \ +" + +addtask do_patchbuild after do_patch before do_configure + +do_patchbuild () { + rm -f ${S}/CMakeLists.txt + cp ${WORKDIR}/CMakeLists.txt ${S}/ +} + +do_install:append () { + rm -rf ${D}${bindir} +} + +RDEPENDS:${PN} = "ninja" + +BBCLASSEXTEND = "native nativesdk"