Subject: [bug#71540] [PATCH 7/7] gnu: poetry: Update to 1.7.1.

From: Antero Mejr <[email-masked]>
Date: Thu, 13 Jun 2024 19:29:13 +0000

* gnu/packages/python-xyz.scm (poetry): Update to 1.7.1.
[propagated-inputs]: Remove python-html5lib, python-msgpack-transitional, and
python-poetry-core-1.0; add python-dulwich, python-fastjsonschema,
python-importlib-metadata, python-installer, python-platformdirs,
python-poetry-core-next, python-poetry-plugin-export-minimal,
python-pypa-build, python-pyproject-hooks, python-tomli,
python-trove-classifiers, and python-xattr.
[native-inputs]: Add python-deepdiff, python-httpretty, python-pytest,
python-pytest-mock, python-pytest-randomly, and python-pytest-xdist.

Change-Id: Ic8949f875d4a6f1e5faa1666c0961067e226dc29
---
 gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++------------
 1 file changed, 37 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c05526b7cf..8ff5760534 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21368,46 +21368,65 @@ (define-public python-poetry-plugin-export-minimal
 (define-public poetry
   (package
     (name "poetry")
-    (version "1.1.12")
+    (version "1.7.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "poetry" version))
        (sha256
         (base32
-         "0rr54mvcfcv9cv6vw2122y28xvd2pwqpv2x8c8j5ayz3gwsy4rjw"))))
-    (build-system python-build-system)
+         "0cpzsqjv8c6v9888svxiyi6c516zqrdjbsnhsc5rrbb7gl7afj5k"))))
+    (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
+                   ;; Almost every dependency is pinned too strictly.
+                   (delete 'sanity-check))
+      #:test-flags
+      #~(list
+         "--ignore=tests/installation/test_executor.py"
+         "--ignore=tests/installation/test_chef.py"
+         "-k"
+         (string-append
+          "not test_create_poetry_fails_on_invalid_configuration "
+          "and not test_shell "
+          "and not test_installer_with_pypi_repository "
+          "and not test_builder_setup_generation_runs_with_pip_editable "
+          "and not test_check_invalid"))))
+    (native-inputs (list python-deepdiff
+                         python-httpretty
+                         python-pytest
+                         python-pytest-mock
+                         python-pytest-randomly
+                         python-pytest-xdist))
     (propagated-inputs
      (list python-cachecontrol
            python-cachy
            python-cleo
            python-crashtest
+           python-dulwich
            python-entrypoints
-           python-html5lib
+           python-fastjsonschema
+           python-importlib-metadata
+           python-installer
            python-keyring
-           ; Use of deprecated version of msgpack reported upstream:
-           ; https://github.com/python-poetry/poetry/issues/3607
-           python-msgpack-transitional
            python-packaging
            python-pexpect
            python-pip
            python-pkginfo
-           python-poetry-core-1.0
+           python-platformdirs
+           python-poetry-core-next
+           python-poetry-plugin-export-minimal
+           python-pypa-build
+           python-pyproject-hooks
            python-requests
            python-requests-toolbelt
            python-shellingham
+           python-tomli
            python-tomlkit
-           python-virtualenv))
+           python-trove-classifiers
+           python-virtualenv
+           python-xattr))
     (home-page "https://python-poetry.org")
     (synopsis "Python dependency management and packaging made easy")
     (description "Poetry is a tool for dependency management and packaging
-- 
2.41.0