From patchwork Fri Mar 10 13:46:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 20757 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 89D0CC64EC4 for ; Fri, 10 Mar 2023 13:46:49 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web10.19289.1678456001642684665 for ; Fri, 10 Mar 2023 05:46:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YVbSU/i/; spf=pass (domain: gmail.com, ip: 209.85.208.43, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id a25so20817318edb.0 for ; Fri, 10 Mar 2023 05:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678456000; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PFB4XGcxdqdLUF66XOU3Ms3ebhv8FF8WJ3PmXey7L3Q=; b=YVbSU/i/omGBf4CrkL1T8cdo7u7rkKg5k3skLKB80cnmmc0688Rp+E/wd+7s7eZoQn hpGFnHaEnJag7vINUQniAOxepLDvA1V0Pt3KYGhc0AkazVe48TGGAYCoXUvI1oP4t4YR SCl8L68QLD+H8YypFb8FD0+LjMDISYeYp1qnWXG19MdiTYT8ep30EJn7fp6FmkFYyHRN zhSUl0rmbFtWJgs8n34aHmFsAavxILXPS+shHZwgXvjBqaF/uxziqnxywFJdA5PjK1uW e/t1Fe+4Fi9vasi43Shic9IQ+vSntSZh5Q3lAshrFkgE5Ngif55nQu9LOK9qSNAZAbCh 7T5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678456000; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PFB4XGcxdqdLUF66XOU3Ms3ebhv8FF8WJ3PmXey7L3Q=; b=UqWfvY6Zu41M1YszztEWeeCuB1+EXfIIpnE90m8I6EoWiubqZ9MIjl+i+2oMWU7ELb usrhoPuyuLU4e1HxDI4KtowneYzh0kX/r5rr8UrsPCR6DifNSKrxvxr7Mi1F4LLMl3dx It36RWhfZkecMjWnpu7cwyTxDhW1++VY7wRGlUXGtIUZ/OkBLcdI+xWv4D33X6xzeEfD wXqXk/CDaMTujrJvtIXpY0NSLS4AbHeATbtoAXHBSFBoSDucEeZ80fIkOhWI68cxzM0u 8qjZgtUY5xVRh//Q1+1vGfefQApgC4LX1de7QN1b+0quPOAhKGY7dAWRHf2uSMdVID9I yPTg== X-Gm-Message-State: AO0yUKX9rF3XmeEH+QB3e1RjTq14D0NNDr8yiXxaGSzT2khzLfNE2sod fydVjf7goxZm0cSI91yFHWo7jOzPXTaeqQ== X-Google-Smtp-Source: AK7set+j6e/KojujKjhAyXMZwKuG2CXARzEGKVLe8Buv1tYICBUjn6dkYqB2dk/ZmiQgyUU/dXRWcg== X-Received: by 2002:a17:906:49c1:b0:878:5524:e932 with SMTP id w1-20020a17090649c100b008785524e932mr27067157ejv.5.1678455999936; Fri, 10 Mar 2023 05:46:39 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id o26-20020a1709062e9a00b008b17fe9ac6csm980198eji.178.2023.03.10.05.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 05:46:39 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-devel@lists.openembedded.org Cc: Tim moto-timo Orling , Derek Straka , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55?= =?utf-8?b?aQ==?= Subject: [meta-python][PATCH v2 1/3] python3-scikit-build: New recipe Date: Fri, 10 Mar 2023 14:46:35 +0100 Message-Id: <20230310134637.108312-1-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 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 13:46:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/101489 Used by python3-cmake and python3-ninja. Signed-off-by: Zoltán Böszörményi --- v2: Fixed BBCLASSEXTEND .../python/python3-scikit-build_0.16.7.bb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb diff --git a/meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb b/meta-python/recipes-devtools/python/python3-scikit-build_0.16.7.bb new file mode 100644 index 000000000..c033c56ba --- /dev/null +++ b/meta-python/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 13:46:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 20756 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 89D64C6FD1E for ; Fri, 10 Mar 2023 13:46:49 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web11.19276.1678456002340195404 for ; Fri, 10 Mar 2023 05:46:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WnUvl2ce; spf=pass (domain: gmail.com, ip: 209.85.208.41, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id cy23so20518886edb.12 for ; Fri, 10 Mar 2023 05:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678456000; 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=OaKt+z7tybttKAw8kIF38Y5Vla/v06MNyNCW5h3/uuk=; b=WnUvl2ce3tXcg222/8tdLiOn+6g1e6p7MopeUoioXOUx1uLt9JBk+IMhlwkhBrq2EO VRQugXhSYMNd8UX2ri/awWugNsxAaW+pRHbbBoCGO0szvFU5cMWqcwOspcsAu1J/Qgnk 3OQvkPPxaN0trU75juG3XuW89pCghxvLDnfJQ+/dSKngcMrXx1KD9a5G1iJKunPRFymy eFkh2wrJ8q0SQBUJYNrQD9XHKkb96p08n0BzC2C+xX0DGnYkxEmSdAOmvsDF4GLpeNSk cD52lPRS5H7fgEUjLd+FM0DaRfqJT3YO4Y4b142wzz+IJCKKyCI1U0OA6FQJQ9Ene9zP k0BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678456000; 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=OaKt+z7tybttKAw8kIF38Y5Vla/v06MNyNCW5h3/uuk=; b=VhNZ6pHd6Vjh5qPrQ8hpRuXPZNW5W16CF7PAne3qopCfbCjaz4GsCGEZ3uXcd+Nt5B 5aHXR0KSGQnf+00z7bjalBDCHNZqk2ISZ/NwlPx59B7goZrEEh7aSZydcV1xd5K4VPEP qDdTwv8Zf4zSr4ECDd57JChubTHXlAAhqdSlLn6ESVJbF6Z78ikr+mEJyVDCQhE68Gbu ymGAfZPZY6AhYKAfckFbI3FnRS24dF/pM4YcN8bRHaajEKr+XPjqRzEm1m4x6nzSn0lT yfgRZg6aWIxL6Ziusr5XKrk0wtZTMKJCUdWMXMYQTvzTdHIZx7AH+jziKxj5xduQqH7n ylWQ== X-Gm-Message-State: AO0yUKX3u6OGjSL18G4NX+CuvZKdzjV8hLCf8LtUXH29CbTtLFGIJaP4 VtUJJOjqZ/g/0/MU/WyP+/CWYBYlFciHDg== X-Google-Smtp-Source: AK7set8d6wTDUJqcF4AimJ6ZxNOv8pqRVWShnheK4XoCGJPZaoCRnd/2sIouqvBv5FDsqhK4U9BQZQ== X-Received: by 2002:a05:6402:188:b0:4a3:43c1:8430 with SMTP id r8-20020a056402018800b004a343c18430mr1760697edv.4.1678456000518; Fri, 10 Mar 2023 05:46:40 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id o26-20020a1709062e9a00b008b17fe9ac6csm980198eji.178.2023.03.10.05.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 05:46:40 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-devel@lists.openembedded.org Cc: Tim moto-timo Orling , Derek Straka , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55?= =?utf-8?b?aQ==?= Subject: [meta-python][PATCH v2 2/3] python3-cmake: New recipe Date: Fri, 10 Mar 2023 14:46:36 +0100 Message-Id: <20230310134637.108312-2-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310134637.108312-1-zboszor@gmail.com> References: <20230310134637.108312-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 13:46:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/101490 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 | 37 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt create mode 100644 meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch create mode 100644 meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb diff --git a/meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt b/meta-python/recipes-devtools/python/python3-cmake/CMakeLists.txt new file mode 100644 index 000000000..8ba81970f --- /dev/null +++ b/meta-python/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-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch b/meta-python/recipes-devtools/python/python3-cmake/run-cmake-from-path.patch new file mode 100644 index 000000000..5c38fadce --- /dev/null +++ b/meta-python/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-python/recipes-devtools/python/python3-cmake_3.25.2.bb b/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb new file mode 100644 index 000000000..d0e11f9a6 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-cmake_3.25.2.bb @@ -0,0 +1,37 @@ +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" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-" + +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 \ + python3-scikit-build \ +" + +BBCLASSEXTEND = "native nativesdk" From patchwork Fri Mar 10 13:46:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 20755 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 97931C6FA99 for ; Fri, 10 Mar 2023 13:46:49 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mx.groups.io with SMTP id smtpd.web10.19291.1678456002981983929 for ; Fri, 10 Mar 2023 05:46:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mj5B+jzw; spf=pass (domain: gmail.com, ip: 209.85.208.53, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id a25so20817558edb.0 for ; Fri, 10 Mar 2023 05:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678456001; 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=892xQiXIHyGl7fnt1P6uNmJqdGQ9J+piZbcxNFOh/Hw=; b=mj5B+jzwRoMPsYhKW03ZOjvp2YlREFqCVYsXGuikvxQTQcJ3sV533UQG3r1a9Iphur H106HnfZYaFp4kIFHtt0jieVMHh+EobQV19q+bTyAHuzg89wGMV1Qu+BvtESIYQczV4U l/k6WKR0pxRsc7CCG0D+m5RT3JEJ+M9BiYmzErRmpixsZm0FUW4OBvNBgJjY6yHcY+7+ GMpk/Dd8TKiKn6FTKFg0jvlDvreTyLJ7qhu0XTXelsVEZE1qxzEoFJa37RY541zB3LNm kwg5+192g+NyvwSLZn5Y4LcAZfikpxtQ6K0i9mpRFSwb7zHExbHvDm8UklehV8jMf7yo DY9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678456001; 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=892xQiXIHyGl7fnt1P6uNmJqdGQ9J+piZbcxNFOh/Hw=; b=E3hjMjT+NWNTHYXkatuFbFnjTzGcpoE0MZJf4ae3ygzsOX4pN9WH/oZcOTqN2EviGx KAfUFpMfx+Zv+C27XD/XKX7sYMRvhKAho25D6XLBvn0VwD4hEiMfEBcDL5AcpKD3Fv36 TST8ftpHpqlasEh2wXNEVuAxtNMqqxPHeLByGFybgHq/Dp3y4+PUTVyKkF0MhHYGCEc8 a4qHmLfAl6hIudy3RIwI6JvusX6CReYsx4o+7zLO8w4y7mZNu0W1koaEg8R2vXV2ltaS 93zLlyobx+/6Y1DMCp/d9Wr8BEeP7pECkTVzmIZN9ybETXOoVpaDMflsaNHZ1A+aR0gz CqTA== X-Gm-Message-State: AO0yUKV6cbcWmu3tCuGuWKlTqlcDp4PYFr30269SUfzzPu3Ky8+t9ZP7 T99mezUkGHqZdlB8CFMeYSxZofy2OUckNg== X-Google-Smtp-Source: AK7set+LiImulcavHa6BCvhkvIC2zXkV/TzRG7fafwoBgg/BCI5EMnCALAuofsQ6+6dZPo5VhRGZqA== X-Received: by 2002:a17:907:7216:b0:86a:316:d107 with SMTP id dr22-20020a170907721600b0086a0316d107mr33166560ejc.72.1678456001253; Fri, 10 Mar 2023 05:46:41 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id o26-20020a1709062e9a00b008b17fe9ac6csm980198eji.178.2023.03.10.05.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 05:46:40 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-devel@lists.openembedded.org Cc: Tim moto-timo Orling , Derek Straka , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55?= =?utf-8?b?aQ==?= Subject: [meta-python][PATCH v2 3/3] python3-ninja: New recipe Date: Fri, 10 Mar 2023 14:46:37 +0100 Message-Id: <20230310134637.108312-3-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310134637.108312-1-zboszor@gmail.com> References: <20230310134637.108312-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 13:46:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/101491 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 | 34 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt create mode 100644 meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch create mode 100644 meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb diff --git a/meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt b/meta-python/recipes-devtools/python/python3-ninja/CMakeLists.txt new file mode 100644 index 000000000..04fa451e7 --- /dev/null +++ b/meta-python/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-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch b/meta-python/recipes-devtools/python/python3-ninja/run-ninja-from-path.patch new file mode 100644 index 000000000..26bd03737 --- /dev/null +++ b/meta-python/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-python/recipes-devtools/python/python3-ninja_1.11.1.bb b/meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb new file mode 100644 index 000000000..635fd076a --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb @@ -0,0 +1,34 @@ +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" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-" + +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 \ + python3-scikit-build \ +" + +BBCLASSEXTEND = "native nativesdk"