python-install python-all: python/skytools/installer_config.py
python/skytools/installer_config.py: python/skytools/installer_config.py.in config.mak
- sed -e 's!@SQLDIR@!$(SQLDIR)!g' $< > $@
+ sed -e 's!@SQLDIR@!$(SQLDIR)!g' -e 's!@PACKAGE_VERSION@!$(PACKAGE_VERSION)!g' $< > $@
realclean: distclean
$(MAKE) -C doc $@
BININSTALL = @BININSTALL@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_STRING = @PACKAGE_STRING@
+
+ skytools.adminscript.__all__
+ skytools.parsing.__all__)
+import skytools.installer_config
+__version__ = skytools.installer_config.package_version
+
self.options, self.args = parser.parse_args(args)
# check args
+ if self.options.version:
+ self.print_version()
+ sys.exit(0)
if self.options.daemon:
self.go_daemon = 1
if self.options.quiet:
elif self.options.cmd == "reload":
self.send_signal(signal.SIGHUP)
+ def print_version(self):
+ print '%s, Skytools version %s' % (self.service_name, skytools.__version__)
+
def print_ini(self):
"""Prints out ini file from doc string of the script of default for dbscript
help = "log verbosely")
p.add_option("-d", "--daemon", action="store_true",
help = "go background")
+ p.add_option("-V", "--version", action="store_true",
+ help = "print version info and exit")
p.add_option("", "--ini", action="store_true",
help = "display sample ini file")