From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kDXqBNQkKWGvGAEAgWs5BA (envelope-from ) for ; Fri, 27 Aug 2021 19:45:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +Eh4ANQkKWGDZgAAbx9fmQ (envelope-from ) for ; Fri, 27 Aug 2021 17:45:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 970ED1A279 for ; Fri, 27 Aug 2021 19:45:55 +0200 (CEST) Received: from localhost ([::1]:58594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJfvO-0002Pi-MM for larch@yhetil.org; Fri, 27 Aug 2021 13:45:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJftL-00028R-5O for guix-devel@gnu.org; Fri, 27 Aug 2021 13:43:47 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:42960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJftI-0008DW-NB for guix-devel@gnu.org; Fri, 27 Aug 2021 13:43:46 -0400 Received: by mail-wr1-x42c.google.com with SMTP id q11so11587713wrr.9 for ; Fri, 27 Aug 2021 10:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=YYPnDgdsORlU4xycSl3WA68/W5I/yATgAcejm1+3y3c=; b=GFLra9hr+LDnBMGR7ai3nUZn+gw5BcKZvX7Q6Sbs6sH/9uGX3YMW+W1zfkUyDQSY3k lmq05l1WQJTqjJ0/osyd9HGMw6drW2mNb108VXVyY328O+qDSwq8g7mRyrZ+qZH13iUl jY4yKPXfA6YpQ5wcHfSWJyb4WtDLr7PJ2QIyxEFHlcZN4XSGn7KI1ipJR5DqDXAUJ4D5 lL6XN1RL9xU59hYVMsbXjKPmJgfcY4lSBSS8NsITnVD2e6CH/dhbqgL2u9DBQQu0VG+A J5L3sp5zv8esfiqnSzKhyuhfXrQlWn3Ru+gJS4a/3F4670K5qyxLlg/K98MFO2ZpzzP7 yIeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=YYPnDgdsORlU4xycSl3WA68/W5I/yATgAcejm1+3y3c=; b=VWK0ajVre7lwUT0ONddR1Rvm3Y2Bv2rjJh4FA+KcY9IwFkGNkO2X581AhRoVDIRHI4 L7Wgklfgg1awQ5w6tc/phwqQC+MQIRlTW52F2GZYT4ZKktG1V1GVuwjx1IM7LMPoyXV6 TeBJVK3f0OdwOgekXc8pp5hZINhoQm2X0FnaO7PpnIXj/UXCo7jSZwMi40qI4IO2f/dH mEuzwX6xyoZbrSxCFua1iiVdsSE5mhD7b6dqc8QjX6mHk9qBN7iehEl4w8Yj9v3YJIUt nQCcjqCW38Xgm2EhHBy398s5NSC3Tk1fGaU4+sKQKT984eveI/Fp33DaHeRTxUU8H0dD 78Pg== X-Gm-Message-State: AOAM532rIabwKXDGH/c+boSPZffQWG6bJ3M+gk5RAS8Gru8dYJ5Z6Qd+ LeRh7SnhRfPgRffTHD6Bz8fmkkRRtCYW3g== X-Google-Smtp-Source: ABdhPJxqE4YKDXVYN+ZD76Wl5pgEan3vQYroWBna6QWcwwhha+KL8tx2mPm3sqb64R0uOdyysyT57g== X-Received: by 2002:adf:dd11:: with SMTP id a17mr11655398wrm.132.1630086221988; Fri, 27 Aug 2021 10:43:41 -0700 (PDT) Received: from nomad-lp1 ([31.142.89.82]) by smtp.gmail.com with ESMTPSA id k14sm6859036wri.46.2021.08.27.10.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Aug 2021 10:43:41 -0700 (PDT) References: User-agent: mu4e 1.6.3; emacs 28.0.50 From: muradm To: Antwane Mason Subject: Re: How to Write Empty File in Build Phase? Date: Fri, 27 Aug 2021 20:39:36 +0300 In-reply-to: Message-ID: <874kbadbqt.fsf@muradm.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: none client-ip=2a00:1450:4864:20::42c; envelope-from=mail@muradm.net; helo=mail-wr1-x42c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 27 Aug 2021 13:45:35 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630086355; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YYPnDgdsORlU4xycSl3WA68/W5I/yATgAcejm1+3y3c=; b=KA0YjszQaZZxT6gWXV3UjydnKn3Fgs4oZXxLvvfvLrsDvrA4zEyZ09VqpXeAaYWiC7n/3r xY9EG63hzy3j/FidS62s6HK9pw10HIJPKdk83v0EoqB3tPHVJo6KOGzcHI/Ge5otK+ZzV4 Z4uXYB0q1NWCzQn8dkYE2V3I6a2EqHP18989jxkz0gbKIs5f0umMg4TAUVKC+9kDFY2RDo E+Ff/Bkgfqv1VNyr1Nl/NUCUDE/fMzaRFjPAZGjydLXTW+cfwLm74Rr2e7SXEvnhYlzydc 9qymRUaMQYrbNhhM/zh5Y3q86Y+k3M+NIR2qGvovXIGdl6uinFuVnPJPKtFX5g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630086355; a=rsa-sha256; cv=none; b=VZO4dMO5LMjsntA5Ve0UR6qmRNj+kaadbja9mMLBE9TGeaUvP32zDX/n72Ty9P3gbaHMMh +f0fkk+26fW+3r8WK+p9cE3jAnw1G/R7C3tg/tXfJ26lnEUZEWGjjsczzaCbe/y6T392AI Uy4XmKWcHSL7Pwg7hgrKhqdZ3oVuwD07gtGIj6t1J4Y4NITgnF27TJfjl5O4Fkey9dWJbB Oy8W7nE6Dk4mUGhPgNmEZ9j8geAmLJazyvgFEcHkoEbrNXNmu3yxaW9SyCAVDQJ8M2uoc5 m1/deQWTdG4qb8mF1MqM8euxdeFgmuES+Vuu0RaqZG803YFxRHbEY74/Iwu5rg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=GFLra9hr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=GFLra9hr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 970ED1A279 X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: +5pYvwnTuj6s May be something like this? (e-mail adhoc typing, may require fixing) (define-public python-verspec (package (name "python-verspec") (version "0.1.0") (source (origin (method url-fetch) (uri (pypi-uri "verspec" version)) (sha256 (base32 "07n06wv85fm4vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64")) (modules '((guix build utils))) (snippet '(with-directory-excursion "test" (with-output-to-file "__init__.py" (newline)))))) (build-system python-build-system) (native-inputs `(("python-coverage" ,python-coverage) ("python-flake8" ,python-flake8) ("python-mypy" ,python-mypy) ("python-pretend" ,python-pretend) ("python-pytest" ,python-pytest))) (home-page "https://github.com/jimporter/verspec") (synopsis "Flexible version handling") (description "Flexible version handling") (license '(license:asl2.0 license:bsd-2)))) You can use (snippet of (origin, that allows pre phases actions on source before any build steps/phases. (with-directory-excursion will basically "cd" to "test" directory, (with-output-to-file will open file named "__init__.py", (newline) will write empty line to just opened file. Antwane Mason writes: > Hello, > > I am currently working to resolve a build issue of > python-verspec with the ultimate goal of submitting a package > for this > package, onlykey-cli, and all other dependencies required for > onlykey-cli. Onlykey is a hardware password manager, second > factor authenticator, and private key storage manager. A working > solution to the build problem is to include an empty > __init__.py file in the test folder of the source code. How do I > write this file during a build phase? > > Here is the package definition for reference. > ----------------------------------- > (define-public python-verspec > (package > (name "python-verspec") > (version "0.1.0") > (source > (origin > (method url-fetch) > (uri (pypi-uri "verspec" version)) > (sha256 > (base32 > "07n06wv85fm4vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64")))) > (build-system python-build-system) > (native-inputs > `(("python-coverage" ,python-coverage) > ("python-flake8" ,python-flake8) > ("python-mypy" ,python-mypy) > ("python-pretend" ,python-pretend) > ("python-pytest" ,python-pytest))) > (home-page > "https://github.com/jimporter/verspec") > (synopsis "Flexible version handling") > (description "Flexible version handling") > (license '(license:asl2.0 license:bsd-2)))) > ----------------------------------- > > Regards, > Antwane