From 15eef8db2c06f536edee84fe524f5d8fcefd0a5f Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 30 Jul 2024 17:58:35 -0400 Subject: Version in package name (#15) * Compile test installation with debug symbols enabled * Fix typo in environment variable name * STASIS_GITHUB_TOKEN is supposed to be STASIS_GH_TOKEN * Add pattern matching mode selector to get_wheel_file() * Adds modes WHEEL_MATCH_EXACT and WHEEL_MATCH_ANY * test block version key is now optional * Now that *_packages lists define the package version through detection, because the end-result version cannot be guaranteed to be identical to the tag. * Find the just-compiled package matching the name and version in the package list. * If compiling master/main this can also match against post-commits (x.y.z.devN+hash) * Versions are extracted from the package name in the list, only if a matching test block exists. Otherwise the string is passed through to pip directly. * Changes indentation level of output * Do not replace @PIP_ARGUMENTS@ with an artifactory URL unless artifactory is enabled * Sequence change * Build requested packages before executing tests. A necessary evil if test blocks are no longer responsible for setting the version data * Show the delivery summary just before test execution, instead of at the start of the program * Terminate package name at version operator when a package is filtered for testing --- src/wheel.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/wheel.c') diff --git a/src/wheel.c b/src/wheel.c index 8f48828..b96df57 100644 --- a/src/wheel.c +++ b/src/wheel.c @@ -1,6 +1,6 @@ #include "wheel.h" -struct Wheel *get_wheel_file(const char *basepath, const char *name, char *to_match[]) { +struct Wheel *get_wheel_file(const char *basepath, const char *name, char *to_match[], unsigned match_mode) { DIR *dp; struct dirent *rec; struct Wheel *result = NULL; @@ -38,7 +38,11 @@ struct Wheel *get_wheel_file(const char *basepath, const char *name, char *to_ma } } - if (!startswith(rec->d_name, name) || match != pattern_count) { + if (!startswith(rec->d_name, name)) { + continue; + } + + if (match_mode == WHEEL_MATCH_EXACT && match != pattern_count) { continue; } -- cgit