Procházet zdrojové kódy

Small steps in the direction of distutils as installation method

Helmut Pozimski před 11 roky
rodič
revize
bb913e6908

+ 0 - 0
lib_stov/__init__.py


+ 0 - 0
configuration.py → lib_stov/configuration.py


+ 0 - 0
outputhelper.py → lib_stov/outputhelper.py


+ 0 - 0
subscription.py → lib_stov/subscription.py


+ 0 - 0
youtube.py → lib_stov/youtube.py


+ 0 - 0
youtubeAPI.py → lib_stov/youtubeAPI.py


+ 2 - 3
setup.py

@@ -25,9 +25,8 @@ setup(
 	version = "0.5wip",
 	author = "Helmut Pozimski",
 	author_email = "helmut@pozimski.de",
-	py_modules = ["youtube", "youtubeAPI", "outputhelper", "subscription",
-		"configuration"],
-	scripts = ["stov.py"],
+	packages = ["lib_stov"],
+	scripts = ["stov"],
 	data_files = [("share/locale/de/LC_MESSAGES", ["locale/de/LC_MESSAGES/stov.mo" ]), 
 			("share/locale/C/LC_MESSAGES", ["locale/C/LC_MESSAGES/stov.mo"]),
 			("share/locale/en/LC_MESSAGES", ["locale/en/LC_MESSAGES/stov.mo"])]

+ 8 - 5
stov.py → stov

@@ -34,18 +34,21 @@ from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 from optparse import OptionParser
 
-import subscription
-import youtube
-import configuration
+from lib_stov import subscription
+from lib_stov import youtube
+from lib_stov import configuration
 
-from outputhelper import printf
+from lib_stov.outputhelper import printf
 
 """Determine the path where the stov files are for localization"""
 
 locale_path = os.path.join(sys.path[0] + "/locale")
 if gettext.find("stov", locale_path) == None:
 	base_path = os.path.split(sys.path[0])[0]
-	locale_path = os.path.join(base_path, "share/locale")
+	if "share" in base_path:
+		locale_path = os.path.join(base_path, "locale")
+	else:
+		locale_path = os.path.join(base_path, "share/locale")
 
 """Initialize gettext to support translation of the program"""