Skip to content

Commit 3efa093

Browse files
committed
bugz
1 parent c83b5eb commit 3efa093

2 files changed

Lines changed: 12 additions & 28 deletions

File tree

.github/workflows/build_wheel.yml

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
matrix:
14-
platform: [windows-latest, ubuntu-latest, macos-13, macos-14]
14+
platform: [windows-latest]
1515
env:
1616
CIBW_SKIP: 'pp*'
1717
CIBW_ARCHS: 'auto64'
18-
CIBW_PROJECT_REQUIRES_PYTHON: '>=3.10'
18+
CIBW_PROJECT_REQUIRES_PYTHON: '==3.12'
1919
CIBW_TEST_REQUIRES: 'pytest'
2020
defaults:
2121
run:
@@ -31,31 +31,6 @@ jobs:
3131
uses: actions/setup-python@v4
3232
with:
3333
python-version: "3.x"
34-
- name: Install OMP (MacOS Intel)
35-
if: matrix.platform == 'macos-13'
36-
run: |
37-
brew install llvm libomp
38-
echo "export CC=/usr/local/opt/llvm/bin/clang" >> ~/.bashrc
39-
echo "export CXX=/usr/local/opt/llvm/bin/clang++" >> ~/.bashrc
40-
echo "export CFLAGS=\"$CFLAGS -I/usr/local/opt/libomp/include\"" >> ~/.bashrc
41-
echo "export CXXFLAGS=\"$CXXFLAGS -I/usr/local/opt/libomp/include\"" >> ~/.bashrc
42-
echo "export LDFLAGS=\"$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp\"" >> ~/.bashrc
43-
source ~/.bashrc
44-
- name: Install OMP (MacOS M1)
45-
if: matrix.platform == 'macos-14'
46-
run: |
47-
brew install llvm libomp
48-
echo "export CC=/opt/homebrew/opt/llvm/bin/clang" >> ~/.bashrc
49-
echo "export CXX=/opt/homebrew/opt/llvm/bin/clang++" >> ~/.bashrc
50-
echo "export CFLAGS=\"$CFLAGS -I/opt/homebrew/opt/libomp/include\"" >> ~/.bashrc
51-
echo "export CXXFLAGS=\"$CXXFLAGS -I/opt/homebrew/opt/libomp/include\"" >> ~/.bashrc
52-
echo "export LDFLAGS=\"$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp\"" >> ~/.bashrc
53-
source ~/.bashrc
54-
- name: Install OMP (Linux)
55-
if: runner.os == 'Linux'
56-
run: |
57-
sudo apt-get update
58-
sudo apt install libomp-dev
5934
- name: Build Wheel
6035
run: |
6136
# Hack to ensure installed RAT package is used for test instead

cpp/rat.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,18 @@ class EventBridge
106106
EventBridge(py::function callback)
107107
{
108108
std::string filename = "eventManager" + std::string(dylib::extension);
109+
py::print(31, std::getenv("RAT_PATH"), filename.c_str());
109110
this->library = std::unique_ptr<dylib>(new dylib(std::getenv("RAT_PATH"), filename.c_str()));
111+
py::print(32);
110112
if (!library)
111113
{
114+
py::print(33);
112115
std::cerr << "event manager dynamic library failed to load" << std::endl;
116+
py::print(34);
113117
return;
114118
}
115119
this->callback = callback;
120+
py::print(35);
116121
};
117122

118123
py::list unpackDataToCell(int rows, int cols, double* data, double* nData,
@@ -209,9 +214,13 @@ class EventBridge
209214

210215
void registerEvent(EventTypes eventType)
211216
{
217+
py::print(36);
212218
std::function<void(const baseEvent& event)> caller = std::bind(&EventBridge::eventCallback, this, std::placeholders::_1);
219+
py::print(37);
213220
auto addListener = library->get_function<void(EventTypes, std::function<void(const baseEvent&)>)>("addListener");
214-
addListener(eventType, caller);
221+
py::print(38);
222+
addListener(eventType, caller);
223+
py::print(39);
215224
};
216225

217226
void clear()

0 commit comments

Comments
 (0)