Skip to content

Commit

Permalink
Make the switch to Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
pR0Ps committed Jul 3, 2017
1 parent 5b2e81b commit c7fc580
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion out/gh-i2p
Submodule gh-i2p updated 2 files
+1 −1 app.py
+2 −2 requirements.txt
8 changes: 4 additions & 4 deletions scripts/update
Expand Up @@ -18,7 +18,7 @@ setup_venv(){
if [[ ! -d venv ]]; then
echo "Virtualenv not found, setting one up"

if ! virtualenv venv -p "$2"; then
if ! "$2" -m venv venv; then
echo "Setting up virtualenv failed"
return 1
fi
Expand Down Expand Up @@ -72,7 +72,7 @@ generate_site(){
# Generate the config files
generate_configs

setup_venv "$ROOT/pelican" python2
setup_venv "$ROOT/pelican" python3.6

echo "Generating the site"
pelican -s publishconf.py -o "$OUTPUT/www" content
Expand Down Expand Up @@ -101,7 +101,7 @@ generate_configs(){
echo "Running update script"

echo "Checking dependencies"
dependencies=( "python2" "python3" "virtualenv" )
dependencies=( "python3.6" )
for command in ${dependencies[@]}; do
if ! command -v "$command" &>/dev/null; then
echo "Missing dependency '$command', exiting"
Expand All @@ -114,7 +114,7 @@ echo "Updating submodules"
git submodule update --init --recursive --force

# Run/restart webapps
run_gunicorn "$OUTPUT/gh-i2p" python2
run_gunicorn "$OUTPUT/gh-i2p" python3.6

# Generate the site
generate_site

0 comments on commit c7fc580

Please sign in to comment.