Skip to content

Commit 29e5d17

Browse files
committed
setup.py: PY3 compatibility
1 parent 5ddd5fe commit 29e5d17

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212

1313
CURDIR = dirname(abspath(__file__))
1414

15-
execfile(join(CURDIR, 'src', 'robot', 'version.py'))
16-
VERSION = get_version()
17-
with open(join(CURDIR, 'README.rst')) as readme:
18-
LONG_DESCRIPTION = readme.read()
15+
with open(join(CURDIR, 'src', 'robot', 'version.py')) as f:
16+
exec(f.read())
17+
VERSION = get_version()
18+
with open(join(CURDIR, 'README.rst')) as f:
19+
LONG_DESCRIPTION = f.read()
1920
base_url = 'https://github.com/robotframework/robotframework/blob/master'
20-
for text in 'INSTALL', 'CONTRIBUTING':
21+
for text in ('INSTALL', 'CONTRIBUTING'):
2122
search = '`<{0}.rst>`__'.format(text)
2223
replace = '`{0}.rst <{1}/{0}.rst>`__'.format(text, base_url)
2324
if search not in LONG_DESCRIPTION:
@@ -48,8 +49,8 @@
4849
'robot.running.arguments', 'robot.running.timeouts',
4950
'robot.utils', 'robot.variables', 'robot.writer']
5051
PACKAGE_DATA = [join('htmldata', directory, pattern)
51-
for directory in 'rebot', 'libdoc', 'testdoc', 'lib', 'common'
52-
for pattern in '*.html', '*.css', '*.js']
52+
for directory in ('rebot', 'libdoc', 'testdoc', 'lib', 'common')
53+
for pattern in ('*.html', '*.css', '*.js')]
5354
if sys.platform.startswith('java'):
5455
SCRIPTS = ['jybot', 'jyrebot']
5556
elif sys.platform == 'cli':

0 commit comments

Comments
 (0)