diff options
author | Anthon van der Neut <anthon@mnt.org> | 2016-01-08 22:32:36 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2016-01-08 22:32:36 +0100 |
commit | 16e107a8b0d79a9dc3bbfa57a14dfa63e2a7ca1b (patch) | |
tree | a6b80c3b56a7d088bee65f0567dfcc94a9eec814 | |
parent | d444338e4438323535476461414e1652bdd75cb3 (diff) | |
download | ruamel.yaml-16e107a8b0d79a9dc3bbfa57a14dfa63e2a7ca1b.tar.gz |
minor 3.x compatibility changes in helper script make_win_whl.py
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | __init__.py | 2 | ||||
-rw-r--r-- | emitter.py | 4 | ||||
-rw-r--r-- | make_win_whl.py | 10 |
4 files changed, 13 insertions, 5 deletions
@@ -17,6 +17,8 @@ cython: ext/_yaml.c ext/_yaml.c: ext/_yaml.pyx cd ext; cython _yaml.pyx +ls-l: + ls -l dist/*$(VERSION)* #tstvenv: testvenv testsetup testtest # diff --git a/__init__.py b/__init__.py index be2bf4b..5f21af3 100644 --- a/__init__.py +++ b/__init__.py @@ -9,7 +9,7 @@ from __future__ import absolute_import _package_data = dict( full_package_name="ruamel.yaml", - version_info=(0, 10, 12), + version_info=(0, 10, 13), author="Anthon van der Neut", author_email="a.van.der.neut@ruamel.eu", description="ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order", # NOQA @@ -1215,6 +1215,10 @@ class Emitter(object): except ValueError: col = self.column + 1 # print('post_comment', self.line, self.column, value) + try: + value = value.encode('utf-8') + except UnicodeDecodeError: + pass self.stream.write(' ' * (col - self.column) + value) self.write_line_break() diff --git a/make_win_whl.py b/make_win_whl.py index 0273d2b..df6a2ae 100644 --- a/make_win_whl.py +++ b/make_win_whl.py @@ -1,4 +1,6 @@ +from __future__ import print_function + """ The windows whl file has no C stuff but a ruamel.yaml-0.9.2-py2-none-any.whl file overrules the .tar.gz on Linux. @@ -15,18 +17,18 @@ import shutil def main(): src = sys.argv[1] - print src, '-->' + print(src, '-->') dir_name = os.path.dirname(src) base_name = os.path.basename(src) p, v, rest = base_name.split('-', 2) - #print dir_name + # print dir_name for pyver in ['cp26', 'cp27', 'cp33', 'cp34']: for platform in ['win32', 'win_amd64']: dst = os.path.join(dir_name, '%s-%s-%s-none-%s.whl' % ( p, v, pyver, platform )) - print dst + print(dst) shutil.copy(src, dst) -main()
\ No newline at end of file +main() |