From 43d37ed97487d4907a3260f99e09ba39ad025e6a Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 23 Oct 2025 19:25:49 +0100 Subject: [PATCH] gnu: Add python-iniparse. * gnu/packages/python-xyz.scm (python-iniparse): New variable. Change-Id: I414687a654d577e8054e1c6a574f9443128dc6a7 --- gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 2c1859eaefe50449b9698f10cb5e08bb96e4c292..c44758762dbc3dc824e2527535de7062ee9e3c62 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1110,6 +1110,51 @@ supports: identities.") (license license:asl2.0))) +(define-public python-iniparse + (package + (name "python-iniparse") + (version "0.5.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/candlepin/python-iniparse") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hh676j1yw7krwmzpaxl59bhl5g04dbbzbr84qryrw420npy2prp")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-backend #~'custom + #:test-flags #~(list "runtests.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'disable-tests + (lambda _ + ;; XXX: Three tests failed to compare lists. + (substitute* "tests/test_compat.py" + (("test_read_returns_file_list") + "disabled_test_read_returns_file_list"))))))) + (native-inputs + (list python-setuptools)) + (home-page "https://github.com/candlepin/python-iniparse") + (synopsis "Accessing and Modifying INI files") + (description + "iniparse is a INI parser for Python which is: +@itemize +@item Compatible with ConfigParser: Backward compatible implementations of +ConfigParser, RawConfigParser, and SafeConfigParser are included that are +API-compatible with the Python standard library. +@item Preserves structure of INI files: Order of sections & options, +indentation, comments, and blank lines are preserved as far as possible when +data is updated. +@item More convenient: Values can be accessed using dotted notation +(@code{cfg.user.name}), or using container syntax +(@code{cfg['user']['name']}). +@end itemize") + (license license:expat))) + (define-public python-inotify (package (name "python-inotify")