summaryrefslogtreecommitdiffstats
path: root/pyload/setup/dependencies.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/setup/dependencies.py')
-rw-r--r--pyload/setup/dependencies.py15
1 files changed, 7 insertions, 8 deletions
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