From patchwork Sat Jun 15 11:12:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zach DeCook X-Patchwork-Id: 20327 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 94EA1C3237 for ; Sat, 15 Jun 2024 11:13:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2428D65490; Sat, 15 Jun 2024 13:13:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=librem.one header.i=@librem.one header.b="K22jCaiD"; dkim-atps=neutral Received: from mx1.librem.one (mx1.librem.one [138.201.176.93]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EDCF565490 for ; Sat, 15 Jun 2024 13:13:06 +0200 (CEST) Received: from smtp.librem.one (unknown [192.241.214.14]) by mx1.librem.one (Postfix) with ESMTPS id EDE7C81EF4 for ; Sat, 15 Jun 2024 04:13:05 -0700 (PDT) Authentication-Results: name mx1.librem.one; dmarc=fail (p=reject dis=none) header.from=librem.one From: Zach DeCook DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=librem.one; s=smtp; t=1718449984; bh=QwfxGLcrZ7+MXtyISJ6hEERzL6LJGw6QYKAiD20Yb6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K22jCaiDUnYDUbSZaVtzVQWnQ+BNR+ly664y5CnSfRE31BigG82eC7kmbDTOhcf/J jtvxfkz1WQcvRYdbkmC5Fs/1KbbMAVDf8EafzVusHbh8kVHMdDz5dfWoUiQZ6PQDht 9lcs0pylnFZ3G9WR3e0sl0sPDoa2PcertIYMe0/Mrhjd9fs4BeiSlQt3Zz0lMHg6oh HVkqxrFGm9VNK+7Yr9iMGuGq649ljN9W766dQVW/iEJUSyCwxPS04kZHLImeB8Faqu +8jJZahiJ+CqwlNq6TWdnzsn3OpBlOcD/R+nQ15eybAiPm0xmXticlQBOPI+d6ttdn CGv5G1Pzxzc6Q== To: libcamera-devel@lists.libcamera.org Cc: Zach DeCook Subject: [PATCH v2 2/2] build: use meson fs.relative_to for making relative symlinks Date: Sat, 15 Jun 2024 07:12:44 -0400 Message-ID: <20240615111244.4573-2-zachdecook@librem.one> In-Reply-To: <20240615111244.4573-1-zachdecook@librem.one> References: <20240615111244.4573-1-zachdecook@librem.one> 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" -r flag is not supported by e.g. busybox --- src/py/libcamera/meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index 4807ca7d..74c861fc 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -97,12 +97,13 @@ 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', '-fsrT', files('__init__.py'), +relative_target = fs.relative_to(files('__init__.py'), meson.current_build_dir()) +run_command('ln', '-fs', relative_target, meson.current_build_dir() / '__init__.py', check : true) -run_command('ln', '-fsrT', meson.current_source_dir() / 'utils', +relative_target = fs.relative_to(meson.current_source_dir() / 'utils', meson.current_build_dir()) +run_command('ln', '-fsT', relative_target, meson.current_build_dir() / 'utils', check : true)