diff --git a/README.md b/README.md index 1d3baae..e0cce29 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ https://youtu.be/0bBKOFdQKzo Install ======= -Vy actually demands python 2.7 to run. +Vy actually demands python 2.7 or python3.x to run. This is a short script to install the latest version of vy. @@ -111,6 +111,10 @@ This is a short script to install the latest version of vy. python setup.py install +To build vy in Python3 flavor, you need to run setup.py with the python3 interpreter, +as well as installing python3-tkinter and python3-pygments instead pf their python2 +equivalents. + Once you have installed vy and its dependencies, run on a terminal the following command. diff --git a/setup.py b/setup.py index 903ae72..b6868c2 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,13 @@ #! /usr/bin/env python from distutils.core import setup + +try: + from distutils.command.build_py import build_py_2to3 \ + as build_py +except ImportError: + from distutils.command.build_py import build_py + setup(name="vy", version="0.1", packages=["vyapp", @@ -14,21 +21,6 @@ scripts=['vy'], package_data={'vyapp': ['vyrc', '/vyapp/vyrc']}, author="Iury O. G. Figueiredo", - author_email="ioliveira@id.uff.br") - - - - - - - - - - - - - - - - - + author_email="ioliveira@id.uff.br", + cmdclass = {'build_py': build_py} +) diff --git a/vy b/vy index 53a7451..006d2e6 100755 --- a/vy +++ b/vy @@ -15,7 +15,7 @@ if __name__ == '__main__': root = App() lst = eval(str(opt.lst)) - lst = lst + map(lambda ind: [[ind]], args) + lst = lst + list(map(lambda ind: [[ind]], args)) if not lst: root.note.create('None') else: root.note.load(*lst) diff --git a/vyapp/stdout.py b/vyapp/stdout.py index 5f31f9f..e15c121 100644 --- a/vyapp/stdout.py +++ b/vyapp/stdout.py @@ -38,6 +38,8 @@ def remove(self, fd): def write(self, data): for ind in self.base: + if sys.version_info >= (3, 0): + data = str(data) ind.write(data) def echo(data):