From a8d3e8341eee6af4c778f512d7f8584c476d49fe Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 3 Oct 2013 19:21:05 +0200 Subject: basically working web setup --- pyload/setup/dependencies.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pyload/setup/dependencies.py') diff --git a/pyload/setup/dependencies.py b/pyload/setup/dependencies.py index 53457de93..f7a0e4ae7 100644 --- a/pyload/setup/dependencies.py +++ b/pyload/setup/dependencies.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +import inspect + # Provide gettext marker _ = lambda x: x @@ -50,7 +52,7 @@ class Python(Dependency): def getVersion(self): import sys - ".".join(str(v) for v in sys.version_info[:3]) + return ".".join(str(v) for v in sys.version_info[:3]) class JSON(Dependency): @@ -58,8 +60,7 @@ class JSON(Dependency): optional = False def isStatisfied(self): - # TODO - return True + return find_module("json") or find_module("simplejson") class PyCurl(Dependency): @@ -67,8 +68,7 @@ class PyCurl(Dependency): optional = False def isStatisfied(self): - # TODO - return True + return find_module("pycurl") class Sqlite(Dependency): @@ -76,9 +76,8 @@ class Sqlite(Dependency): optional = False def isStatisfied(self): - # TODO - return True + return find_module("sqlite3") or find_module("pysqlite2") # TODO: ssl, crypto, image, tesseract, js -deps = [x for x in locals().itervalues() if issubclass(x, Dependency) and x is not Dependency] \ No newline at end of file +deps = [Python, Sqlite, PyCurl, JSON] \ No newline at end of file -- cgit v1.2.3