From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2EPYKW14kl/iYAAA0tVLHw (envelope-from ) for ; Fri, 23 Oct 2020 06:30:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4FcwJG14kl9CMQAA1q6Kng (envelope-from ) for ; Fri, 23 Oct 2020 06:30:05 +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 18678940112 for ; Fri, 23 Oct 2020 06:30:05 +0000 (UTC) Received: from localhost ([::1]:33724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVqaR-0002YX-V3 for larch@yhetil.org; Fri, 23 Oct 2020 02:30:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqY7-0001Dc-K5 for guix-devel@gnu.org; Fri, 23 Oct 2020 02:27:40 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:51587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVqY2-0005gU-9o for guix-devel@gnu.org; Fri, 23 Oct 2020 02:27:38 -0400 X-Originating-IP: 176.185.184.238 Received: from localhost (static-176-185-184-238.axione.abo.bbox.fr [176.185.184.238]) (Authenticated sender: tanguy@bioneland.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 8E5E020007; Fri, 23 Oct 2020 06:27:29 +0000 (UTC) Date: Fri, 23 Oct 2020 08:27:28 +0200 From: Tanguy Le Carrour To: Danny Milosavljevic Subject: Re: Packaging Python projects managed with Poetry Message-ID: <20201023062728.oocmfkta7umq226k@melmoth> References: <20201022151520.mmq6pyqjc6kxevre@rafflesia> <20201022184232.6459b56a@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201022184232.6459b56a@scratchpost.org> Received-SPF: none client-ip=217.70.183.200; envelope-from=tanguy@bioneland.org; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/23 02:27:30 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, RCVD_IN_MSPIKE_H2=-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: , Cc: Guix Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 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-Spam-Score: -0.51 X-TUID: QlMpp8qizdJ+ Hi Danny, Thank you for your answer! Le 10/22, Danny Milosavljevic a écrit : > On Thu, 22 Oct 2020 17:15:20 +0200 > Tanguy Le Carrour wrote: > > > does not contain a `setup.py` file –because Poetry does not use it!—, and > >the `python-build-system` fails. > > I haven't wrap my head around this yet and I'm not sure what would be > > the proper way to do it? > > >Write a `python-poetry-build-system`? I hope not! > > Why not? > > According to https://github.com/python-poetry/poetry they took inspiration > from existing build systems like cargo, and they just replaced setup.py by > pyproject.toml. > > So what you could do is create a poetry-build-system that is just like > python-build-system (probably even inherits from it) but uses "poetry" > instead of "python setup.py". > > If the author of a package replaces the build system used in his actual > project, he has to expect to also have to replace the build-system reference > in the guix package. Why is that weird? Oh, when I said "hope", I didn't mean to say "weird", but "out of my comfort zone"! But I guess it would be a good way to learn more about Guix's internals. So, wouldn't be so bad after all! I'll give it a try. > Or you could try to add it to the existing python-build-system--but the > poetry website doesn't sound like it's designed like that (it rather sounds > like they want to replace all other python build systems). Actually, they don't "replace" all other systems, they build on them. Internally, it uses `pip` and `virtualenv`. And there is competition out there! To be faire, I should also package `hatch` [1] and `pipenv` [2]. But first, I have to make it right with `poetry`. [1]: https://github.com/ofek/hatch [2]: https://pipenv.pypa.io/en/latest > > Just put the d**n tests in the Python package? This would look like a > > failure to me! :-( > > If the end user doesn't need the tests, the tests shouldn't make it into the > derivation of your package. But they are there while the package is building > the derivation--so just run the tests then. And… this is where the end of my comprehension of Guix is reached! ^_^' The only thing I want to make sure is that the tests don't end up on the the end user's system, the one that runs `guix install project-managed-with-poetry`. But I guess the tests (contained in the source) will remain on the builder's system. At least until they run `guix gc`. Thanks for your help! -- Tanguy