[PATCH] gnu: Add python-augeas.

  • Done
  • quality assurance status badge
Details
2 participants
  • Artyom V. Poptsov
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 16 May 12:35 +0200
(address . guix-patches@gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
9ded180a74e375d19c78ced3005307b846a02996.1715855753.git.poptsov.artyom@gmail.com
* gnu/packages/python-xyz.scm (python-augeas): New variable.

Change-Id: Id1c1b87c9f5897583560f70243ef060b10eac4d4
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ddc697f71b..da0edd47bd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -414,6 +414,32 @@ (define-public python-awkward-cpp
package. It is not useful on its own, only as a dependency for awkward.")
(license license:bsd-3)))
+(define-public python-augeas
+ (package
+ (name "python-augeas")
+ (version "1.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-augeas" version))
+ (sha256
+ (base32 "131vzy7bnnqdglz6hd79zkkdqfbyz0rxhwsz0mbzq3xlhsga952i"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'configure-environment
+ (lambda _
+ (setenv "LD_LIBRARY_PATH"
+ (string-append #$(this-package-input "augeas")
+ "/lib")))))))
+ (propagated-inputs (list augeas python-cffi))
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/hercules-team/python-augeas")
+ (synopsis "Python bindings for Augeas")
+ (description "Pure Python bindings for @url{https://augeas.net, Augeas}.")
+ (license license:lgpl2.1)))
+
(define-public python-awkward
(package
(name "python-awkward")

base-commit: 5a624adfd7b14c3717237d137bd0766c77f0f570
--
2.41.0
S
S
Sharlatan Hellseher wrote on 16 May 21:55 +0200
(address . 70976@debbugs.gnu.org)
87wmnt8rat.fsf@gmail.com
Hi,

Thank you for the patch.

I've got some review points.

Try to avoid to modify LD_LIBRARY_PATH
Toggle snippet (10 lines)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'configure-environment
+ (lambda _
+ (setenv "LD_LIBRARY_PATH"
+ (string-append #$(this-package-input "augeas")
+ "/lib")))))))

As you may check, the project silently uses pkg-config, xml2-config
which provide library search:
Toggle snippet (4 lines)
get_include_dirs(): XML2_CONFIG = os.environ.get('XML2_CONFIG',
'xml2-config') PKG_CONFIG = os.environ.get('PKG_CONFIG', 'pkg-config')

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):
Toggle snippet (3 lines)
+ (propagated-inputs (list augeas python-cffi))

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:
Toggle snippet (3 lines)
guix shell python-<name> python -- python3 'import <nmae>'

Nix has 100k packages, and may provide some insight on which inputs and
where the package expects ;-)


