~sirn/fanboi2

e4e6eb6477cc9c56500f1999fcd218a35e48e910 — Kridsada Thanabulpong 3 years ago 873c592
Update to Python 3.6.
3 files changed, 10 insertions(+), 9 deletions(-)

M CHANGES.rst
M README.rst
M Vagrantfile
M CHANGES.rst => CHANGES.rst +1 -0
@@ 5,6 5,7 @@ Next
- [Add] A ``fb2_topic_sync`` script for syncing topic's bumped timestamp.
- [Fix] CSRF check now use constant-time comparison to prevent timing attack.
- [Change] Requires minimum of 5 characters for post body.
- [Change] Codebase now uses `Python 3.6 <https://docs.python.org/3.6/whatsnew/changelog.html#python-3-6-4-final>`_.

0.10.1
------

M README.rst => README.rst +2 -2
@@ 34,7 34,7 @@ The Adventurous Way

If you don't really want to use Vagrant, you can also install everything using your preferred methods:

1. `Python 3.5 <https://www.python.org/downloads/>`_.
1. `Python 3.6 <https://www.python.org/downloads/>`_.
2. `PostgreSQL 9.5 <http://www.postgresql.org/>`_.
3. `Redis 3.0 <http://redis.io/>`_.
4. `Memcached 1.4 <http://www.memcached.org/>`_.


@@ 44,7 44,7 @@ After the package above are up and running, you may now setup the application::

    $ cp examples/development.ini.sample development.ini
    $ cp examples/alembic.ini.sample alembic.ini
    $ python3.5 setup.py develop
    $ python3.6 setup.py develop
    $ alembic upgrade head
    $ pserve development.ini


M Vagrantfile => Vagrantfile +7 -7
@@ 16,7 16,7 @@ Vagrant.configure("2") do |config|
    pkg install -y redis
    pkg install -y memcached
    pkg install -y bzip2 sqlite3 gmake
    pkg install -y python27 python35
    pkg install -y python27 python36

    sysrc postgresql_enable=YES
    sysrc redis_enable=YES


@@ 34,12 34,12 @@ Vagrant.configure("2") do |config|
    sh -c 'echo "host all all ::1/128 trust" >> /usr/local/pgsql/data/pg_hba.conf'
    service postgresql restart

    fetch -o - https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3.5 -
    /usr/local/bin/pip3.5 install virtualenv
    fetch -o - https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3.6 -
    /usr/local/bin/pip3.6 install virtualenv
  EOF

  config.vm.provision :shell, privileged: false, inline: <<-EOF
    virtualenv -p python3.5 $HOME/python3.5
    virtualenv -p python3.6 $HOME/python3.6

    mkdir $HOME/yarn
    curl -sL https://yarnpkg.com/latest.tar.gz | tar -xvzf - -C $HOME/yarn --strip 1


@@ 48,7 48,7 @@ Vagrant.configure("2") do |config|
    echo 'PAGER=more; export PAGER' >> $HOME/.profile
    echo 'ENV=$HOME/.shrc; export ENV' >> $HOME/.profile
    echo 'PATH="$HOME/yarn/bin:$PATH"' >> $HOME/.profile
    echo 'PATH="$HOME/python3.5/bin:$PATH"' >> $HOME/.profile
    echo 'PATH="$HOME/python3.6/bin:$PATH"' >> $HOME/.profile
    echo 'PATH="$HOME/bin:$PATH"' >> $HOME/.profile
    echo 'export PATH' >> $HOME/.profile



@@ 59,8 59,8 @@ Vagrant.configure("2") do |config|
    cp examples/development.ini.sample development.ini
    cp examples/alembic.ini.sample alembic.ini

    $HOME/python3.5/bin/pip3 install -e .
    $HOME/python3.5/bin/alembic upgrade head
    $HOME/python3.6/bin/pip3 install -e .
    $HOME/python3.6/bin/alembic upgrade head

    env PYTHON=/usr/local/bin/python2.7 $HOME/yarn/bin/yarn
    $HOME/yarn/bin/yarn run typings install