从http://ejdb.org/下载源代码,解压,Softmotions-ejdb

cd tcejdb
./configure --prefix=/opt/ejdb/env
make
make install

source /opt/ejdb/env/bin/activate
cd pyejdb

修改setup.py

class EJDBPythonExt(object): 去掉

kwargs["libraries"].append("rt")

ejdb_ext = EJDBPythonExt添加

library_dirs=['/opt/ejdb/env/lib'],

修改class build_ext(_build_ext): 去掉

if check_extension(ext)

class EJDBPythonExt(object):
    def __init__(self, required, libname, name, min_ver, ver_char_p, url,
                 *args, **kwargs):
        self.required = required
        self.libname = libname
        self.name = name
        self.min_ver = min_ver
        self.ver_char_p = ver_char_p
        self.url = url
        #kwargs["libraries"].append("rt")
        self.c_ext = Extension(*args, **kwargs)

ejdb_ext = EJDBPythonExt(True, "tcejdb", "EJDB", "1.1",
                         "tcversion", "http://ejdb.org",
                         "_pyejdb", ["src/pyejdb.c"],
                         libraries=["tcejdb", "z", "pthread", "m", "c"],
                         include_dirs=['/opt/ejdb/env/include'],
                         library_dirs=['/opt/ejdb/env/lib'],
                         extra_compile_args=["-std=c99", "-Wall"])

class build_ext(_build_ext):
    def finalize_options(self):
        _build_ext.finalize_options(self)
        if "sdist" not in sys.argv:
            self.extensions = [ext.c_ext for ext in (ejdb_ext,)]

install ejdb CLI:

npm install -g ejdb