Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
assapin committed Nov 5, 2023
1 parent 21e3316 commit 32f5cb5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions execution/py_tester_bindings/make_python_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ bazel build //execution/py_tester_bindings:py_tester_extention.so --
cp bazel-bin/execution/py_tester_bindings/py_tester_extention.so execution/py_tester_bindings/code_contests_tester/
/usr/local/bin/pip wheel execution/py_tester_bindings --no-deps -w wheelhouse/


pybind11-stubgen py_tester_extention

python setup.py sdist bdist_wheel
pip install dist/code_contests_tester-0.1-py3-none-any.whl --force-reinstall

4 changes: 2 additions & 2 deletions execution/py_tester_bindings/py_tester_sandboxer_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ PYBIND11_MODULE(py_tester_extention, m) {
.def(py::init<>())
.def_readwrite("num_threads", &TestOptions::num_threads)
.def_readwrite("stop_on_first_failure", &TestOptions::stop_on_first_failure)
.def_readwrite("max_execution_duration", &TestOptions::max_execution_duration)

// ... other fields ...
;

Expand Down Expand Up @@ -102,7 +104,5 @@ PYBIND11_MODULE(py_tester_extention, m) {

return result.value();
});
// If there are public methods in the `TesterSandboxer` or `PyTesterSandboxer`
// classes that you want to expose, you can continue the bindings in a similar manner.
}

1 change: 1 addition & 0 deletions execution/py_tester_bindings/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pybind11==2.11.1
wheel
pybind11-stubgen==2.3.6
5 changes: 3 additions & 2 deletions execution/py_tester_bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
setup_requires=[
'setuptools',
'wheel',
'pybind11==2.11.1'
'pybind11==2.11.1',
'pybind11-stubgen==2.3.6'
],
package_data={
'code_contests_tester': [f'py_tester_extention.so'],
'code_contests_tester': [f'py_tester_extention.so', 'py_tester_extention.pyi'],
},
)

0 comments on commit 32f5cb5

Please sign in to comment.