From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id qGkgMp5LXWavCAAAe85BDQ:P1 (envelope-from ) for ; Mon, 03 Jun 2024 06:50:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qGkgMp5LXWavCAAAe85BDQ (envelope-from ) for ; Mon, 03 Jun 2024 06:50:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=runbox.com header.s=selector2 header.b=R5cBbvPx; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=runbox.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717390238; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=wgGAkBNxjuI6y0OJ7FptTPVkfvixZinj+jnG4q3LDhI=; b=CU7KmoQOghvUyY32JRY9PRrHbz2bbB8t1rjdVGxdq/uWdVWT3cgzw8l0ripv9fX+TTn/Rq IGO7RZsx7jQ7oEMBzoX5unzvpdKSFfBUl04nph4jxPAsV+ZmdyhBQk87RWBGJK43B+lUH+ ltYjwqqbWNFo2+P6TLySxVU2gYRBqtJRXtoCGqzZawlbBd3teKs0B28+iUM1q4QdTjZXV1 qN54jfznG5W1jfBJuoCM1ICq0a0f9FaKCh3L1ukhn1WadieplasA5tK2zDR+wF+LsgTfA3 wukxjnAI1rz9ujp71P0nkpIIoaNxwINUNyeZaPJ+CaWHpDYqBMBdOd+lnIua1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=runbox.com header.s=selector2 header.b=R5cBbvPx; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=runbox.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717390238; a=rsa-sha256; cv=none; b=CsQzJ5STqdTbcIrDmlhTVYKhKVdpAqmxq6U8FXDdhNrG5FzdiepPTSoebYiD7c6rN3u7HK F+/fdNRXsCvMvfAoZSUs3adNXAqsYP9SD9D9nKZ6g7a43o/dWbEJxHJTIWN9Zi9HTVEMsT c4HjJafGEOP97vxdteGL2Ndm2DjZJZLRoPkFrupg7kWvxz4kUqsRNAxrAKeexGUhk6fqd/ cD/8B4BC6JKWMgkjB9PqU0MzAlfvU1CIskYmdxfSXz0GB4LvwzgpzgVavHbqobVY9LkRJ0 tNZWpYWtAHCSVu8odhl4TsiQpp4sVQ8o3v2lcxP4qkpPoyT8SR4wJaN3W74FHQ== 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 AC8B061C91 for ; Mon, 3 Jun 2024 06:50:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDxsm-0001Dh-5G; Sun, 02 Jun 2024 22:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDxsg-0000xE-Us for help-guix@gnu.org; Sun, 02 Jun 2024 22:57:07 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDwDk-0004Lk-Mf for help-guix@gnu.org; Sun, 02 Jun 2024 21:10:47 -0400 Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1sDwCf-00Dq2Q-JZ for help-guix@gnu.org; Mon, 03 Jun 2024 03:09:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID; bh=wgGAkBNxjuI6y0OJ7FptTPVkfvixZinj+jnG4q3LDhI=; b=R5cBbvPxIUb+l9VvI6KCVbS3wY xRc3x2PZPASs1gdfPCvWYYIWb8khV0IXXfN8UpkFgSM5l871qI4nUZZqWa7G7ioXZb3nY58G2Fha9 hixerdDZLBg7tvPjoUXfDBUln8KJpqdGEzt0EMXpKzJWrqUiF3/fr57BkHqA8kKGWfMaIYt1W3eVY IoVrmDoxGnLEfbtRbNXhygYZANTXMewkOwHOINrT84F0kNqg5AitnrFhPe3hV8TRaGTBYcULOwnjD 2tojnQWmJ7IHjiL9TTYDRc9NNd9QzeKwQg7l4nh1KqoEpGzc/eyuPsuK7U7riJxecWs5Dw23zWTYA G/ABJrAg==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1sDwCe-0001BL-Vy; Mon, 03 Jun 2024 03:09:37 +0200 Received: by submission01.runbox with esmtpsa [Authenticated ID (1174703)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1sDwCM-00DgTb-Ix; Mon, 03 Jun 2024 03:09:18 +0200 Message-ID: <0475e6c9-d346-4c25-81f4-e82af9d21bb1@runbox.com> Date: Sun, 2 Jun 2024 18:09:15 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Python package that uses setuptools_scm is builded with version 0.0.0 To: Polyedre , help-guix@gnu.org References: <87h6ecv3yn.fsf@disroot.org> From: Alexis Simon Content-Language: en-US, fr In-Reply-To: <87h6ecv3yn.fsf@disroot.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a0c:5a00:149::25; envelope-from=alexis.simon@runbox.com; helo=mailtransmit04.runbox.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -10.98 X-Spam-Score: -10.98 X-Migadu-Queue-Id: AC8B061C91 X-Migadu-Scanner: mx13.migadu.com X-TUID: C9ggAXFnPuC3 Hi Polyedre, I think having python-setuptools-scm in your native-inputs should be enough for building with the right version number. At least it was enough for me when I encountered this issue before. Best, Alexis On 01/06/2024 12:49, Polyedre wrote: > Hello, > > While trying to package maestral[1] for guix, I came across the python > package 'survey'[2]. With the following package description, this > package builds but the version of the resulting python package is 0.0.0. > > ```scheme > (define-public python-survey > (package > (name "python-survey") > (version "5.3.0") > (source > (origin > (method url-fetch) > (uri (pypi-uri "survey" version)) > (sha256 > (base32 "1q2b07rq66njyg70fsd0gn6710z1sz9phpy3rd7p7dqxn6rfvi4c")))) > (build-system pyproject-build-system) > ;; (propagated-inputs (list python-setuptools-scm)) > (arguments > `(#:phases (modify-phases %standard-phases > (delete 'check)))) > (home-page "https://github.com/Exahilosys/survey") > (synopsis "A simple library for creating beautiful interactive prompts.") > (description > "This package provides a simple library for creating beautiful interactive > prompts.") > (license license:expat))) > ``` > > It seems that this package uses setuptools_scm. According to its > documentation, the latter detects the version of the package currently > building directly from "`git` or `hg`" (I guess with the tags?). > > As a consequence, this package builds with the version 0.0.0: > > ``` > $ guix shell -f test.scm python -- pip3 freeze > survey==0.0.0 > ```` > > It seems that the environment variables SETUPTOOLS_SCM_PRETEND_VERSION > and SETUPTOOLS_SCM_PRETEND_VERSION_FOR_[3] can be used to override > this behavior. > > What would be the best way to add an environment variable to te build > process? Just exporting the variable to my shell before calling `guix > build` does not work. > > Regards, > Polyedre > > [1] https://pypi.org/project/maestral/ > [2] https://pypi.org/project/survey/ > [3] https://setuptools-scm.readthedocs.io/en/latest/usage/#with-dockerpodman >