Skip to content

Commit

Permalink
Make 4.2.1 patch release (#569)
Browse files Browse the repository at this point in the history
* Apply hotfix from 4.1.0 release (#568)

* Bump version to 4.2.1

* Compatibility patch for latest RapidJSON (#567)

* Compatibility patch for latest RapidJSON

* Use latest RapidJSON
  • Loading branch information
hcho3 authored May 24, 2024
1 parent 45c7d40 commit 07405e7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_policy(SET CMP0091 NEW)
set(CMAKE_FIND_NO_INSTALL_PREFIX TRUE FORCE)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

project(treelite LANGUAGES CXX C VERSION 4.2.0)
project(treelite LANGUAGES CXX C VERSION 4.2.1)

# Check compiler versions
# Use latest compilers to ensure that std::filesystem is available
Expand Down
12 changes: 10 additions & 2 deletions cmake/ExternalLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ add_library(rapidjson INTERFACE)
target_compile_definitions(rapidjson INTERFACE -DRAPIDJSON_HAS_STDSTRING=1)
find_package(RapidJSON)
if(RapidJSON_FOUND)
target_include_directories(rapidjson INTERFACE ${RAPIDJSON_INCLUDE_DIRS})
if(DEFINED RAPIDJSON_INCLUDE_DIRS)
# Compatibility with 1.1.0 stable (circa 2016)
set(RapidJSON_include_dir "${RAPIDJSON_INCLUDE_DIRS}")
else()
# Latest RapidJSON (1.1.0.post*)
set(RapidJSON_include_dir "${RapidJSON_INCLUDE_DIRS}")
endif()
target_include_directories(rapidjson INTERFACE ${RapidJSON_include_dir})
message(STATUS "Found RapidJSON: ${RapidJSON_include_dir}")
else()
message(STATUS "Did not find RapidJSON in the system root. Fetching RapidJSON now...")
FetchContent_Declare(
RapidJSON
GIT_REPOSITORY https://github.com/Tencent/rapidjson
GIT_TAG v1.1.0
GIT_TAG ab1842a2dae061284c0a62dca1cc6d5e7e37e346
)
FetchContent_Populate(RapidJSON)
message(STATUS "RapidJSON was downloaded at ${rapidjson_SOURCE_DIR}.")
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "packager.pep517"

[project]
name = "treelite"
version = "4.2.0"
version = "4.2.1"
authors = [
{name = "Hyunsu Cho", email = "chohyu01@cs.washington.edu"}
]
Expand Down
2 changes: 1 addition & 1 deletion python/treelite/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.0
4.2.1
2 changes: 1 addition & 1 deletion python/treelite/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _load_lib():
os.add_dll_directory(
os.path.join(os.path.normpath(sys.base_prefix), "Library", "bin")
)
lib = ctypes.CDLL(lib_path[0], mode=ctypes.RTLD_GLOBAL)
lib = ctypes.cdll.LoadLibrary(lib_path[0])
lib.TreeliteGetLastError.restype = ctypes.c_char_p
lib.log_callback = _log_callback
lib.warn_callback = _warn_callback
Expand Down

0 comments on commit 07405e7

Please sign in to comment.