Task Description
Currently, pylibseekdb users have no way to determine the exact build information of the library they are using, such as:
- Commit ID (Git revision)
- Version number
- Build date and time
- Build branch
- Build flags
Solution Description
Currently, pylibseekdb users have no way to determine the exact build information of the library they are using, such as:
- Commit ID (Git revision)
- Version number
- Build date and time
- Build branch
- Build flags
Passed Regressions
Verify output matches expected format after build:
python3 -c "import libseekdb_python as seekdb; seekdb.print_version()"
Expected output format:
pylibseekdb (OceanBase seekdb 1.1.0.0)
REVISION: 1-<git-sha>
BUILD_BRANCH: <branch-name>
BUILD_TIME: <date> <time>
BUILD_FLAGS: <build-type>
Upgrade Compatibility
__version__: Currently exists but returns data version (e.g., "1.1.0.0"). We will keep this behavior or enhance it to return PACKAGE_VERSION which is more meaningful for users.
- New APIs:
build_info, print_version(), get_version_string() are purely additive and do not break existing code.
- Requires Python 3.6+ (same as existing pylibseekdb requirement)
- Uses standard pybind11 bindings, no special Python version dependencies
Task Description
Currently,
pylibseekdbusers have no way to determine the exact build information of the library they are using, such as:Solution Description
Currently,
pylibseekdbusers have no way to determine the exact build information of the library they are using, such as:Passed Regressions
Verify output matches expected format after build:
python3 -c "import libseekdb_python as seekdb; seekdb.print_version()"Expected output format:
Upgrade Compatibility
__version__: Currently exists but returns data version (e.g., "1.1.0.0"). We will keep this behavior or enhance it to returnPACKAGE_VERSIONwhich is more meaningful for users.build_info,print_version(),get_version_string()are purely additive and do not break existing code.