superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: A couple of setup.py fixes (#5338)
Date Wed, 04 Jul 2018 21:04:41 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 81bd5cc  A couple of setup.py fixes (#5338)
81bd5cc is described below

commit 81bd5cc4c3a0fe2ffc21b00f8d049f1a51b66377
Author: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
AuthorDate: Wed Jul 4 23:04:39 2018 +0200

    A couple of setup.py fixes (#5338)
    
    * setup: fix long description read in python2
    
    * setup: fix git_get_sha in python3
    
    Fix #5317
---
 setup.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 3401902..0e7243f 100644
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@ from __future__ import division
 from __future__ import print_function
 from __future__ import unicode_literals
 
+import io
 import json
 import os
 import subprocess
@@ -16,14 +17,14 @@ PACKAGE_FILE = os.path.join(PACKAGE_DIR, 'package.json')
 with open(PACKAGE_FILE) as package_file:
     version_string = json.load(package_file)['version']
 
-with open('README.md', encoding='utf-8') as f:
+with io.open('README.md', encoding='utf-8') as f:
     long_description = f.read()
 
 
 def get_git_sha():
     try:
-        s = str(subprocess.check_output(['git', 'rev-parse', 'HEAD']))
-        return s.strip()
+        s = subprocess.check_output(['git', 'rev-parse', 'HEAD'])
+        return s.decode().strip()
     except Exception:
         return ''
 


Mime
View raw message