From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 kGcLDGQ3XGb0KgEAqHPOHw:P1 (envelope-from ) for ; Sun, 02 Jun 2024 11:12:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kGcLDGQ3XGb0KgEAqHPOHw (envelope-from ) for ; Sun, 02 Jun 2024 11:12:04 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=M0YbSQF6; 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=reject) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717319524; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zCPDiasObLCaRB4IA8YtYG2eKark8fFfy63xp0Dz9Gs=; b=GCfk9yeKQCoVSwpHUXwqP5RLRI7fYY1r5MrZ0+Jq23+xbpMHWLYZBPD8aTMbWa38s/3z4Y q/pNhAGsnnCVjOGAW43wdB9iPa2ieGd9Wbw4YQGxuVK/U430YCS6rHqA4Z9W1Rfto/r8mB KiQfRoggtQIVw7ApQeLEim8QAf6ZjegtkInwMZddFCkdlKbuzR15+tjOHob6O5KZG28Q6t qHND2O8rxZwnIrks7J4GGHycGRo86KiM2dJv2hRpWxlwLyP/JM1oUotj7wOSzAMcDLxYO4 M2mOG9D/lI5kJGzhDHd2gLYdaMiMkFNR9xmQN55znKfM3SE8LDI+MFrCk8QoTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=M0YbSQF6; 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=reject) header.from=disroot.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717319524; a=rsa-sha256; cv=none; b=siJgyxg9Y2PKJ+Kl5Vw6r+nFAsnEJcns+pO3iMwaEdwkNQEpkKj18mnAbyhobk/kaidtHr 7HDquGNxMqQrjvaiBcYeZR+orf7mLoQLMT+tG0LKIBZmKCBegR3Gb22BFeQORD5i75iNVb 8r6FU+1Lm8Fn8qFFZOCxsZjEJ5DosTc0n12eHbPA/UiBZkauACe9UybtmeREIJ8oielgDf +sJsufCAT2FLZa4iLz87nJLM0enhwo94qFJkj5Tv0BQ7Qz2U38K7V7SAV+JjtgdAO+FxPv 3mASGqq9hBDKwEKps0dEI4DPScHXErlw0YPAPB3/5LmyIjbSzLcSVcKMXzwFJA== 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 1C9FF654C0 for ; Sun, 2 Jun 2024 11:12:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDhFi-00066q-WE; Sun, 02 Jun 2024 05:11:47 -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 1sDUj6-0006vR-0Q for help-guix@gnu.org; Sat, 01 Jun 2024 15:49:16 -0400 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDUj3-0005Mu-PC for help-guix@gnu.org; Sat, 01 Jun 2024 15:49:15 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 90B3D41A91 for ; Sat, 1 Jun 2024 21:49:06 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GTaAMPfgJMlV for ; Sat, 1 Jun 2024 21:49:05 +0200 (CEST) From: Polyedre DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1717271345; bh=NV5ZCoeMkmU86BT14JDvBv0eg3kbFsMCmz5mY60UTIA=; h=From:To:Subject:Date; b=M0YbSQF6IgwuxJDyZojfHrRzZGJHtL9QRuthfw8/piMrvNzfoZuneenfL5FlMt6ye OFER5mWYL1XRMg9yXtdIRHPiMd6nkf58UQMfahmEYaOsg4GZPoDKNY0phgKpIbPbFr pyCWwXJZVGVYx7Y9GLv8Dzsijo3R9bfZj8LW2dLnO0IKZoCdivCbfqEQeuU3U4hoyz TzFaJHK8Nb42ewOhVH1G4YcVn1Ar27X2cJe8xJtxey9FvnMn+MeGj5ldZwIIiF9Ams Klw/6ZwTd36MdPeldYTUBCQk99TAgZ2397hKoln+8uBms79O/t1+ORDmxO+1o9HadE zoFSMI0FbtL7Q== To: help-guix@gnu.org Subject: Python package that uses setuptools_scm is builded with version 0.0.0 Date: Sat, 01 Jun 2024 21:49:04 +0200 Message-ID: <87h6ecv3yn.fsf@disroot.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.21.23.139; envelope-from=polyedre@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 02 Jun 2024 05:11:45 -0400 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: -9.69 X-Spam-Score: -9.69 X-Migadu-Queue-Id: 1C9FF654C0 X-Migadu-Scanner: mx13.migadu.com X-TUID: aqWkNhbWQmzj 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