👷 build sqlite from source
This commit is contained in:
parent
5f05ded853
commit
3b64e4a9d0
2 changed files with 24 additions and 5 deletions
23
.github/workflows/preview.yaml
vendored
23
.github/workflows/preview.yaml
vendored
|
|
@ -107,8 +107,27 @@ jobs:
|
|||
run: |
|
||||
pip install -r server/requirements.txt
|
||||
|
||||
- name: Install newer sqlite on linux
|
||||
run: pip install pysqlite3-binary
|
||||
# - name: Install newer sqlite on linux
|
||||
# run: pip install pysqlite3-binary
|
||||
# if: matrix.os == 'ubuntu-20.04'
|
||||
|
||||
# Download the latest release of SQLite source code and build the source
|
||||
# amalgamation files (sqlite3.c and sqlite3.h).
|
||||
|
||||
# Copy the sqlite3 amalgamation files into the root of the pysqlite3 checkout
|
||||
# and run build_static + build:
|
||||
- name: Install newer sqlite3 on linux
|
||||
run: |
|
||||
wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release \
|
||||
-O sqlite.tar.gz
|
||||
tar xzf sqlite.tar.gz
|
||||
cd sqlite/
|
||||
./configure
|
||||
make sqlite3.c
|
||||
|
||||
cp sqlite/sqlite3.[ch] pysqlite3/
|
||||
cd pysqlite3
|
||||
python setup.py build_static build
|
||||
if: matrix.os == 'ubuntu-20.04'
|
||||
|
||||
- name: Install tiktoken vocab file
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import sys
|
|||
|
||||
from server.main import main
|
||||
|
||||
__import__('pysqlite3')
|
||||
import sys
|
||||
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
|
||||
# __import__('pysqlite3')
|
||||
# import sys
|
||||
# sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
|
||||
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
ca_bundle_path = os.path.join(sys._MEIPASS, "ca_bundle", "cacert.pem")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue