-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Background
The Python bindings currently use legacy naming from when the project used Boost.Python:
- The C++ module is named
simmit(compiled tosimmit.cpython-xxx.so) - The main wrapper file is named
boostpython_smartplus_wrappers.cppdespite using pybind11 - Users import via
import simcoon, which internally doesfrom simcoon.simmit import *
Proposed Changes
1. Rename the C++ module from simmit to _core
Following Python conventions, internal C extension modules are typically prefixed with _:
simmit.cpython-xxx.so→_core.cpython-xxx.so
Files to modify:
simcoon-python-builder/CMakeLists.txt: Changepybind11_add_module(simmit ...)topybind11_add_module(_core ...)python-setup/simcoon/__init__.py: Changefrom simcoon.simmit import *tofrom simcoon._core import *
2. Rename the wrapper source file
simcoon-python-builder/src/python_wrappers/boostpython_smartplus_wrappers.cpp→python_module.cpp
Files to modify:
simcoon-python-builder/CMakeLists.txt: Update source file path
3. Update PYBIND11_MODULE declaration
In the wrapper file, update the module name:
// Before
PYBIND11_MODULE(simmit, m) {
// After
PYBIND11_MODULE(_core, m) {Import behavior (unchanged)
Users will continue to use:
import simcoon
simcoon.L_iso(...)The internal module name (_core vs simmit) is an implementation detail not exposed to users.
Checklist
- Rename
boostpython_smartplus_wrappers.cpptopython_module.cpp - Rename CMake target from
simmitto_core - Update
PYBIND11_MODULE(simmit, m)toPYBIND11_MODULE(_core, m) - Update
__init__.pyimport - Update any documentation references
- Test that
import simcoonstill works
Metadata
Metadata
Assignees
Labels
No labels