[SCM] morituri/master: add configure
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:02 UTC 2014
The following commit has been merged in the master branch:
commit 3535f9a606ec7dde55d66e644837a85906948f4f
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Fri May 22 20:35:32 2009 +0000
add configure
diff --git a/morituri/configure/configure.py b/morituri/configure/configure.py
new file mode 100644
index 0000000..6a38329
--- /dev/null
+++ b/morituri/configure/configure.py
@@ -0,0 +1,34 @@
+# -*- Mode: Python -*-
+# vi:si:et:sw=4:sts=4:ts=4
+
+'''
+configure-time variables for installed or uninstalled operation
+
+Code should run
+ >>> from morituri.configure import configure
+
+and then access the variables from the configure module. For example:
+ >>> print configure.version
+
+ at var isinstalled: whether an installed version is being run
+ at type isinstalled: boolean
+
+ at var version: morituri version number
+ at type version: string
+'''
+
+import os
+
+# where am I on the disk ?
+__thisdir = os.path.dirname(os.path.abspath(__file__))
+
+if os.path.exists(os.path.join(__thisdir, 'uninstalled.py')):
+ from morituri.configure import uninstalled
+ config_dict = uninstalled.get()
+else:
+ from morituri.configure import installed
+ config_dict = installed.get()
+
+for key, value in config_dict.items():
+ dictionary = locals()
+ dictionary[key] = value
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list