Patchwork [evolve-ext] py3: make setup.py py3 compatible

login
register
mail settings
Submitter Ludovic Chabant
Date June 28, 2019, 9:08 p.m.
Message ID <90daf413dfc7a7e4762e.1561756097@devahi>
Download mbox | patch
Permalink /patch/40720/
State New
Headers show

Comments

Ludovic Chabant - June 28, 2019, 9:08 p.m.
# HG changeset patch
# User Ludovic Chabant <ludovic@chabant.com>
# Date 1561756040 0
#      Fri Jun 28 21:07:20 2019 +0000
# Branch stable
# Node ID 90daf413dfc7a7e4762e6445f05c52b123c6188f
# Parent  756db65030c64b22836fe236d1db3b95477e3ef7
py3: make setup.py py3 compatible

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,8 @@ 
 def get_metadata():
     meta = {}
     fullpath = join(dirname(__file__), META_PATH)
-    execfile(fullpath, meta)
+    with open(fullpath, 'r') as fp:
+        exec(fp.read(), meta)
     return meta
 
 def get_version():