From f198cfe66293b4547fb14dd1afe239beed98e01f Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 18 Oct 2025 15:28:22 +0200 Subject: [PATCH] gnu: python-flake8-continuation: Switch to pyproject. * gnu/packages/python-xyz.scm (python-flake8-continuation): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Add phase 'remove-python-six-dependency. [native-inputs]: Add python-pytest, python-setuptools. [propagated-inputs]: Remove python-six. [description]: Improve style. Change-Id: Icbab45c176ee8abc37cde1da9fe7dd0c38c109e6 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 585682278120b3dfdb7a00e50c6d0e3f4db9b570..0b063744450d01fa82b1f3c93c11c50d698d18ca 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -16500,23 +16500,38 @@ and pycodestyle.") (version "1.0.5") (source (origin - (method url-fetch) - (uri (pypi-uri "flake8-continuation" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/planetlabs/flake8-continuation") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y")))) - (build-system python-build-system) - (propagated-inputs - (list python-flake8 python-pycodestyle python-six)) + (base32 "04fsd361x03mgyydsdm9vr28ikr2mdip13c805i2wzxc45qsc9x7")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-python-six-dependency + (lambda _ + (substitute* "flake8_continuation.py" + (("import six|six\\.moves\\.") + "")) + (substitute* "setup.py" + ((", \"six\"") + ""))))))) + (native-inputs (list python-pytest python-setuptools)) + (propagated-inputs (list python-flake8 python-pycodestyle)) (home-page "https://github.com/planetlabs/flake8-continuation") (synopsis "Flake8 Line Continuation Plugin") - (description "A Flake8 plugin that checks for the line continuation -style to be in the preferred method according to PEP-8, specifically: + (description + "A Flake8 plugin that checks for the line continuation style to be in the +preferred method according to PEP-8, specifically: @quotation -The preferred way of wrapping long lines is by using Python's implied -line continuation inside parentheses, brackets and braces. Long lines -can be broken over multiple lines by wrapping expressions in parentheses. -These should be used in preference to using a backslash for line continuation. +The preferred way of wrapping long lines is by using Python's implied line +continuation inside parentheses, brackets and braces. Long lines can be +broken over multiple lines by wrapping expressions in parentheses. These +should be used in preference to using a backslash for line continuation. @end quotation") (license license:asl2.0)))