Add and by default build/use ctypes wrapper for FFI ntp library...
Instead of compiling a custom binary Python extension written in C (as is the case now), this uses Python's built-in FFI (foreign function interface) to interoperate with similar underlying C code in libntp.
The switch to the FFI approach frees us from worrying about Python's ABI changes.
Additionally, it means we could have bindings in other languages The primary (and currently only) consumer of the "ntp" Python module seems to be scripts in the NTPsec tree. But it's an option in principle.
When the libntp/ntp_c.c C ABI eventually changes, then the "ntp" module Python code needs to be updated in tandem. If libntp is internal, then we can change those in tandem in any release. If libntp is public, then there could be out-of-tree consumers of that C ABI and that would be a backward-incompatible change requiring a SONAME bump.
Thank you @rlaager for the much better text.
Alternatively, there is an unexposed switch in the code that will allow you to build/use the python extension if the new wrapper is not working.
Merge request reports
Activity
mentioned in merge request !1166 (closed)
- Resolved by James Browning
- Resolved by James Browning
- Resolved by James Browning
Alternatively, there is an unexposed switch in the code that will allow you to build/use the python extension if the new wrapper is not working.
Ahh, I see "unexposed" now. I think we should either expose this option or not have the choice (as was the case in previous versions of this code). I assume the intention was that the option would be a temporary escape hatch in case there is a problem. So I don't really care which we do, since it is going away in a release or two.
added 1 commit
- f85b1101 - FFI: Find that vnum sets the version backward in build and right installed
added 1 commit
- fa481593 - ntp.ntpc: Change importado docstring to hopefully conform.
added 1 commit
- 093f8fae - ntp.ntpc: Change importado docstring to hopefully conform. -r1
added 1 commit
- d446d389 - ntp.ntpc: Change importado docstring to hopefully conform. -r2
added 1 commit
- 212f9291 - ntp.ntpc: Change importado docstring to hopefully conform. -r3
added 6 commits
-
6b2491a8 - 1 commit from branch
master - ee3e2f8b - build, pylib: ntpc... some singing/dancing
- 70f0be40 - ntpc, ffi: Do _not_ rebuild on install. Doh.
- 15d473fd - Feed it to the garbage smasher. -r2
- 3afdae44 - FFI: Find that vnum sets the version backward in build and right installed
- 29fa43c9 - ntp.ntpc: Change importado docstring to hopefully conform. -r4
Toggle commit list-
6b2491a8 - 1 commit from branch
added 1 commit
- d1c9cbda - ntp.ntpc: Change importado docstring to hopefully conform. -r5
mentioned in issue #667 (closed)
mentioned in merge request !1174 (closed)