--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmZGZMoACgkQdtcnv/Ys
0rWHtg/8D6lqWcqJMLOoRYLYTMBzZt6cUqt8xN8EiC748PEppV0GyRioquK7nFjr
o/ppOajFQAKPMXPHgt6fLM4kxCwLBoJlzes3PylpFGR4sGodm3qH74MkJnAX6Ojx
U7QiRG+aUlQ/v9Uowtuo5UpIhr95sihP5zRFaSAw0GbBdCmPW98RztJuwYQXOgmF
1cDpjqHgX49sYM2apJ3Pe04P9KyStrdPwXLW8b7cTP8lQ3yzCxBfP8gyoMrWH7Lz
uF0TuszB1QEJ3hHFU9QG0d61xXwLAc3zVbLkZjgPp6zc45/ul2kaYR9V7/UHa1k/
pluNabFHJoglD/hJPQNnxLdMYY2CkcGNaeiDbGZZ13FWaQJzE27ks5oTDRSkgIzf
S3gj6/49hjZvJ9041X78csFncVg04L6zC/wB0epXXJxcq6ONYEiPDeDrhYuNVlWs
yUWHw9ESPYbKj+P5Lv4/gR7i3htBodfYmOIEtMl/ab/0wlzW2iRk1lwYGNVxrmnR
l1Y5x2sI9V2KnPLCHk14g+uGncp00x06ZPj/G0EToSobBz652ZINUo7Uon6HdysY
cC/INNhIZuOkL9t0zyaAtaVfkmWXkub4+fz+f16m4pJeRRUUbXUyRbiy2v9OTNbj
8YJablHQzkLC0uF+iTcNSkQWYN4d7lo2ok59DT/KBRXzlsKJ/Zk=
=I4RR
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 17 May 14:24 +0200
[PATCH v2 1/2] gnu: augeas: Update to 1.14.1.
(address . 70976@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
95b34da7c7a0a3e264c393b25e1f20bf6391ec97.1715948645.git.poptsov.artyom@gmail.com
* gnu/packages/augeas.scm (augeas): Update to 1.14.1.
[source]: Use tarballs from GitHub.
[inputs]: Change to "native-inputs". Add readline.

Change-Id: I9ca46b8a50d11c75ff6d816f2f15e1f005877244
---
gnu/packages/augeas.scm | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/augeas.scm b/gnu/packages/augeas.scm
index 2fd933604c..edea5e19c3 100644
--- a/gnu/packages/augeas.scm
+++ b/gnu/packages/augeas.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
(define-module (gnu packages augeas)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
@@ -33,22 +35,24 @@ (define-module (gnu packages augeas)
(define-public augeas
(package
(name "augeas")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
+ ;; XXX: Released archives have pre-generated "configure" script that
+ ;; allows to simplify the package definition.
(method url-fetch)
- (uri (string-append "http://download.augeas.net/augeas-"
- version ".tar.gz"))
+ (uri
+ (string-append
+ "https://github.com/hercules-team/augeas/releases/download/"
+ "release-" version
+ "/augeas-" version ".tar.gz"))
(sha256
(base32
- "11ybhb13wkkilsn7b416a1dn61m1xrq0lbdpkhp5w61jrk4l469j"))))
+ "1zzdp5bwnszza5q6cjw66hkicay8b49n5pda7cbcgfg4hbbzv2rn"))))
(build-system gnu-build-system)
- ;; Marked as "required" in augeas.pc.
(propagated-inputs
(list libxml2))
- (inputs
- (list readline))
(native-inputs
- (list pkg-config))
+ (list readline pkg-config))
(home-page "https://augeas.net")
(synopsis "Edit configuration files programmatically")
(description

base-commit: 5a624adfd7b14c3717237d137bd0766c77f0f570
--
2.41.0
A
A
Artyom V. Poptsov wrote on 17 May 14:24 +0200
[PATCH v2 2/2] gnu: Add python-augeas.
(address . 70976@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
e70ad3c57f353c4b38892879ee667ddfb44f3ed9.1715948645.git.poptsov.artyom@gmail.com
* gnu/packages/python-xyz.scm (python-augeas): New variable.

Change-Id: I46d409debfbc358f0ff27c505fba089ceab4e195
---
gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ddc697f71b..1e259724ae 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -176,6 +176,7 @@ (define-module (gnu packages python-xyz)
#:use-module (gnu packages algebra)
#:use-module (gnu packages astronomy)
#:use-module (gnu packages attr)
+ #:use-module (gnu packages augeas)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
@@ -414,6 +415,36 @@ (define-public python-awkward-cpp
package. It is not useful on its own, only as a dependency for awkward.")
(license license:bsd-3)))
+(define-public python-augeas
+ (package
+ (name "python-augeas")
+ (version "1.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hercules-team/python-augeas")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1l17gl23f5naram1jaab7gjr9bhjdj97fd9sydvs7cmpns91rbrf"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (delete 'wrap)
+ (add-before 'check 'configure-environment
+ (lambda _
+ (setenv "LD_LIBRARY_PATH"
+ (string-append #$(this-package-input "augeas")
+ "/lib")))))))
+ (native-inputs (list python-pytest python-cffi pkg-config))
+ (inputs (list augeas libxml2))
+ (home-page "https://github.com/hercules-team/python-augeas")
+ (synopsis "Python bindings for Augeas")
+ (description "Pure Python bindings for @url{https://augeas.net, Augeas}.")
+ (license license:lgpl2.1)))
+
(define-public python-awkward
(package
(name "python-awkward")
--
2.41.0
S
S
Sharlatan Hellseher wrote on 23 May 01:50 +0200
[PATCH] gnu: Add python-augeas.
(address . 70976-done@debbugs.gnu.org)
87msoh8kzt.fsf@gmail.com
Hi,

I've placed python-augeas to (gnu packages augeas) module next to
augeas package and slightly adjust it to make it pass the tests.

Pushed as ee86a504e9..8f0b5e35f3 to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmZOhLYACgkQdtcnv/Ys
0rVdVRAAlT4zVCXDqacRnaRR24+gUcApFFppAxDQH0B71Cy86FFhV92eSKpP2xB5
8CwUl69/7Y6a+mYKsX10pcKBD8DeuNP8FgWUiXB4w3qhQfZ17ShL3XhAGGcWN7XN
fo+1GdygJ5AXv9ZG1xbYZ6iZDu5BdHAEUb8fBYjGstg8s0mgkp4h1x+E1iY1tISb
uoLICe6N2GcaESjdGzD0biNAv8YUQf6V3JIaV4oUUToDyNR5tr8Nm74ikgx2haz4
oHGYOCNri5sQJVhmPlIxAZ7J6yXKaKDl/7JwhTtHQJ+cu3eK/pgUTo/Trlm6nZla
rIcfeN5PpIfTjJW1V7asZHfslID3CBl3DPZr6+qssOz869q6AsE5ZwJEUTjQY3J1
OAiM3JwjmY139kt5hMyqK+9BDR6Wja/Qu27u/HKEDxsdLTlvp9aiiqzmMJiIcc7x
3oIxejqPdl7nIiCXrWPrZV6eiXO5mvFoI92AV4W5KAHy20UKrtx6T0BKFLlbBQ6o
jErP3CNy8B+KC7VZRnDfa6pn9HIkNpShEI/9sJQMvnkXAPbAQzQHFakoAXwk+7ss
RjsFNGIXVQ+j7pJem2SKFcYwgAFi7aPHsygbAjiIme2TYU3DT9Xq4Zown8ZyZG0x
CGyIXZvcjmpNrwgdqBti2dHOKoxkkDpMSIvlSFFg2KWOjNHor98=
=/Dal
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70976@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70976
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch