From c6efa62e3684ef380523fcb6c02d881c55fd1e3e Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Mon, 12 Oct 2015 08:51:10 +0100 Subject: [PATCH] [codecs] to read file --- .travis.yml | 6 +++--- setup.py | 12 ++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index b10abd8f..04be0017 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,8 +65,8 @@ deploy: password: secure: "vMEOlP7DQhFJ7hQAKtKC5hrJXFl5BkUt4nXdosWWiw//Kg8E+PPLg88XPI2gqIosir9wwgtbSBBbbwCxkM6uxRNMpoNR8Ixyv9fmSXp4rLl7bbBY768W7IRXKIBjpuEy2brQjoT+CwDDSzUkckHvuUjJDNRvUv8ab4P/qYO1LG4=" on: - #tags: true - branch: plot_density - server: https://testpypi.python.org/pypi + tags: true + branch: master + #server: https://testpypi.python.org/pypi distributions: "bdist_wheel sdist bdist_egg" skip_cleanup: true diff --git a/setup.py b/setup.py index ede89930..c13b9e63 100644 --- a/setup.py +++ b/setup.py @@ -42,14 +42,10 @@ import numpy as np def read(fname): - try: - with open(os.path.join(os.path.dirname(__file__), fname)) as f: - return unicode(f.read(), 'utf-8') - except NameError: - #python 3 - with open(os.path.join(os.path.dirname(__file__), fname)) as f: - return f.read() - + import codecs + with codecs.open('README.md', 'r', 'utf-8') as f: + print(f.read()) + def read_to_rst(fname): try: import pypandoc