GNU bug report logs - #70976
[PATCH] gnu: Add python-augeas.

Previous Next

Package: guix-patches;

Reported by: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>

Date: Thu, 16 May 2024 10:37:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 70976 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 70976 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add python-augeas.
Date: Thu, 16 May 2024 20:55:54 +0100
[Message part 1 (text/plain, inline)]
Hi,

Thank you for the patch.

I've got some review points.

Try to avoid to modify LD_LIBRARY_PATH
--8<---------------cut here---------------start------------->8---
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'build 'configure-environment
+                     (lambda _
+                       (setenv "LD_LIBRARY_PATH"
+                               (string-append #$(this-package-input "augeas")
+                                              "/lib")))))))
--8<---------------cut here---------------end--------------->8---

As you may check, the project silently uses pkg-config, xml2-config
which provide library search:
https://github.com/hercules-team/python-augeas/blob/a1e84a7e58e535658f681731b66eca7b71c095a2/augeas/ffi.py#L6C1-L8C60
--8<---------------cut here---------------start------------->8--- def
get_include_dirs(): XML2_CONFIG = os.environ.get('XML2_CONFIG',
'xml2-config') PKG_CONFIG = os.environ.get('PKG_CONFIG', 'pkg-config')
--8<---------------cut here---------------end--------------->8---

In that light, augeas needs to be placed in inputs and 2 packages need
to be added to native-inputs (pkg-config, and maybe libxml2):
--8<---------------cut here---------------start------------->8---
+    (propagated-inputs (list augeas python-cffi))
--8<---------------cut here---------------end--------------->8---

In general for the python packages, similar like for the golang -
propagated-inputs is a place for any modules (they are just sources and)
requuring during runtime of the project you may check it like this:
--8<---------------cut here---------------start------------->8---
guix shell python-<name> python -- python3 'import <nmae>'
--8<---------------cut here---------------end--------------->8---

Nix has 100k packages, and may provide some insight on which inputs and
where the package expects ;-)
https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/python-modules/augeas/default.nix#L34


--
Oleg
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.