Skip to content

Commit 2306284

Browse files
committed
bump dependencies
1 parent 141c97a commit 2306284

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif()
1818
FetchContent_Declare(
1919
sqlite_zstd_vfs
2020
GIT_REPOSITORY https://github.com/mlin/sqlite_zstd_vfs.git
21-
GIT_TAG fe754eb
21+
GIT_TAG 4ccc782
2222
)
2323
FetchContent_MakeAvailable(sqlite_zstd_vfs)
2424
FetchContent_MakeAvailable(sqlitecpp)

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
FROM centos:7 as builder
55

66
ARG CMAKE_VERSION=3.17.3
7-
ARG SQLITE_VERSION=3360000
8-
ARG ZSTD_VERSION=1.5.0
7+
ARG SQLITE_VERSION=3380200
8+
ARG ZSTD_VERSION=1.5.2
99
ARG CPU_ARCH=ivybridge
1010
ENV CFLAGS="-march=${CPU_ARCH} -O3"
1111
ENV CXXFLAGS=${CFLAGS}
@@ -35,7 +35,7 @@ RUN mkdir -p /work/GenomicSQLite
3535

3636
# SQLite
3737
WORKDIR /work
38-
RUN wget -nv http://www.sqlite.org/2021/sqlite-amalgamation-${SQLITE_VERSION}.zip \
38+
RUN wget -nv http://www.sqlite.org/2022/sqlite-amalgamation-${SQLITE_VERSION}.zip \
3939
&& unzip -o sqlite-amalgamation-${SQLITE_VERSION}.zip
4040
WORKDIR /work/sqlite-amalgamation-${SQLITE_VERSION}
4141
RUN bash -c "scl enable devtoolset-8 'gcc -shared -o libsqlite3.so.0 -fPIC -shared -Wl,-soname,libsqlite3.so.0 -g ${CFLAGS} ${SQLITE_CFLAGS} sqlite3.c' & pid=$? \

src/genomicsqlite.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,13 +1763,15 @@ static int register_genomicsqlite_functions(sqlite3 *db, const char **pzErrMsg,
17631763
}
17641764
// other extensions may return SQLITE_BUSY if another version is already loaded; that is
17651765
// tolerable.
1766-
rc = genomicsqliteJson1Register(db);
1767-
if (rc != SQLITE_OK && rc != SQLITE_BUSY) {
1768-
if (pzErrMsg) {
1769-
*pzErrMsg =
1770-
sqlite3_mprintf("Genomics Extension %s failed to register JSON1", GIT_REVISION);
1766+
if (sqlite3_libversion_number() < 3038000) { // JSON1 is bundled in SQLite 3.38.0 & above
1767+
rc = genomicsqliteJson1Register(db);
1768+
if (rc != SQLITE_OK && rc != SQLITE_BUSY) {
1769+
if (pzErrMsg) {
1770+
*pzErrMsg =
1771+
sqlite3_mprintf("Genomics Extension %s failed to register JSON1", GIT_REVISION);
1772+
}
1773+
return rc;
17711774
}
1772-
return rc;
17731775
}
17741776
rc = genomicsqlite_uint_init(db);
17751777
if (rc != SQLITE_OK && rc != SQLITE_BUSY) {

test/test_gri.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_gri_lvl():
1717
)
1818
for lvl in range(16):
1919
for ofs in (-2, -1, 0, 1):
20-
featlen = 16 ** lvl + ofs
20+
featlen = 16**lvl + ofs
2121
tup = (420, 420 + featlen, (0 - lvl if ofs < 1 else 0 - lvl - 1))
2222
con.execute("INSERT INTO features VALUES(42,?,?,?)", tup)
2323
con.executescript(
@@ -93,7 +93,7 @@ def test_abutment():
9393
pos0 = 10000000000
9494
for lvl in range(9):
9595
for ofs in (-1, 0, 1):
96-
for tup in ((pos0 - 16 ** lvl, pos0 + ofs), (pos0 + 123 + ofs, pos0 + 123 + 16 ** 9)):
96+
for tup in ((pos0 - 16**lvl, pos0 + ofs), (pos0 + 123 + ofs, pos0 + 123 + 16**9)):
9797
con.execute("INSERT INTO features VALUES(42,?,?)", tup)
9898
con.executescript(
9999
genomicsqlite.create_genomic_range_index_sql(con, "features", "rid", "beg", "end")
@@ -431,7 +431,7 @@ def test_query_in_sql(tmp_path):
431431
results = list(
432432
con.execute("SELECT * FROM genomic_range_rowids('empty', 'chr17', 43044294, 43048294)")
433433
)
434-
assert results == []
434+
assert not results
435435

436436

437437
def _fill_exons(con, floor=None, table="exons", gri=True, len_gri=False):

0 commit comments

Comments
 (0)