From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8Fi1AdguKmHkWgEAgWs5BA (envelope-from ) for ; Sat, 28 Aug 2021 14:40:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sILBONcuKmHSCwAAbx9fmQ (envelope-from ) for ; Sat, 28 Aug 2021 12:40:55 +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 300762A4A for ; Sat, 28 Aug 2021 14:40:55 +0200 (CEST) Received: from localhost ([::1]:59244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJxdm-0000fm-9m for larch@yhetil.org; Sat, 28 Aug 2021 08:40:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJxdU-0000el-47 for guix-devel@gnu.org; Sat, 28 Aug 2021 08:40:36 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:37719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJxdS-0005GV-DF for guix-devel@gnu.org; Sat, 28 Aug 2021 08:40:35 -0400 Received: by mail-ej1-x62a.google.com with SMTP id h9so20033567ejs.4 for ; Sat, 28 Aug 2021 05:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ejTOYJgbDPttmunWAee7kdgsyGUrnkcE/L2Fsvw8JuE=; b=FFGMEHOXyn+RjeQUV6OT4xM9FGHvynzXxlkOy7C5/t32kdEsjEsgipQb1sL+GAnHxC g9ty99xjFSWaoS+kQLQUZnwjkd3Lyy9sHEb6gmd00dwKY7iT+IsXSrI9sQyBbc6OUscH 3wWNGgR5ItD4GE59/qsUKhWH/DaVpG9aVgvomKODCeujebRBJU8neewFr/U9/94F30oT xbkmG9IIg79xCglMkOZnVhyhdeUTotGUXyUPX/aATHkfqJvSsafU9coT4E8Nj8/rjN0D EAAIsGcCEeUpUZnhTFCZqk7dD9Q9gIRhg9E8/r2ntT7bqDxJJHrnsQBgTMkZ+Cm8+dwc NsRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ejTOYJgbDPttmunWAee7kdgsyGUrnkcE/L2Fsvw8JuE=; b=nbna12aWG9/+aTfZ518laGO5m8SJvSCMMFN8aqyTBIqRwhUrGUv7jFhThtTKtVW+rk HMlveurqr2Z2Z0zeKxZpqOxRNhxLxOhotD/YMZAevfNvDlS9D21uq4LmpiItetljOG21 VUFn1fl54r2OfiyOhaThYSOj0MNZ8GrMBg7Sq6NXDjxzurbULmAmW5MCvTuWJnyRTo5X g3ZQEi36NS9U7S2hk6AksRj1YsBfgtYYFWhAKFtdbsoc5eIIegaxgP27hg/7g/O14Ukj kkfn+edgWq6Upuxkjh9fNnBwkL6DZu+/PtDRRtyZ1OD+/UzqOLxIeagaC3aCS4sMNQ9T 3QyA== X-Gm-Message-State: AOAM5319aJTf+pFH9Wv1GFnUw+OuLoA+SAY48QU/NVOWDMYZclTCml/B bX2D6T56JYTXykkNhuGfbnSu8J50u404Zw5xCMk= X-Google-Smtp-Source: ABdhPJw069t7FtJAFWOOuJNe89VNlqy/6VZGQGIvwRTzgUca1Y+D6Zy0KZYmAjHzM8qcmi++u1ze0VxJD0m1Rgdv5Q8= X-Received: by 2002:a17:906:4943:: with SMTP id f3mr15028939ejt.102.1630154432622; Sat, 28 Aug 2021 05:40:32 -0700 (PDT) MIME-Version: 1.0 References: <874kbadbqt.fsf@muradm.net> In-Reply-To: <874kbadbqt.fsf@muradm.net> From: Antwane Mason Date: Sat, 28 Aug 2021 08:40:21 -0400 Message-ID: Subject: Re: How to Write Empty File in Build Phase? To: muradm , guix-devel@gnu.org Content-Type: multipart/alternative; boundary="000000000000e2b59705ca9de7b9" Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=ad.mason1413@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , 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=1630154455; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=ejTOYJgbDPttmunWAee7kdgsyGUrnkcE/L2Fsvw8JuE=; b=j6J7MOOHIxlbmlz4D0b7ifCKMievTYUxOiOmSbf6xkfXP3pwMZsMGWZWb4wNndEl5vvomt oyNwbnncCf4GX849Z8IVKIxoFJJRbKLVWtgKgewzQo1x9EDP+TtDhL0rIsbw1ThhFHND5P TI2SWY5LGrlO8z9qtquyK3xILEmUQpzorxBkMlko2MT8k85ZZclVeG6VwGe4O9B1zHAYoU 0X2GRe+D7+qkqpVTjC3f4FR5sKP4DpZsnwfiNJN+GBzJHyZCiMpcKtJEIkcG4Rd5FJ7Dfe ufzF5Cys4LWtGw3fbDyVuIBCmanoDGSCzCb0NwUpPKceUg3EbIgnJ7SiO87VRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630154455; a=rsa-sha256; cv=none; b=jHT9jyJG8ZO3vEA97utZCARcuXFKf1c2Uwni/eXgdr3p0qmXUTikxaLujABqZOqImQXMVK awhDwnJct8OlVffrbvvOEV00DgkCa7L7nk/AuQlLHyTpeyH9WSv4QB/xSMRvQnHrzFZ0yb bvmgPUTaq1mg6Wc8+dPe1xPlET92d7v/gBQEQIS7jkfyJYWIvSyWCsCaJ/azyXgQJNbis1 olfUlwNnxfJEUEdRUy4teCliuuJGSv8Diw87EO1CvCnH06MLuATR9pvHcLExhHlxdGbdUz TYhcMe6Ek07i+5GeIVe7c1EQyhZiTUrdxl/c3YHWgmaFSn0w11hW0sn6TtfaWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=FFGMEHOX; dmarc=pass (policy=none) header.from=gmail.com; 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: -2.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=FFGMEHOX; dmarc=pass (policy=none) header.from=gmail.com; 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: 300762A4A X-Spam-Score: -2.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: bVv4O+MHquoJ --000000000000e2b59705ca9de7b9 Content-Type: text/plain; charset="UTF-8" muradm, Thank you so much for your help! That worked like a charm! Just needed to adjust the second argument of with-output-to-file so that it takes a lambda that returns (newline). Here is the resulting package definition that successfully builds. (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" (lambda () (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)))) Regards, Antwane --000000000000e2b59705ca9de7b9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
muradm,

Tha= nk you so much for your help!=20 That worked like a charm! Just needed to adjust the second argument of=20 with-output-to-file so that it takes a lambda that returns (newline).
=
Here is the resulting package definition that successfully builds.

(define-public python-verspe= c
=C2=A0 (package
=C2=A0 =C2=A0 (name "python-verspec")
= =C2=A0 =C2=A0 (version "0.1.0")
=C2=A0 =C2=A0 (source
=C2= =A0 =C2=A0 =C2=A0 (origin
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (method url-fetch)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (uri (pypi-uri "verspec" version)= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (sha256
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (base32
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "07n06wv85fm4= vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64"))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 (modules '((guix build utils)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (= snippet
=C2=A0 =C2=A0 =C2=A0 =C2=A0 '(with-directory-excursion "= ;test"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-output-to-fil= e "__init__.py"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(lambda () (newline)))))))
=C2=A0 =C2= =A0 (build-system python-build-system)
=C2=A0 =C2=A0 (native-inputs
= =C2=A0 =C2=A0 =C2=A0 `(("python-coverage" ,python-coverage)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("python-flake8" ,python-flake8)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("python-mypy" ,python-mypy)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 ("python-pretend" ,python-pretend)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("python-pytest" ,python-pytest)))=C2=A0 =C2=A0 (home-page
=C2=A0 =C2=A0 =C2=A0 "https://github.com/jimporte= r/verspec")
=C2=A0 =C2=A0 (synopsis "Flexible version hand= ling")
=C2=A0 =C2=A0 (description "Flexible version handling&q= uot;)
=C2=A0 =C2=A0 (license '(license:asl2.0 license:bsd-2))))
<= br>
Regards,
Antwane
--000000000000e2b59705ca9de7b9--