diff setup.py @ 1180:c1c0d7f6f2b4

remove string module usage, some other cosmetic changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 13 Aug 2006 23:43:20 +0200
parents f82f71d052cd
children 7fa381254061
line wrap: on
line diff
--- a/setup.py	Sun Aug 13 23:16:34 2006 +0200
+++ b/setup.py	Sun Aug 13 23:43:20 2006 +0200
@@ -8,7 +8,7 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-import glob, os, string, sys
+import os, sys, glob
 
 import distutils
 from distutils.core import setup
@@ -135,8 +135,6 @@
             raise Exception("You have to inherit build_scripts_create and"
                 " provide a package name")
 
-        to_module = string.maketrans('-/', '_.')
-
         self.mkpath(self.build_dir)
         for script in self.scripts:
             outfile = os.path.join(self.build_dir, os.path.basename(script))
@@ -150,7 +148,7 @@
                 continue
 
             module = os.path.splitext(os.path.basename(script))[0]
-            module = string.translate(module, to_module)
+            module = module.replace('-', '_').replace('/', '.')
             script_vars = {
                 'python': os.path.normpath(sys.executable),
                 'package': self.package_name,
@@ -189,7 +187,7 @@
         module files.
     """
     script = os.path.splitext(os.path.basename(path))[0]
-    script = string.replace(script, '_', '-')
+    script = script.replace('_', '-')
     if sys.platform == "win32":
         script = script + ".bat"
     return script