2022-06-30 13:23:48 +02:00
|
|
|
import os
|
|
|
|
import platform
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
2022-07-06 13:13:00 +02:00
|
|
|
def can_build(env, platform):
|
2022-08-18 12:53:49 +02:00
|
|
|
env.module_add_dependencies("database_sqlite", ["database"], False)
|
|
|
|
|
2022-07-06 22:14:37 +02:00
|
|
|
return True
|
2022-06-30 13:23:48 +02:00
|
|
|
|
2022-07-06 13:13:00 +02:00
|
|
|
def _can_build():
|
2022-06-30 13:23:48 +02:00
|
|
|
|
|
|
|
# if os.name == "posix" or sys.platform == "darwin":
|
|
|
|
# x11_error = os.system("pkg-config --version > /dev/null")
|
|
|
|
# if x11_error:
|
|
|
|
# return False
|
|
|
|
|
|
|
|
# sqlite_error = os.system("pkg-config sqlite3 --modversion --silence-errors > /dev/null ")
|
|
|
|
|
|
|
|
# if sqlite_error:
|
|
|
|
# print("sqlite3 not found!")
|
|
|
|
# return False
|
|
|
|
|
|
|
|
# print("sqlite3 found!")
|
|
|
|
|
|
|
|
# return True
|
|
|
|
|
|
|
|
# #todo
|
|
|
|
# return False
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def configure(env):
|
2022-07-06 13:13:00 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
def _configure(env):
|
2022-06-30 13:23:48 +02:00
|
|
|
#env.ParseConfig("pkg-config sqlite3 --cflags --libs")
|
|
|
|
|
2022-12-18 18:41:11 +01:00
|
|
|
#env.Append(CPPDEFINES=[("SQLITE_THREADSAFE", 1)])
|
2022-06-30 13:23:48 +02:00
|
|
|
|
2022-12-18 18:41:11 +01:00
|
|
|
#env.Append(LINKFLAGS=["-ldl"])
|
|
|
|
pass
|
2022-06-30 13:23:48 +02:00
|
|
|
|
|
|
|
|
2022-07-06 18:26:17 +02:00
|
|
|
def get_doc_classes():
|
|
|
|
return [
|
2022-08-21 00:32:32 +02:00
|
|
|
"SQLite3Database",
|
2022-07-06 18:26:17 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
def get_doc_path():
|
|
|
|
return "doc_classes"
|