bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37300: Imported packages' indentation doesn't respect Guix conventio


From: Maxim Cournoyer
Subject: bug#37300: Imported packages' indentation doesn't respect Guix conventions
Date: Thu, 20 Jul 2023 09:23:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> The package definitions imported by Guix importers do not respect Guix
> conventions regarding indentation.
>
> Consider:
>
> guix pypi import transaction
>
> (package
>   (name "python-transaction")
>   (version "2.4.0")
>   (source
>     (origin
>       (method url-fetch)
>       (uri (pypi-uri "transaction" version))
>       (sha256
>         (base32
>           "17wz1y524ca07vr03yddy8dv0gbscs06dbdywmllxv5rc725jq3j"))))
>   (build-system python-build-system)
>   (propagated-inputs
>     `(("python-zope.interface" ,python-zope.interface)))
>   (native-inputs
>     `(("python-coverage" ,python-coverage)
>       ("python-mock" ,python-mock)
>       ("python-nose" ,python-nose)))
>   (home-page
>     "https://github.com/zopefoundation/transaction";)
>   (synopsis "Transaction management for Python")
>   (description "Transaction management for Python")
>   (license #f))
>
> Re-identing this in Emacs with the Guix .dir-local.el indentation
> customizations yields:
>
> (define-public python-transaction
>   (package
>     (name "python-transaction")
>     (version "2.4.0")
>     (source
>      (origin
>        (method url-fetch)
>        (uri (pypi-uri "transaction" version))
>        (sha256
>         (base32
>          "17wz1y524ca07vr03yddy8dv0gbscs06dbdywmllxv5rc725jq3j"))))
>     (build-system python-build-system)
>     (propagated-inputs
>      `(("python-zope.interface" ,python-zope.interface)))
>     (native-inputs
>      `(("python-coverage" ,python-coverage)
>        ("python-mock" ,python-mock)
>        ("python-nose" ,python-nose)))
>     (home-page
>      "https://github.com/zopefoundation/transaction";)
>     (synopsis "Transaction management for Python")
>     (description "Transaction management for Python")
>     (license #f)))

That's been taken care of by applying 'guix style' to the
importer-generated definitions; it now looks like:

(define-public python-transaction
  (package
    (name "python-transaction")
    (version "3.1.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "transaction" version))
              (sha256
               (base32
                "191gj6pzvgw0726dsywy8pbj7shxnkc6pyrpnbiw9ryvjbmb3l35"))))
    (build-system pyproject-build-system)
    (propagated-inputs (list python-zope.interface))
    (native-inputs (list python-coverage python-mock python-nose))
    (home-page "https://github.com/zopefoundation/transaction";)
    (synopsis "Transaction management for Python")
    (description "Transaction management for Python")
    (license #f)))

which is correct.

Closing.

-- 
Thanks,
Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]