@@ -124,30 +124,48 @@ endif
124124clean :
125125 rm -f * .o $(LIBRARY ) $(LIBNICK1 ) $(LIBNICK2 ) $(LIBNICK3 ) $(LIBNICK4 ) $(SSHELL )
126126
127- test : test/test.py
127+ test : test/test.py test/test-64bit-commit-ids.py test/varint.py
128128ifeq ($(OS ) ,Windows_NT)
129129ifeq ($(PY_HOME ) ,)
130130 @echo "PY_HOME is not set"
131131else
132132 cd $(PY_HOME)/DLLs && [ ! -f sqlite3-orig.dll ] && mv sqlite3.dll sqlite3-orig.dll || true
133133 cp litetree-0.1.dll $(PY_HOME)/DLLs/sqlite3.dll
134134 cp $(LMDBPATH)/lmdb.dll $(PY_HOME)/DLLs/lmdb.dll
135+ cd test && python -mpip install lmdb
135136 cd test && python test.py -v
137+ cd test && python test-64bit-commit-ids.py -v
136138endif
137- else ifeq ($(OS),OSX)
139+ else # not Windows
140+ ifneq ($(shell python -c "import lmdb" 2> /dev/null; echo $$? ) ,0)
141+ sudo easy_install cffi
142+ cd test && sudo easy_install lmdb
143+ ifneq ($(shell python -c "import lmdb" 2> /dev/null; echo $$? ) ,0)
144+ git clone --depth=1 https://github.com/dw/py-lmdb
145+ cd py-lmdb && sudo LMDB_FORCE_CPYTHON=1 python setup.py install
146+ ifneq ($(shell python -c "import lmdb" 2> /dev/null; echo $$? ) ,0)
147+ sudo python -c "import cffi"
148+ sudo python -c "import lmdb"
149+ endif
150+ endif
151+ endif
152+ ifeq ($(OS ) ,OSX)
138153ifneq ($(shell python -c "import pysqlite2.dbapi2" 2> /dev/null; echo $$? ) ,0)
139154ifneq ($(shell [ -d $(LIBPATH2 ) ]; echo $$? ) ,0)
140155 @echo "run 'sudo make install' first"
141156endif
142- git clone https://github.com/ghaering/pysqlite
157+ git clone --depth=1 https://github.com/ghaering/pysqlite
143158 cd pysqlite && echo "include_dirs=$(INCPATH)" >> setup.cfg
144159 cd pysqlite && echo "library_dirs=$(LIBPATH2)" >> setup.cfg
145160 cd pysqlite && python setup.py build
146161 cd pysqlite && sudo python setup.py install
147162endif
148163 cd test && python test.py -v
149- else
164+ cd test && python test-64bit-commit-ids.py -v
165+ else # Linux
150166 cd test && LD_LIBRARY_PATH=.. python test.py -v
167+ cd test && LD_LIBRARY_PATH=.. python test-64bit-commit-ids.py -v
168+ endif
151169endif
152170
153171benchmark : test/benchmark.py
@@ -165,7 +183,7 @@ ifneq ($(shell python -c "import pysqlite2.dbapi2" 2> /dev/null; echo $$?),0)
165183ifneq ($(shell [ -d $(LIBPATH2 ) ]; echo $$? ) ,0)
166184 @echo "run 'sudo make install' first"
167185endif
168- git clone https://github.com/ghaering/pysqlite
186+ git clone --depth=1 https://github.com/ghaering/pysqlite
169187 cd pysqlite && echo "include_dirs=$(INCPATH)" >> setup.cfg
170188 cd pysqlite && echo "library_dirs=$(LIBPATH2)" >> setup.cfg
171189 cd pysqlite && python setup.py build
0 commit comments