@@ -83,9 +83,9 @@ OS="not-detected-yet"
83
83
ARCH=" not-detected-yet"
84
84
85
85
# Initialize default values, some are overwritten from pythia.conf.
86
- PYTHON_NAME=" not.yet.defined"
87
86
PYTHON_CONFIGURATION=" NOT-YET-DEFINED"
88
- PYTHON_VERSION=" not.defined.yet"
87
+ PYTHON_NAME=" not-yet-determined"
88
+ PYTHON_VERSION=" not-determined-yet"
89
89
PYTHON_PLATFORM=" unknown-os-and-arch"
90
90
BINARY_DIST_URI=" https://github.com/chevah/pythia/releases/download"
91
91
PIP_INDEX_URL=" https://pypi.org/simple"
@@ -107,7 +107,7 @@ check_source_folder() {
107
107
# Called to trigger the entry point in the virtual environment.
108
108
# Can be overwritten in pythia.conf
109
109
execute_venv () {
110
- " $PYTHON_BIN " -c " from paver.tasks import main; main()" " $@ "
110
+ " $PYTHON_BIN " -X utf8 - c " from paver.tasks import main; main()" " $@ "
111
111
}
112
112
113
113
@@ -149,6 +149,8 @@ clean_build() {
149
149
delete_folder " $DIST_FOLDER "
150
150
echo " Removing publish/..."
151
151
delete_folder publish/
152
+ echo " Removing node_modules/..."
153
+ delete_folder node_modules/
152
154
153
155
# In some case pip hangs with a build folder in temp and
154
156
# will not continue until it is manually removed.
@@ -189,7 +191,7 @@ delete_folder() {
189
191
local target=" $1 "
190
192
# On Windows, we use internal command prompt for maximum speed.
191
193
# See: https://stackoverflow.com/a/6208144/539264
192
- if [ " $OS " = " win " ]; then
194
+ if [ " $OS " = " windows " ]; then
193
195
if [ -d " $target " ]; then
194
196
cmd //c " del /f/s/q $target > nul"
195
197
cmd //c " rmdir /s/q $target "
@@ -225,7 +227,7 @@ execute() {
225
227
update_path_variables () {
226
228
resolve_python_version
227
229
228
- if [ " $OS " = " win " ] ; then
230
+ if [ " $OS " = " windows " ] ; then
229
231
PYTHON_BIN=" /lib/python.exe"
230
232
PYTHON_LIB=" /lib/Lib/"
231
233
else
@@ -293,12 +295,15 @@ resolve_python_version() {
293
295
candidate=" ${version_configuration_array[$i]} "
294
296
candidate_platform=" $( echo " $candidate " | cut -d" @" -f1) "
295
297
candidate_version=" $( echo " $candidate " | cut -d" @" -f2) "
298
+ candidate_name=" $( echo " $candidate_version " | cut -d" ." -f1-2) "
296
299
if [ " $candidate_platform " = " default" ]; then
297
- # On first pass, we set the default version.
300
+ # On first pass, we set the default version and name .
298
301
PYTHON_VERSION=" $candidate_version "
302
+ PYTHON_NAME=" python${candidate_name} "
299
303
elif [ -z " ${PYTHON_PLATFORM% " $candidate_platform " * } " ]; then
300
- # If matching a specific platform, we overwrite the default version .
304
+ # If matching a specific platform, we overwrite the defaults .
301
305
PYTHON_VERSION=" $candidate_version "
306
+ PYTHON_NAME=" python${candidate_name} "
302
307
fi
303
308
done
304
309
}
@@ -308,7 +313,7 @@ resolve_python_version() {
308
313
# Install base package.
309
314
#
310
315
install_base_deps () {
311
- echo " ::groups ::Installing base requirements:" " ${BASE_REQUIREMENTS[@]} "
316
+ echo " ::group ::Installing base requirements:" " ${BASE_REQUIREMENTS[@]} "
312
317
313
318
set +e
314
319
# There is a bug in pip/setuptools when using custom build folders.
@@ -365,7 +370,7 @@ get_binary_dist() {
365
370
local dist_name=" $1 "
366
371
local remote_base_url=" $2 "
367
372
368
- echo " Getting $dist_name from $remote_base_url ..."
373
+ echo " Getting $dist_name from $remote_base_url ..."
369
374
370
375
tar_gz_file=" $dist_name " .tar.gz
371
376
tar_file=" $dist_name " .tar
@@ -393,7 +398,7 @@ test_version_exists() {
393
398
local remote_base_url=" $1 "
394
399
local target_file=" python-$PYTHON_VERSION -$OS -$ARCH .tar.gz"
395
400
396
- echo " Checking $remote_base_url /$PYTHON_VERSION /$target_file ..."
401
+ echo " Checking $remote_base_url /$PYTHON_VERSION /$target_file ..."
397
402
" ${ONLINETEST_CMD[@]} " " $remote_base_url " /" $PYTHON_VERSION " /" $target_file "
398
403
return $?
399
404
}
@@ -473,7 +478,8 @@ copy_python() {
473
478
get_python_dist " $BINARY_DIST_URI "
474
479
fi
475
480
476
- echo " Copying Python distribution files... "
481
+ echo " Copying Python distribution files from $python_distributable " \
482
+ " to $BUILD_FOLDER ... "
477
483
cp -R " $python_distributable " /* " $BUILD_FOLDER "
478
484
479
485
echo " ::endgroup::"
@@ -679,24 +685,28 @@ check_glibc_version(){
679
685
680
686
check_musl_version (){
681
687
local musl_version
688
+ local musl_version_cleaned
682
689
local musl_version_array
683
690
local musl_version_unsupported=" false"
684
691
local supported_musl11_version=24
685
692
686
693
echo " No specific runtime for the current distribution / version / arch."
687
694
echo " Minimum musl version for this arch: 1.1.$supported_musl11_version ."
688
695
689
- # Tested with musl 1.1.24/1.2.2.
696
+ # Tested with musl 1.1.24/1.2.2/1.2.4_git20230717/1.2.5 .
690
697
musl_version=" $( grep -E ^" Version" " $ldd_output_file " | cut -d" " -f2) "
691
698
rm " $ldd_output_file "
692
699
693
- if [[ " $musl_version " =~ [^[:digit:]\. ] ]]; then
694
- (>&2 echo " Musl version should only have digits and dots, but:" )
695
- (>&2 echo " \$ musl_version=$musl_version " )
700
+ # Some Alpine Linux releases (e.g. Alpine 3.19) use git-versioned musl.
701
+ musl_version_cleaned=" ${musl_version// _git/ .} "
702
+
703
+ if [[ " $musl_version_cleaned " =~ [^[:digit:]\. ] ]]; then
704
+ (>&2 echo " Cleaned musl version should only have digits and dots, but" )
705
+ (>&2 echo " \$ musl_version_cleaned=$musl_version_cleaned " )
696
706
exit 25
697
707
fi
698
708
699
- IFS=. read -r -a musl_version_array <<< " $musl_version "
709
+ IFS=. read -r -a musl_version_array <<< " $musl_version_cleaned "
700
710
701
711
# Decrement supported_musl11_version above if building against older musl.
702
712
if [ " ${musl_version_array[0]} " -lt 1 ]; then
@@ -736,7 +746,7 @@ detect_os() {
736
746
case " $OS " in
737
747
MINGW* |MSYS* )
738
748
ARCH=" $( uname -m) "
739
- OS=" win "
749
+ OS=" windows "
740
750
;;
741
751
Linux)
742
752
ARCH=" $( uname -m) "
0 commit comments