$NetBSD: patch-aa,v 1.1.1.1 2004/03/30 13:27:08 recht Exp $

--- setup.py.orig	2004-03-30 01:31:06.000000000 +0200
+++ setup.py
@@ -51,6 +51,19 @@ class build_scripts_twisted(build_script
 
     def run(self):
         build_scripts.run(self)
+	# for pkgsrc we install each script with verssuffix, so Twisted
+	# can be shared among different Python versions
+	if os.getenv("PKGSRC") == "1":
+            for f in os.listdir(self.build_dir):
+                fpath=os.path.join(self.build_dir, f)
+                if not fpath.endswith(os.getenv("PYVERSSUFFIX")):
+                    try:
+                        os.unlink(fpath + os.getenv("PYVERSSUFFIX"))
+                    except EnvironmentError, e:
+                        if e.args[1]=='No such file or directory':
+                            pass
+                    os.rename(fpath, fpath + os.getenv("PYVERSSUFFIX"))
+	
         if os.name == "nt":
             for f in os.listdir(self.build_dir):
                 fpath=os.path.join(self.build_dir, f)
