1.1 --- a/TO_DO.txt Sat Sep 17 00:12:44 2011 +0200
1.2 +++ b/TO_DO.txt Sat Sep 17 01:27:01 2011 +0200
1.3 @@ -1,4 +1,5 @@
1.4 -Generate limited hosting environment site descriptions.
1.5 +Provide limited hosting environment site descriptions.
1.6 + Currently, the test for limited hosting is a lack of a site descriptions directory.
1.7 Add support for changing the wikis list in the farmconfig module.
1.8 Support existing MoinMoin home directory installations into ~/lib/python2.x/MoinMoin.
1.9 This affects the page package installation function which expects to find
2.1 --- a/examples/moinsetup.cfg.debian Sat Sep 17 00:12:44 2011 +0200
2.2 +++ b/examples/moinsetup.cfg.debian Sat Sep 17 01:27:01 2011 +0200
2.3 @@ -1,6 +1,6 @@
2.4 [installation]
2.5 prefix = /usr
2.6 -site_packages = /var/lib/python-support/python2.5
2.7 +site_packages = /var/lib/python-support/python2.6
2.8 web_app_dir = /var/www/mywiki
2.9 web_static_dir = /var/www/mywiki
2.10 web_site_dir = /etc/apache2/sites-available
3.1 --- a/moinsetup.py Sat Sep 17 00:12:44 2011 +0200
3.2 +++ b/moinsetup.py Sat Sep 17 01:27:01 2011 +0200
3.3 @@ -320,7 +320,8 @@
3.4 )
3.5
3.6 source_config_names = (
3.7 - "moin_distribution", "prefix", "site_packages", "htdocs_dir_source"
3.8 + "moin_distribution", "prefix", "site_packages", "prefix_site_packages",
3.9 + "htdocs_dir_source"
3.10 )
3.11
3.12 instance_config_names = (
3.13 @@ -545,6 +546,15 @@
3.14 return self.moin_distribution and join(self.moin_distribution, "wiki") or \
3.15 self.prefix and join(self.prefix, "share", "moin") or None
3.16
3.17 + def get_wikiconfig_directory(self):
3.18 +
3.19 + "Return the location of the Wiki configuration."
3.20 +
3.21 + if self.site_config:
3.22 + return split(self.site_config)[0]
3.23 + else:
3.24 + return self.common_dir
3.25 +
3.26 def get_static_identifier(self):
3.27
3.28 "Return the static URL/directory identifier for the Wiki."
3.29 @@ -1100,7 +1110,10 @@
3.30
3.31 this_dir = os.getcwd()
3.32 os.chdir(extension_dir)
3.33 - os.system("python setup.py install --prefix=%s" % self.prefix)
3.34 +
3.35 + options = "install --install-lib=%s" % self.prefix_site_packages
3.36 +
3.37 + os.system("python setup.py %s" % options)
3.38 os.chdir(this_dir)
3.39
3.40 def install_plugins(self, plugins_dir, plugin_type):
3.41 @@ -1291,10 +1304,12 @@
3.42
3.43 path = os.environ.get("PYTHONPATH", "")
3.44
3.45 + conf_dir = self.get_wikiconfig_directory()
3.46 +
3.47 if path:
3.48 - os.environ["PYTHONPATH"] = path + ":" + self.prefix_site_packages + ":" + self.common_dir
3.49 + os.environ["PYTHONPATH"] = path + ":" + self.prefix_site_packages + ":" + conf_dir
3.50 else:
3.51 - os.environ["PYTHONPATH"] = self.prefix_site_packages + ":" + self.common_dir
3.52 + os.environ["PYTHONPATH"] = self.prefix_site_packages + ":" + conf_dir
3.53
3.54 installer = join(self.prefix_site_packages, "MoinMoin", "packages.py")
3.55 cmd = "python %s i %s" % (installer, package_filename)