pybind/rados,rgw: replace Tempita errno checks with C preprocessor
Replace Tempita-based platform-specific errno handling with C preprocessor
conditionals for the rados and rgw Python bindings, aligning with the
approach already used in cephfs.
Previously, rados and rgw used Tempita to generate platform-specific
errno_to_exception dictionaries, duplicating ~40 lines of code to choose
between ENOATTR (FreeBSD) and ENODATA (Linux) for the NoData exception.
This created an inconsistency with cephfs, which uses C preprocessor
conditionals for similar platform compatibility needs.
This commit introduces a CEPH_ENODATA macro that resolves to the
appropriate errno value at compile time:
- ENOATTR on FreeBSD/Darwin
- ENODATA on Linux
Changes:
- Add CEPH_ENODATA macro using #ifdef preprocessor conditionals
- Use single errno_to_exception dictionary with CEPH_ENODATA (~20 lines)
- Remove UNAME_SYSNAME variable and platform import from setup.py
- Retain Tempita processing for BUILD_DOC (still required)
Benefits:
- Eliminates runtime platform detection in setup.py
- Reduces code duplication (40 lines → 20 lines)
- Provides consistency across all pybind modules (rados, rgw, cephfs)
Follows the same pattern as DIRENT_D_OFF in cephfs bindings.