From 8ae14ab3ad7ba8afbeeb822a38af6f61655f8d24 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 30 Jul 2015 02:22:26 -0400 Subject: [PATCH] Finalize Windows build/release code (closes #95) --- appveyor.yml | 8 +++++++- scripts/release.sh | 9 +-------- scripts/win_wrapper.cmd | 4 ---- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9d0d8c8..ffefaee 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,9 @@ environment: WRAPPER: "cmd /E:ON /V:ON /C .\\scripts\\win_wrapper.cmd" PIP: "%WRAPPER% %PYTHON%\\Scripts\\pip.exe" SETUPPY: "%WRAPPER% %PYTHON%\\python setup.py --with-extension" + PYPI_USERNAME: "earwigbot" + PYPI_PASSWORD: + secure: gOIcvPxSC2ujuhwOzwj3v8xjq3CCYd8keFWVnguLM+gcL0e02qshDHy7gwZZwj0+ matrix: - PYTHON: "C:\\Python27" @@ -41,7 +44,7 @@ environment: PYTHON_ARCH: "64" install: - - "%PIP% install wheel" + - "%PIP% install wheel twine" build_script: - "%SETUPPY% build" @@ -52,6 +55,9 @@ test_script: after_test: - "%SETUPPY% bdist_wheel" +on_success: + - "twine upload dist\\* -u %PYPI_USERNAME% -p %PYPI_PASSWORD%" + artifacts: - path: dist\* diff --git a/scripts/release.sh b/scripts/release.sh index c256c7c..dd4e1d4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -80,18 +80,12 @@ upload_to_pypi() { echo " done." } -windows_build() { - echo "PyPI: building/uploading Windows binaries..." - echo "*** Run in Windows: ./scripts/win_build.py" - echo "*** Press enter when done." - read -} - post_release() { echo echo "*** Release completed." echo "*** Update: https://github.com/earwig/mwparserfromhell/releases/tag/v$VERSION" echo "*** Verify: https://pypi.python.org/pypi/mwparserfromhell" + echo "*** Verify: https://ci.appveyor.com/project/earwig/mwparserfromhell" echo "*** Verify: https://mwparserfromhell.readthedocs.org" echo "*** Press enter to sanity-check the release." read @@ -164,7 +158,6 @@ update_changelog update_docs_changelog do_git_stuff upload_to_pypi -windows_build post_release test_release diff --git a/scripts/win_wrapper.cmd b/scripts/win_wrapper.cmd index 3a472bc..13a4b1f 100644 --- a/scripts/win_wrapper.cmd +++ b/scripts/win_wrapper.cmd @@ -33,15 +33,11 @@ IF %MAJOR_PYTHON_VERSION% == "2" ( ) IF "%PYTHON_ARCH%"=="64" ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture SET DISTUTILS_USE_SDK=1 SET MSSdk=1 "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% call %COMMAND_TO_RUN% || EXIT 1 ) ELSE ( - ECHO Using default MSVC build environment for 32 bit architecture - ECHO Executing: %COMMAND_TO_RUN% call %COMMAND_TO_RUN% || EXIT 1 )