From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8GlzDybDD2AwYQAA0tVLHw (envelope-from ) for ; Tue, 26 Jan 2021 07:22:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QJA9CybDD2AiRgAAB5/wlQ (envelope-from ) for ; Tue, 26 Jan 2021 07:22:14 +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 915BA9402C2 for ; Tue, 26 Jan 2021 07:22:13 +0000 (UTC) Received: from localhost ([::1]:59202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Ig0-0006Iv-De for larch@yhetil.org; Tue, 26 Jan 2021 02:22:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4IfP-0006H1-DA for guix-devel@gnu.org; Tue, 26 Jan 2021 02:21:35 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4IfM-0003AW-8z for guix-devel@gnu.org; Tue, 26 Jan 2021 02:21:35 -0500 X-Originating-IP: 176.185.184.238 Received: from localhost (static-176-185-184-238.ftth.abo.bbox.fr [176.185.184.238]) (Authenticated sender: tanguy@bioneland.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 6C526E0008; Tue, 26 Jan 2021 07:21:24 +0000 (UTC) Date: Tue, 26 Jan 2021 08:21:22 +0100 From: Tanguy LE CARROUR Subject: Re: Questions regarding Python packaging To: Guix , Lars-Dominik Braun References: <20201108142717.lmud5h4gh44vtjc6@melmoth> <1609946775.8blxygrg9p.astroid@rafflesia.none> <1611303651.35tpgtn1z1.astroid@melmoth.none> In-Reply-To: <1611303651.35tpgtn1z1.astroid@melmoth.none> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1611645480.1t06ie9pyf.astroid@melmoth.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=217.70.183.196; envelope-from=tanguy@bioneland.org; helo=relay4-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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 X-Migadu-Spam-Score: -2.35 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 915BA9402C2 X-Spam-Score: -2.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: gUAwxqQWUVcu Excerpts from Tanguy LE CARROUR's message of January 22, 2021 9:38 am: > Excerpts from Tanguy LE CARROUR's message of January 6, 2021 4:32 pm: >> Excerpts from Lars-Dominik Braun's message of January 5, 2021 11:25 am: >>>> So, I've tried packaging `python-keyring` with those two=E2=80=A6 >>>>=20 >>>> `pep517` keeps on trying to download dependencies, which won't work. >>>>=20 >>>> `build` crashes with "ZIP does not support timestamps before 1980", >>>> which, I guess is related to the fact that everything in the store is >>>> timestamped to January 1st 1970. >>> have you been looking into a python-build-system using `build`[1]? I=E2= =80=99ve >>> had the same issue with egg versions set to 0.0.0 and think in the long >>> run moving to a PEP 517-style build is the way forward. >>=20 >> I agree! Unfortunately, I haven't had much time (so far) to work on it! = :-( >>=20 >> I'll revive the thread as soon as I've made progress=E2=80=A6 >=20 > Done! :-) > I've eventually succeeded in ("properly") packaging a software managed > with Poetry. And I've learned quite a lot on the way! Just for the sake of having it documented somewhere, here is the relevant part of the `guix.scm` file: ``` (define-public nowty (package (name "nowty") (version (string-append %pyproject-version "+" %git-commit)) (source (local-file %source-dir #:recursive? #t)) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'build (lambda* (#:key #:allow-other-keys) (substitute* "pyproject.toml" (((string-append "version =3D \"" ,%pyproject-version "\"" )) (string-append "version =3D \"" ,version "\""))))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (invoke "python" "-m" "pip" "install" "--no-dependencies" "--no-build-isolation" "--prefix" ou= t ".")))) (replace 'check (lambda* (#:key inputs outputs #:allow-other-keys) (add-installed-pythonpath inputs outputs) (invoke "python" "-m" "invoke" "test.unit")))))) (native-inputs `(("python-invoke" ,python-invoke-patched) ("python-mamba" ,python-mamba) ("python-poetry-core" ,python-poetry-core) ("python-robber" ,python-robber) ("python-termcolor" ,python-termcolor))) (propagated-inputs `(("python-mpd2" ,python-mpd2) ("python-typer" ,python-typer))) (synopsis "Music notification daemon for MPD") (description "A music notification daemon that monitors songs being pla= yed by MPD and displays notifications with the song's details.") (home-page "http://projects.bioneland.org/nowty") (license license:gpl3+))) ``` --=20 Tanguy