blob: e9af4a8861080dcaafca1e999eb8c0d09e6f75ee [file] [log] [blame]
$syspython="python.exe"
$ve="$HOME\.virtualenvs\colorama"
$bin="$ve\Scripts"
# Upload to the test PyPI.
& $bin\twine.exe upload --repository testpypi dist\colorama-*
if(!$?) {
write-host " > Expect a 400 if package was already uploaded"
}
# cd elsewhere so we cannot import from local source.
mkdir -force sandbox | out-null
cd sandbox
# Create a temporary disposable virtualenv.
& $syspython -m venv --clear venv
# Install the package we just uploaded.
# (--extra-index-url for this project's requirements)
venv\Scripts\python -m pip --quiet install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple colorama==$version
# Import and use colorama from the temp virtualenv.
venv\Scripts\python.exe -c @"
import colorama;
colorama.init();
print(colorama.Fore.GREEN + ""OK Colorama "" + colorama.__version__ + "" from test pypi install."")
"@
cd ..