3.1 --- a/moinsetup.py Tue Sep 13 00:07:23 2011 +0200
3.2 +++ b/moinsetup.py Wed Sep 14 00:11:35 2011 +0200
3.3 @@ -327,10 +327,10 @@
3.4 theme_master = "modernized"
3.5 extra_theme_css_files = ["SlideShow.css"]
3.6
3.7 - def __init__(self, moin_distribution, moin_data, prefix, web_app_dir,
3.8 - common_dir, url_path, superuser, site_name, front_page_name,
3.9 - web_site_dir=None, web_static_dir=None, farm_config=None,
3.10 - site_config=None, theme_default=None):
3.11 + def __init__(self, moin_distribution=None, moin_data=None, prefix=None,
3.12 + site_packages=None, web_app_dir=None, web_static_dir=None, web_site_dir=None,
3.13 + common_dir=None, farm_config=None, site_config=None, url_path=None,
3.14 + superuser=None, site_name=None, front_page_name=None, theme_default=None):
3.15
3.16 """
3.17 Initialise a Wiki installation using the following:
3.18 @@ -362,6 +362,9 @@
3.19 'common_dir' setting)
3.20 * site_config - optional: a specific configuration file location
3.21 (overrides the 'common_dir' setting)
3.22 + * site_packages - optional: the location of the Python
3.23 + site-packages directory if outside the 'prefix'
3.24 + (overrides the path calculated using 'prefix')
3.25 * theme_default - optional: the default theme (such as modern)
3.26 """
3.27
3.28 @@ -394,7 +397,8 @@
3.29
3.30 # Define the place where the MoinMoin package will actually reside.
3.31
3.32 - self.prefix_site_packages = join(self.prefix, "lib", "python%s.%s" % sys.version_info[:2], "site-packages")
3.33 + self.prefix_site_packages = site_packages or \
3.34 + join(self.prefix, "lib", "python%s.%s" % sys.version_info[:2], "site-packages")
3.35
3.36 # Find the version.
3.37
3.38 @@ -1249,7 +1253,8 @@
3.39 os.environ["PYTHONPATH"] = self.prefix_site_packages + ":" + self.conf_dir
3.40
3.41 installer = join(self.prefix_site_packages, "MoinMoin", "packages.py")
3.42 - os.system("python %s i %s" % (installer, package_filename))
3.43 + cmd = "python %s i %s" % (installer, package_filename)
3.44 + os.system(cmd)
3.45
3.46 if path:
3.47 os.environ["PYTHONPATH"] = path
3.48 @@ -1303,7 +1308,9 @@
3.49
3.50 installation = Installation(**config_arguments)
3.51
3.52 - except TypeError:
3.53 + except TypeError, exc:
3.54 + print exc.args[0]
3.55 + print
3.56 print "Configuration settings:"
3.57 print
3.58 print Installation.__init__.__doc__
3.59 @@ -1321,6 +1328,8 @@
3.60 try:
3.61 method(*method_arguments)
3.62 except TypeError:
3.63 + print exc.args[0]
3.64 + print
3.65 print "Method documentation:"
3.66 print
3.67 print method.__doc__