Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Organize Slurm C-API in a seperate Cython package This removes the single-file slurm.pxd and instead uses cythons capability to create cython-packages, by simple creating a file "__init__.pxd" in a folder, so that package can also be "cimported" anywhere. Nothing really changes in the pyslurm.pyx itself, importing the C-API stays the same. But now it is possible to organize the C-API a bit better, for example putting any extra functions which are not part of the slurm headers directly but found in the libslurm.so into a different file. This also directly adds the appropriate header definitions for Slurm major release 22.05 Header definitions are put into "header.pxi" Extra libslurm.so are put into "extra.pxi" Additional helpers are in "helpers.pxi" * Add a script to automatically generate new header bindings This adds a script pyslurm_bindgen.py to automatically translate Slurms header files into a single .pxd file with the help of autopxd2 Additionally, it translates any simple C-macros (#define) in the headers and makes it available in the .pxd file with its appropriate data type. It is mostly useful to upgrade to a new major slurm release. This makes the jinja2 approach obsolete and it can be deleted. * Make changes to support Slurm 22.05 remove any "const_char_ptr" obsolote references Do not use xmalloc from the (very outdated) header files anymore Instead, in slurm/libslurm_extra we are essentially defining the macros ourselves as functions, and simply wrap around slurms xcalloc, which is available in libslurm.so Actual required changes: - removes some constants which are not in the headers anymore - keep_alive_time was renamed to keepalive_time in the headers - slurmdb_stats_t stats was removed from slurmdb_job_rec_t in 22.05 See SchedMD/slurm@2f5254c - Update all version references to 22.05 * Add small guide how to update to a new major release
- Loading branch information