Skip to content

Commit 37e4a79

Browse files
committed
Sync libcachesim version
1 parent 7c7b755 commit 37e4a79

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

libCacheSim-python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
55

66
[project]
77
name = "libcachesim"
8-
version = "0.0.1"
8+
version = "0.3.1"
99
description="Python bindings for libCacheSim"
1010
readme = "README.md"
1111
requires-python = ">=3.9"

libCacheSim-python/src/pylibcachesim.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include <pybind11/pybind11.h>
33
#include <pybind11/stl.h>
44

5+
// Suppress visibility warnings for pybind11 types
6+
#pragma GCC diagnostic push
7+
#pragma GCC diagnostic ignored "-Wattributes"
8+
59
#include <iostream>
610
#include <memory>
711
#include <unordered_map>
@@ -139,6 +143,9 @@ class PythonHookCache {
139143
}
140144
};
141145

146+
// Restore visibility warnings
147+
#pragma GCC diagnostic pop
148+
142149
struct CacheDeleter {
143150
void operator()(cache_t* ptr) const {
144151
if (ptr != nullptr) ptr->cache_free(ptr);

scripts/install_python.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
# Build the main libCacheSim C++ library first
44
echo "Building main libCacheSim library..."
55
rm -rf ./build
6-
cmake -G Ninja -B build -DENABLE_3L_CACHE=ON
6+
cmake -G Ninja -B build # -DENABLE_3L_CACHE=ON
77
ninja -C build
88

99
# Now build and install the Python binding
1010
echo "Building Python binding..."
11-
cd libCacheSim-python
11+
echo "Sync python version..."
12+
python scripts/sync_python_version.py
13+
pushd libCacheSim-python
1214
pip install -e . -vvv
13-
cd ..
15+
popd
1416

1517
# Test that the import works
1618
echo "Testing import..."
1719
python -c "import libcachesim"
1820

1921
# Run tests
2022
echo "Running tests..."
21-
cd libCacheSim-python
23+
pushd libCacheSim-python
2224
pytest .
23-
cd ..
25+
popd

0 commit comments

Comments
 (0)