We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b21bfb3 commit 4e65484Copy full SHA for 4e65484
roundup/dist/command/build_scripts.py
@@ -96,7 +96,13 @@ def copy_scripts(self):
96
""" Create each script listed in 'self.scripts'
97
"""
98
99
- to_module = string.maketrans('-/', '_.')
+ try:
100
+ # Python 3.
101
+ maketrans = str.maketrans
102
+ except AttributeError:
103
+ # Python 2.
104
+ maketrans = string.maketrans
105
+ to_module = maketrans('-/', '_.')
106
107
self.mkpath(self.build_dir)
108
for script in self.scripts:
@@ -111,7 +117,7 @@ def copy_scripts(self):
111
117
continue
112
118
113
119
module = os.path.splitext(os.path.basename(script))[0]
114
- module = string.translate(module, to_module)
120
+ module = module.translate(to_module)
115
121
script_vars = {
116
122
'python': self.python_executable,
123
'package': self.package_name,
0 commit comments