From 86a028454186ef489ebc77b8fbfbff65e47a91c7 Mon Sep 17 00:00:00 2001 From: Peter Badida Date: Sat, 28 Jan 2017 19:54:46 +0100 Subject: [PATCH] Fix names for archive wheels --- appveyor.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 727d04c0f..bfb6bf09a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -93,14 +93,6 @@ build_script: Check-Error - $WHEEL_VERSION_T = python -c "import kivy;print(kivy.__version__)" --config "kivy:log_level:error" - - Check-Error - - python -c "from os.path import join;kv=join('$env:APPVEYOR_BUILD_FOLDER','kivy','__init__.py');f=open(kv);s=f.read().replace('$WHEEL_VERSION_T','$WHEEL_VERSION_T`.$WHEEL_DATE`.$GIT_TAG');f.close();f=open(kv,'w');f.write(s);f.close()" - - Check-Error - $WHEEL_VERSION = python -c "import kivy;print(kivy.__version__)" --config "kivy:log_level:error" Check-Error @@ -120,10 +112,15 @@ build_script: $DO_WHEEL = "True" + # Set new wheel name, keep default if release (tag) + # release: Kivy-X.Y.Z-cpAB-cpABm-ARCH.whl + # nightly: Kivy-X.Y.Z.dev0-cpAB-cpABm-ARCH.whl + # archive: Kivy-X.Y.Z.dev0.YYYYMMDD.githash-cpAB-cpABm-ARCH.whl + if ($env:APPVEYOR_REPO_TAG -eq "true"){ - $WHEEL_NAME = "-cp" + $WHEEL_NAME = "dev0-cp" } elseif ($env:APPVEYOR_SCHEDULED_BUILD -eq "True" -or $env:APPVEYOR_FORCED_BUILD -eq "True" -or $env:APPVEYOR_RE_BUILD -eq "True"){ - $WHEEL_NAME = "_$WHEEL_DATE`_git_$GIT_TAG-cp" + $WHEEL_NAME = "dev0.$WHEEL_DATE`.$GIT_TAG-cp" } else { $DO_WHEEL = "False" } @@ -169,16 +166,21 @@ build_script: python setup.py bdist_wheel -d "$env:WHEEL_DIR" Check-Error - $WHEEL_FNAME = python -c "from os import listdir;print(listdir(r'$env:WHEEL_DIR')[0])".Replace("_dev0", "") + # Default file bdist_wheel creates: + # Kivy-X.Y.Z[.dev0]-cpAB-cpABm-ARCH.whl + + $WHEEL_DEFAULT = python -c "from os import listdir;print(listdir(r'$env:WHEEL_DIR')[0])" + + echo "Wheel file: $env:WHEEL_DIR\$WHEEL_DEFAULT" + + $WHEEL_NIGHTLY = $WHEEL_DEFAULT.Replace("dev0-cp", $WHEEL_NAME) + + echo "Nightly file: $env:WHEEL_DIR\$WHEEL_NIGHTLY" + Check-Error - echo "Wheel file: $env:WHEEL_DIR\$WHEEL_FNAME" - Check-Error - $NEW_WHEEL_FNAME = python -c "print('$WHEEL_FNAME'.replace('_dev0','.dev0').replace('.$WHEEL_DATE', '').replace('.$GIT_TAG`', ''))" - Check-Error - - echo "Copying from $WHEEL_FNAME to nightly $NEW_WHEEL_FNAME" - Copy-Item "$env:WHEEL_DIR\$WHEEL_FNAME" "$env:WHEEL_DIR\$NEW_WHEEL_FNAME" + echo "Copying from default $WHEEL_DEFAULT to nightly $WHEEL_NIGHTLY" + Copy-Item "$env:WHEEL_DIR\$WHEEL_DEFAULT" "$env:WHEEL_DIR\$WHEEL_NIGHTLY" Check-Error dir "$env:WHEEL_DIR"