[{"id":23193,"web_url":"https://patchwork.libcamera.org/comment/23193/","msgid":"<YpCt9iA6GGrs2Dgo@pendragon.ideasonboard.com>","date":"2022-05-27T10:54:46","subject":"Re: [libcamera-devel] [PATCH v2 19/19] py: Use ln --relative to\n\tcreate symlinks","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomi,\n\nThank you for the patch.\n\nOn Tue, May 24, 2022 at 02:46:10PM +0300, Tomi Valkeinen wrote:\n> We create symlinks from the Python bindings build dir to the source dir\n> so that 1) the build dir can be used to use the bindings, and 2) to\n> allow modifications of the source .py files to be used right away\n> without rebuilding.\n> \n> The symlinks were recently fixed and changed to use absolute paths.\n> However, absolute paths ruin one main use case I have: using the\n> bindings from the build dir via nfs from an ARM device.\n> \n> So move back to relative paths, but accomplish this with the --relative\n> parameter for ln, instead of guessing the right relative path as was\n> done before the above-mentioned fix.\n> \n> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/py/libcamera/meson.build | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> index e0010353..3219d3df 100644\n> --- a/src/py/libcamera/meson.build\n> +++ b/src/py/libcamera/meson.build\n> @@ -84,11 +84,11 @@ pycamera = shared_module('_libcamera',\n>  # Create symlinks from the build dir to the source dir so that we can use the\n>  # Python module directly from the build dir.\n>  \n> -run_command('ln', '-fsT', files('__init__.py'),\n> +run_command('ln', '-fsrT', files('__init__.py'),\n>              meson.current_build_dir() / '__init__.py',\n>              check: true)\n>  \n> -run_command('ln', '-fsT', meson.current_source_dir() / 'utils',\n> +run_command('ln', '-fsrT', meson.current_source_dir() / 'utils',\n>              meson.current_build_dir() / 'utils',\n>              check: true)\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E7709BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 May 2022 10:55:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9CEBC633A2;\n\tFri, 27 May 2022 12:55:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 12112633A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 May 2022 12:55:05 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [46.183.103.8])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 98B2831A;\n\tFri, 27 May 2022 12:54:59 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653648906;\n\tbh=7aq9+D2DU5WFCQ2psK6QF/7fD/6qG2xWwYTzUGAVXWY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=FIjKGNvj27OdF7+OGn2VDFipMXgzREsScLsSBIJfxp1B6XBq+5712H/YPiB+xrxQh\n\te4Qzd5s02DKk3Wiox6G7jtWa8p4XWt7jcWy3tKEGEteXcYi4s0rWPYrG3bT0FbgqfA\n\tFuy+PASBzqxyOgc62gx0pRQI15pFnSGfnzP7eNKQ0yQ3yovOBrO3U1CNDDKBbRXv61\n\tjv0g0BzpuBCSiqEOcITrWIxbqXGR/s32KWu6Gbb5woHXkHRXcID2jYYbz7Z6l0iS3F\n\tgkdrLWdtENNlPPW4ITr7DHpSiXP8L5EV+quSYu38KAXIYdh5MhOQEcxuBqqO6S8gXD\n\tSjhOsqZk2AzLw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653648904;\n\tbh=7aq9+D2DU5WFCQ2psK6QF/7fD/6qG2xWwYTzUGAVXWY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CQZZs+DULWlicBDvsegOa0czRiAKzwXITFLxHWJeG5CzqFKJU73UNZR0ifg04ACyS\n\tVf/kRXBQloWyhP9qHUoJY18GyOc6ItBRj4g3BJiFnGB0YFEGpuVTshxn05hDvq8OGo\n\tMgDfCyVNeqLZ8mJll9rfWkt6U5q23bA+D0ZgRyF0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CQZZs+DU\"; dkim-atps=neutral","Date":"Fri, 27 May 2022 13:54:46 +0300","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<YpCt9iA6GGrs2Dgo@pendragon.ideasonboard.com>","References":"<20220524114610.41848-1-tomi.valkeinen@ideasonboard.com>\n\t<20220524114610.41848-20-tomi.valkeinen@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220524114610.41848-20-tomi.valkeinen@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 19/19] py: Use ln --relative to\n\tcreate symlinks","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]