Skip to content

Commit 469076f

Browse files
committed
Py3-compatible get_version in setup.py.
1 parent 271d93f commit 469076f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
def get_version():
1818
basedir = os.path.dirname(__file__)
1919
with open(os.path.join(basedir, 'textile/version.py')) as f:
20-
VERSION = None
21-
exec(f.read())
22-
return VERSION
20+
variables = {}
21+
exec(f.read(), variables)
22+
return variables.get('VERSION')
2323
raise RuntimeError('No version info found.')
2424

2525
setup(

0 commit comments

Comments
 (0)