mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-08-12 22:39:00 +08:00
environment dependencies
This commit is contained in:
parent
3e46bd636a
commit
41f7a46aaa
@ -34,6 +34,7 @@ Arguments:
|
||||
Virtual Environments:
|
||||
rmenv py# Remove virtual environment
|
||||
remkenv py# Remove, then create re-create virtual environment
|
||||
envprereq py# install environment prerequisites (official PyPi)
|
||||
|
||||
Deploy:
|
||||
deploy test Upload to PyPi test server
|
||||
@ -98,11 +99,13 @@ password=secret
|
||||
```
|
||||
# Python 2.x
|
||||
./deploy.sh remkenv py2
|
||||
./deploy.sh envprereq py2
|
||||
./deploy.sh install sdist py2
|
||||
./deploy.sh test installed py2
|
||||
|
||||
# Python 3.x
|
||||
./deploy.sh remkenv py3
|
||||
./deploy.sh envprereq py3
|
||||
./deploy.sh install sdist py3
|
||||
./deploy.sh test installed py3
|
||||
```
|
||||
|
@ -13,6 +13,12 @@ function lib_ver() {
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
function lib_prereq() {
|
||||
pushd .. > /dev/null
|
||||
python -c 'from setup import INSTALL_REQUIRES ; print(" ".join(INSTALL_REQUIRES))'
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
# ============ Local Parameters
|
||||
LIB_NAME=pygcode
|
||||
LIB_VER=$(lib_ver)
|
||||
@ -38,6 +44,7 @@ Arguments:
|
||||
Virtual Environments:
|
||||
rmenv py# Remove virtual environment
|
||||
remkenv py# Remove, then create re-create virtual environment
|
||||
envprereq py# install environment prerequisites (official PyPi)
|
||||
|
||||
Deploy:
|
||||
deploy test Upload to PyPi test server
|
||||
@ -89,6 +96,13 @@ function remkenv() {
|
||||
mkvirtualenv --python=${python_bin} ${env_name}
|
||||
}
|
||||
|
||||
function envprereq() {
|
||||
set_venv_variables $1
|
||||
workon ${env_name}
|
||||
${env_pip_bin} install $(lib_prereq)
|
||||
deactivate
|
||||
}
|
||||
|
||||
function deploy() {
|
||||
# Deploy compiled distributions to the test|prod server
|
||||
_deployment_env=$1
|
||||
@ -198,6 +212,7 @@ case "$1" in
|
||||
build) build ;;
|
||||
rmenv) rmenv $2 ;;
|
||||
remkenv) remkenv $2 ;;
|
||||
envprereq) envprereq $2 ;;
|
||||
deploy) deploy $2 ;;
|
||||
install) install $2 $3 ;;
|
||||
test) run_test $2 $3 ;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user