Change use_python2 [N] to use_python3 [Y]

Fixes #747
This commit is contained in:
Andreas Meistad 2016-08-21 22:11:01 +02:00
parent d56551f888
commit 41059ff4df
13 changed files with 16 additions and 15 deletions

View File

@ -45,6 +45,7 @@ Listed in alphabetical order.
Alex Tsai `@caffodian`_
Alvaro [Andor] `@andor-pierdelacabeza`_
Amjith Ramanujam `@amjith`_
Andreas Meistad `@ameistad`_
Andres Gonzalez `@andresgz`_
Andrew Mikhnevich `@zcho`_
Andy Rose

View File

@ -122,7 +122,7 @@ Answer the prompts with your own desired options_. For example::
use_opbeat [n]: y
use_pycharm [n]: y
windows [n]: n
use_python2 [n]: n
use_python3 [y]: y
use_docker [y]: n
use_heroku [n]: y
use_compressor [n]: y

View File

@ -14,7 +14,7 @@
"use_opbeat": "n",
"use_pycharm": "n",
"windows": "n",
"use_python2": "n",
"use_python3": "y",
"use_docker": "y",
"use_heroku": "n",
"use_compressor": "n",

View File

@ -54,9 +54,9 @@ use_pycharm [n]
windows [n]
Whether you'll be developing on Windows.
use_python2 [n]
use_python3 [y]
By default, the Python code generated will be for Python 3.x. But if you
answer `y` here, it will be legacy Python 2.7 code.
answer `n` here, it will be legacy Python 2.7 code.
use_docker [y]
Whether to use Docker_, separating the app and database into separate

View File

@ -8,7 +8,7 @@ before_install:
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
language: python
python:
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
- "3.5"
{% else %}
- "2.7"

View File

@ -1,4 +1,4 @@
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
FROM python:3.5
{% else %}
FROM python:2.7

View File

@ -1,4 +1,4 @@
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
FROM python:3.5
{% else %}
FROM python:2.7

View File

@ -1,4 +1,4 @@
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
# Wheel 0.25+ needed to install certain packages on CPython 3.5+
# like Pillow and psycopg2
# See http://bitly.com/wheel-building-fails-CPython-35

View File

@ -1 +1 @@
{% if cookiecutter.use_python2 == 'n' -%}python-3.5.1{% else %}python-2.7.10{%- endif %}
{% if cookiecutter.use_python3 == 'y' -%}python-3.5.1{% else %}python-2.7.10{%- endif %}

View File

@ -6,7 +6,7 @@ PROJECT_DIR="$(dirname "$WORK_DIR")"
pip --version >/dev/null 2>&1 || {
echo >&2 -e "\npip is required but it's not installed."
echo >&2 -e "You can install it by running the following command:\n"
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
echo >&2 "wget https://bootstrap.pypa.io/get-pip.py --output-document=get-pip.py; chmod +x get-pip.py; sudo -H python3 get-pip.py"
{% else %}
echo >&2 "wget https://bootstrap.pypa.io/get-pip.py --output-document=get-pip.py; chmod +x get-pip.py; sudo -H python2 get-pip.py"
@ -19,7 +19,7 @@ pip --version >/dev/null 2>&1 || {
virtualenv --version >/dev/null 2>&1 || {
echo >&2 -e "\nvirtualenv is required but it's not installed."
echo >&2 -e "You can install it by running the following command:\n"
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
echo >&2 "sudo -H pip3 install virtualenv"
{% else %}
echo >&2 "sudo -H pip2 install virtualenv"
@ -32,7 +32,7 @@ virtualenv --version >/dev/null 2>&1 || {
if [ -z "$VIRTUAL_ENV" ]; then
echo >&2 -e "\nYou need activate a virtualenv first"
echo >&2 -e 'If you do not have a virtualenv created, run the following command to create and automatically activate a new virtualenv named "venv" on current folder:\n'
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
echo >&2 -e "virtualenv venv --python=\`which python3\`"
{% else %}
echo >&2 -e "virtualenv venv --python=\`which python2\`"

View File

@ -3,7 +3,7 @@
build-essential
#required to translate
gettext
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
python3-dev
{% else %}
python-dev

View File

@ -3,7 +3,7 @@
build-essential
#required to translate
gettext
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
python3-dev
{% else %}
python-dev

View File

@ -3,7 +3,7 @@
build-essential
#required to translate
gettext
{% if cookiecutter.use_python2 == 'n' -%}
{% if cookiecutter.use_python3 == 'y' -%}
python3-dev
{% else %}
python-dev