From 51d2ce736de9053d90c08b6190080587ccc62948 Mon Sep 17 00:00:00 2001 From: vsoch Date: Fri, 20 Mar 2026 08:14:53 -0700 Subject: [PATCH] rlist: remove from potential build Signed-off-by: vsoch --- setup.py | 10 +----- src/_rlist_build.py | 86 --------------------------------------------- 2 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 src/_rlist_build.py diff --git a/setup.py b/setup.py index ac80fcc..1d7cb53 100644 --- a/setup.py +++ b/setup.py @@ -83,12 +83,7 @@ def is_info_command(): "hostlist": { "header": "include/flux/hostlist.h", }, - # Note that rlist is currently disabled, so this - # set of metadata doesn't matter - "rlist": { - "header": "include/flux/rlist.h", - "ignore_headers": ["czmq_containers"], - }, + # rlist no longer requires a library build "idset": { "header": "include/flux/idset.h", }, @@ -102,9 +97,6 @@ def is_info_command(): # Global variables for build type, corresponds to build_types = {"core", "idset", "security", "hostlist"} -# rlist.h is disabled for now, as it requires the flux-core build -# build_types = {"core", "idset", "rlist", "security", "hostlist"} - @contextmanager def workdir(dirname): diff --git a/src/_rlist_build.py b/src/_rlist_build.py deleted file mode 100644 index 9b2b67f..0000000 --- a/src/_rlist_build.py +++ /dev/null @@ -1,86 +0,0 @@ -import os -import sys -from pathlib import Path - -from cffi import FFI - -# IMPORTANT: this file needs to be updated if rlist.h -# is decided to be included. -# Ensure paths are in _flux -here = os.path.abspath(os.path.dirname(__file__)) - -# We need to add the path here to import other builds -sys.path.insert(0, here) - -root = os.environ.get("FLUX_INSTALL_ROOT") - -preproc_file = os.path.join(here, "_rlist_preproc.h") -core_c_file = os.path.join(here, "_rlist.c") - -from _hostlist_build import ffi as hostlist_ffi -from _idset_build import ffi as idset_ffi - -ffi = FFI() - -ffi.include(hostlist_ffi) -ffi.include(idset_ffi) - -# Note that czmq was originally czmq_containers.h -ffi.set_source( - "_flux._rlist", - """ -#include -#include -#include -#include -#include -#include -#include - """, - libraries=[ - "rlist", - "idset", - "flux-idset", - "flux-core", - "hwloc", - "jansson", - ], - library_dirs=[ - root, - f"{root}/lib", - ], - include_dirs=[ - root, - "/usr/include", - # hwloc - "/usr/lib/x86_64-linux-gnu", - f"{root}/config", - f"{root}/include", - ], - extra_compile_args=[ - f"-L{root}/lib", - ], -) - -cdefs = """ -typedef struct _zlistx_t zlistx_t; -typedef struct _zhashx_t zhashx_t; -typedef int... json_type; -typedef struct json_t json_t; -typedef struct json_error_t json_error_t; - - -void free (void *); - -""" - -with open(preproc_file) as h: - cdefs = cdefs + h.read() - -ffi.cdef(cdefs) - -# This doesn't seem to happen in the block below -ffi.emit_c_code(core_c_file) -# Ensure target mtime is updated -Path(core_c_file).touch() -ffi.compile(verbose=True)