From patchwork Fri Apr 28 05:51:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 49632 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6FA8427BBEA; Fri, 28 Apr 2023 06:52:43 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5A37927BBE2 for ; Fri, 28 Apr 2023 06:52:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psH1c-00062b-AB; Fri, 28 Apr 2023 01:52:08 -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 1psH1Y-0005ym-J0 for guix-patches@gnu.org; Fri, 28 Apr 2023 01:52:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1psH1Y-0003Hq-9v for guix-patches@gnu.org; Fri, 28 Apr 2023 01:52:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psH1Y-0006ev-5h for guix-patches@gnu.org; Fri, 28 Apr 2023 01:52:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63139] [PATCH python 15/20] gnu: poetry: Fix build. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Apr 2023 05:52:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63139 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63139@debbugs.gnu.org Cc: John Kehayias Received: via spool by 63139-submit@debbugs.gnu.org id=B63139.168266111125531 (code B ref 63139); Fri, 28 Apr 2023 05:52:04 +0000 Received: (at 63139) by debbugs.gnu.org; 28 Apr 2023 05:51:51 +0000 Received: from localhost ([127.0.0.1]:60313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psH1K-0006dj-Rf for submit@debbugs.gnu.org; Fri, 28 Apr 2023 01:51:51 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:61325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psH1I-0006dU-FM for 63139@debbugs.gnu.org; Fri, 28 Apr 2023 01:51:49 -0400 Date: Fri, 28 Apr 2023 05:51:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1682661102; x=1682920302; bh=0OMoszzn4QIYHkG1EV4nbIuRsbSAwOluvCj26dSwMlw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=NJCi830na9dgv+1NOgTfkBikLFxegeZm7sDAwTkZL5Rq78rr5OlVBla0kH5lXek5H MXlsoYY7Rl+e9SQ78OBKcgjta0EJyID0eQOnw7iC2GqUpVAszLiPDDVRGmWwlGVfMW 6XmOJ0lTPeC07If3cAkSz9wQGojGeb1u9Ab+F7WV062xzznTu8ahtm888vkmnST8zJ lh6Zj1LDMdVcBcnAmyw6ulUbfxZ6FWicNJDIaXth2+l9tTFryyzFQ072psDUpjjfE3 0oyEuJwDTcNl+LHu9zX/PWbMMc/pGWk5RIY4mvV7QUqsOlXwXYyFBLkFkBHUbpuZ3B WdXYg1ZOmB32Q== Message-ID: In-Reply-To: References: Feedback-ID: 7805494:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (poetry)[build-system]: Switch to pyproject-build-system. [arguments]{phases}: New phase 'loosen-requirements' to fix build and avoid circular dependency. {test-flags}: Disable failing tests. [propagated-inputs]: Remove python-pip. Add python-dulwich, python-installer, python-jsonschema, python-platfromdirs, python-pypa-build, python-pyproject-hooks, python-tomli, and python-trove-classifiers. [native-inputs]: Add python-deepdiff, python-httpretty, python-pytest, python-pytest-mock, and python-pytest-xdist. --- gnu/packages/python-xyz.scm | 62 ++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 12 deletions(-) -- 2.39.2 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 8b61cba8ae..cbe3bb1094 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -18144,37 +18144,75 @@ (define-public poetry (sha256 (base32 "0g0vczn6qa4b2bdkq4k7fm1g739vyxp2iiblwwsrcmw24jj81m8b")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ;PyPI does not have tests - ;; #:phases - ;; (modify-phases %standard-phases - ;; (add-before 'build 'patch-setup-py - ;; (lambda _ - ;; (substitute* "setup.py" - ;; ;; Relax some of the requirements. - ;; (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring) - ;; (("(packaging>=20.4),<21.0" _ packaging) packaging))))) - )) + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'loosen-requirements + (lambda _ + (substitute* "pyproject.toml" + ;; Permit newer versions of platformdirs. + (("platformdirs =.*") "platformdirs = \"^3.0.0\"\n") + ;; Our python-trove-classifiers reports the wrong version. + (("trove-classifiers =.*") "trove-classifiers = \"*\"\n") + ;; Avoid circular dependency by not including the export + ;; plugin requirement. See + ;; + ;; and + ;; + ;; for upstream status in resolving this cycle. + (("poetry-plugin-export.*") ""))))) + #:test-flags + '(let ((disabled-tests + ;; The following tests currently fail, requiring network + ;; connectivity and/or trying to write in the build + ;; environment. + ;; TODO: Some of these might be worked around. + (list "test_shell" + (string-append "test_build_backend_errors_are_" + "reported_correctly_if_caused_by_subprocess") + "test_prepare_sdist" + (string-append "test_executor_should_write_" + "pep610_url_references_for_non_wheel_files") + "test_uninstall_git_package_nspkg_pth_cleanup" + "test_builder_setup_generation_runs_with_pip_editable" + "test_prepare_directory" + "test_prepare_directory_with_extensions" + "test_prepare_directory_editable"))) + (list "-k" (string-append "not " + (string-join disabled-tests + " and not ")))))) (propagated-inputs (list python-cachecontrol python-cachy python-cleo python-crashtest + python-dulwich python-entrypoints python-html5lib + python-installer + python-jsonschema python-keyring python-msgpack python-packaging python-pexpect - python-pip python-pkginfo + python-platformdirs + python-pypa-build python-poetry-core + python-pyproject-hooks python-requests python-requests-toolbelt python-shellingham + python-tomli python-tomlkit + python-trove-classifiers python-virtualenv)) + (native-inputs (list python-deepdiff + python-httpretty + python-pytest + python-pytest-mock + python-pytest-xdist)) (home-page "https://python-poetry.org") (synopsis "Python dependency management and packaging made easy") (description "Poetry is a tool for dependency management and packaging