From patchwork Tue May 24 11:46:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16025 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E0AAFC3278 for ; Tue, 24 May 2022 11:46:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4AB2965694; Tue, 24 May 2022 13:46:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653392816; bh=7pmVMp5PW1ecMtR5ggP9gGJEZqiuysjK3w7X+uzXjzg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HYkoEsaw2U3xF8XNUqglTgq7sXwnS7jL64DtnlU16DXpjJgv4dUMchKS1j49qyEFv jirRbzI+iOxwVp95gP6jZebh5F4ZOvSMzvGYn3Htx1Cmd5BHiDDgj20Ov40oGto0cu OWfngh9In2cYGvPlA5bUgi0P9Sjv0Rm+VmEru6uQ4IXvbsMIfwZighfLa2DSDt7Wmn OSMDz+BHzIA9b8I7Ww+tK5ERFgNo0jNua8YYam/Vav3ec09GrUmvlJRqTyE5QCz1Wx B789dJtun+hpCiWhfLhBLrBHoStsag7upNKxlvt/CTx4CKX/UW61M1ScQj8fSLS4ac 5TVH+qOHYtzKQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E20B065688 for ; Tue, 24 May 2022 13:46:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="AeEFjaVO"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7B17BAEC; Tue, 24 May 2022 13:46:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653392799; bh=7pmVMp5PW1ecMtR5ggP9gGJEZqiuysjK3w7X+uzXjzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeEFjaVOw+u1/1GuwctIpHio/k8X47ipPWONlVLF1NikrQGquqjHn5Dlt82EpqFX5 vmMhK0Tzeum3zqoQVhrlU/dYTXBrxwaXmoAF3YdE16iaezPBjSvhViwZdBcB4atclR kZZ1t+JvJuJjLk2eZY9SRBUrFOUEQS607HpoQ9xg= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Tue, 24 May 2022 14:46:10 +0300 Message-Id: <20220524114610.41848-20-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220524114610.41848-1-tomi.valkeinen@ideasonboard.com> References: <20220524114610.41848-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 19/19] py: Use ln --relative to create symlinks X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" We create symlinks from the Python bindings build dir to the source dir so that 1) the build dir can be used to use the bindings, and 2) to allow modifications of the source .py files to be used right away without rebuilding. The symlinks were recently fixed and changed to use absolute paths. However, absolute paths ruin one main use case I have: using the bindings from the build dir via nfs from an ARM device. So move back to relative paths, but accomplish this with the --relative parameter for ln, instead of guessing the right relative path as was done before the above-mentioned fix. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- src/py/libcamera/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index e0010353..3219d3df 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -84,11 +84,11 @@ pycamera = shared_module('_libcamera', # Create symlinks from the build dir to the source dir so that we can use the # Python module directly from the build dir. -run_command('ln', '-fsT', files('__init__.py'), +run_command('ln', '-fsrT', files('__init__.py'), meson.current_build_dir() / '__init__.py', check: true) -run_command('ln', '-fsT', meson.current_source_dir() / 'utils', +run_command('ln', '-fsrT', meson.current_source_dir() / 'utils', meson.current_build_dir() / 'utils', check: true)