1.1 --- a/moinsetup.py Tue Sep 13 00:07:23 2011 +0200
1.2 +++ b/moinsetup.py Wed Sep 14 00:11:35 2011 +0200
1.3 @@ -327,10 +327,10 @@
1.4 theme_master = "modernized"
1.5 extra_theme_css_files = ["SlideShow.css"]
1.6
1.7 - def __init__(self, moin_distribution, moin_data, prefix, web_app_dir,
1.8 - common_dir, url_path, superuser, site_name, front_page_name,
1.9 - web_site_dir=None, web_static_dir=None, farm_config=None,
1.10 - site_config=None, theme_default=None):
1.11 + def __init__(self, moin_distribution=None, moin_data=None, prefix=None,
1.12 + site_packages=None, web_app_dir=None, web_static_dir=None, web_site_dir=None,
1.13 + common_dir=None, farm_config=None, site_config=None, url_path=None,
1.14 + superuser=None, site_name=None, front_page_name=None, theme_default=None):
1.15
1.16 """
1.17 Initialise a Wiki installation using the following:
1.18 @@ -362,6 +362,9 @@
1.19 'common_dir' setting)
1.20 * site_config - optional: a specific configuration file location
1.21 (overrides the 'common_dir' setting)
1.22 + * site_packages - optional: the location of the Python
1.23 + site-packages directory if outside the 'prefix'
1.24 + (overrides the path calculated using 'prefix')
1.25 * theme_default - optional: the default theme (such as modern)
1.26 """
1.27
1.28 @@ -394,7 +397,8 @@
1.29
1.30 # Define the place where the MoinMoin package will actually reside.
1.31
1.32 - self.prefix_site_packages = join(self.prefix, "lib", "python%s.%s" % sys.version_info[:2], "site-packages")
1.33 + self.prefix_site_packages = site_packages or \
1.34 + join(self.prefix, "lib", "python%s.%s" % sys.version_info[:2], "site-packages")
1.35
1.36 # Find the version.
1.37
1.38 @@ -1249,7 +1253,8 @@
1.39 os.environ["PYTHONPATH"] = self.prefix_site_packages + ":" + self.conf_dir
1.40
1.41 installer = join(self.prefix_site_packages, "MoinMoin", "packages.py")
1.42 - os.system("python %s i %s" % (installer, package_filename))
1.43 + cmd = "python %s i %s" % (installer, package_filename)
1.44 + os.system(cmd)
1.45
1.46 if path:
1.47 os.environ["PYTHONPATH"] = path
1.48 @@ -1303,7 +1308,9 @@
1.49
1.50 installation = Installation(**config_arguments)
1.51
1.52 - except TypeError:
1.53 + except TypeError, exc:
1.54 + print exc.args[0]
1.55 + print
1.56 print "Configuration settings:"
1.57 print
1.58 print Installation.__init__.__doc__
1.59 @@ -1321,6 +1328,8 @@
1.60 try:
1.61 method(*method_arguments)
1.62 except TypeError:
1.63 + print exc.args[0]
1.64 + print
1.65 print "Method documentation:"
1.66 print
1.67 print method.__doc__