diff setup.py @ 778:c02c3bcad99b

add some comment to POSIX platform moin command how to fix when it does not find MoinMoin module
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 10 Jun 2006 13:03:49 +0200
parents 38914e43f0dd
children 2438f386293f
line wrap: on
line diff
--- a/setup.py	Sat Jun 10 10:22:04 2006 +0200
+++ b/setup.py	Sat Jun 10 13:03:49 2006 +0200
@@ -137,6 +137,7 @@
                 'python': os.path.normpath(sys.executable),
                 'package': self.package_name,
                 'module': module,
+                'package_location': '/usr/lib/python/site-packages', # FIXME
             }
 
             self.announce("creating %s" % outfile)
@@ -149,9 +150,12 @@
                         'if     "%%_4ver%%" == "" %(python)s -c "from %(package)s.script.%(module)s import run; run()" %%*\n'
                         % script_vars)
                 else:
-                    file.write('#! %(python)s\n'
-                        'from %(package)s.script.%(module)s import run\n'
-                        'run()\n'
+                    file.write("#! %(python)s\n"
+                        "#Fix and uncomment those 2 lines if your moin command doesn't find the MoinMoin package:\n"
+                        "#import sys\n"
+                        "#sys.path.insert(0, '%(package_location)s')\n"
+                        "from %(package)s.script.%(module)s import run\n"
+                        "run()\n"
                         % script_vars)
             finally:
                 file.close()