Commit 5f40fce1 authored by Yuanle Song's avatar Yuanle Song
Browse files

v0.8.0 make it work with python3.

use python3 in venv by default.
parent 9e0b63a1
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -12,8 +12,19 @@
  doesn't exist.

  make sure it works on fresh system. use a VM to test it.
** DONE 2016-06-30 use python3 in venv by default.
- make old code work with python3.
  - add future imports

    from __future__ import (absolute_import, division, print_function,
                            unicode_literals)

** 2016-06-30 put venv in .venv dir.
  - pylint fails.

- fallback to python2 if python3 is NA.
  test it on both py2 and py3.

** DONE 2016-06-30 put venv in .venv dir.
- DONE update Makefile
- DONE update ./utils/bootstrap
  use a variable in template.
@@ -60,17 +71,6 @@

  just use the embedded virtualenv.

- DONE use python3 in venv by default.
  - make old code work with python3.
    - add future imports

      from __future__ import (absolute_import, division, print_function,
                              unicode_literals)

    - pylint fails.

  - DONE fallback to python2 if python3 is NA.

- DONE upgrade virtualenv and pip.
  virtualenv 15.0.2, pip 8.1.2 included.
  https://pypi.python.org/pypi/virtualenv
+1 −1
Original line number Diff line number Diff line
(defproject python/lein-template "0.7.0"
(defproject python/lein-template "0.8.0"
  :description "lein template for a python project"
  :repositories [["snapshots"
                  {:url "http://devserv.game.yy.com/nexus/content/repositories/snapshots"
+4 −1
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@
config variables
"""

from __future__ import (absolute_import, division, print_function,
                        unicode_literals, with_statement)

import {{name}}.configlogger
import logging
import os
@@ -44,7 +47,7 @@ def ensure_all_config_variable_defined():
    check_pass = True
    output = subprocess.check_output(r"""
rgrep 'CONF\.get' {{name}}/ |grep -o 'CONF\.get[a-z]\+("[^)]*")'|sed 's/.*("//; s/")//'
    """, shell=True).rstrip()
    """, shell=True).rstrip().decode("utf-8", 'ignore')
    all_keys = REQUIRED_KEYS + OPTIONAL_KEYS
    for line in output.split("\n"):
        if line and line not in all_keys:
+4 −1
Original line number Diff line number Diff line
@@ -5,10 +5,13 @@
config logger
"""

from __future__ import (absolute_import, division, print_function,
                        unicode_literals, with_statement)

import logging

from pkg_resources import resource_filename
from logging.config import fileConfig
from pkg_resources import resource_filename


logging.captureWarnings(True)
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@
python distribute file
"""

from __future__ import (absolute_import, division, print_function,
                        unicode_literals, with_statement)

from setuptools import setup, find_packages

Loading