From patchwork Fri May 27 14:44:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16088 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 E68FCC3256 for ; Fri, 27 May 2022 14:45:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6DDCF65698; Fri, 27 May 2022 16:45:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653662729; bh=AcfzRhTB4PZcNAUcD0JfUuGlTuBR72Av7afYHoJuei0=; 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=JMNXpP6VBTsHYXW3RixR14sJnl6X+kJtIXHYzJ+cIES4Fc9lz6Kq8oLyh5/7oRQr5 CqxKHbIsupa8gtDWrjm9oz8bQ3X8+enKaWqB9cKZ4gzAoqCapqWulwfxjzQAgbua35 Wkf3ruczoFO4mC6mBph9IrdMNQBiwmYmZ7MgoPxqCZsIDan5mlSLf+eUgnP/SGhyEj 46tIUV0bru8j+dnzdV1Wn5Z4bS0bcykjGvxXY7qUpgQCdjgvYUms4fwcRT482DwL9s M1Rx0p2W2lHQNtKnEGdwjyNf+oA1XsHLeDT6xBoXW9qU0C6YmkXwM92dJak5aOk2rf TJ5jcT62AVcqQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C638D6564A for ; Fri, 27 May 2022 16:45:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LAzqLM9A"; 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 37DA132A; Fri, 27 May 2022 16:45:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653662712; bh=AcfzRhTB4PZcNAUcD0JfUuGlTuBR72Av7afYHoJuei0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAzqLM9AL3REozNcZNWcHVd+4jVLGDjwoJwuFHYTU+4qgzGbfp3o6eNmZaYLZ7BGk MwKYndZa+pdaIqM9B5Hzqf2RLY5nT2UEvs98p8dTWw+zOSPNZMumuYueA8cWwSgZSl I3yJU//3CNNzRqLcrT3no+l0RuUv7VoMi2UBBLbU= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 27 May 2022 17:44:33 +0300 Message-Id: <20220527144447.94891-17-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527144447.94891-1-tomi.valkeinen@ideasonboard.com> References: <20220527144447.94891-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 16/30] 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 afa7efed..eb884538 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)