guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit c5e95ae2b7e355b041f4cc5b68080f787b2a16f2
Author: Nicolas Graves <[email protected]>
AuthorDate: Thu Sep 18 22:24:15 2025 +0200
build-system: pyproject: Handle module.function entry points.
* guix/build/pyproject-build-system.scm (create-entrypoints)
[parse-entry-point]: Handle the case where the entry point has a
module prefixed.
Change-Id: I055b29a3a73a137537344ae810fa1de64277708f
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
guix/build/pyproject-build-system.scm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/guix/build/pyproject-build-system.scm
b/guix/build/pyproject-build-system.scm
index abce3ae844..28b9e96c9d 100644
--- a/guix/build/pyproject-build-system.scm
+++ b/guix/build/pyproject-build-system.scm
@@ -304,10 +304,15 @@ file entry_points.txt. This is necessary, because wheels
do not contain
these binaries and installers are expected to create them."
(define (parse-entry-point item-match)
- "Parse an entry point. Return a list of script, module and function."
- (list (match:substring item-match 1)
- (match:substring item-match 2)
- (match:substring item-match 3)))
+ "Parse an entry point. Return a list of script, module and function.
+Handle the case where the entry-point last part has a module prefixed."
+ (match (reverse (string-split (match:substring item-match 3) #\.))
+ ((name . reverse-modules)
+ (list (match:substring item-match 1)
+ (string-join (cons* (match:substring item-match 2)
+ (reverse reverse-modules))
+ ".")
+ name))))
(define (parse-line inside line)
(cond