Skip to content

Commit a3aa2aa

Browse files
committed
fix: make it build on RHEL 9.4
1 parent 6732045 commit a3aa2aa

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

pyslurm.spec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%define python3_pkgversion 3.11
1+
%define python3_pkgversion 3
22

33
Name: python-pyslurm
44
Version: 24.11.0
@@ -31,8 +31,8 @@ pyslurm is a Python interface to Slurm
3131
%prep
3232
%autosetup -p1 -n pyslurm-%{version}
3333

34-
%generate_buildrequires
35-
%pyproject_buildrequires -R
34+
#%generate_buildrequires
35+
#%pyproject_buildrequires -R
3636

3737
%build
3838
%pyproject_wheel

pyslurm/core/slurmctld.pyx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,23 @@
2222
# cython: c_string_type=unicode, c_string_encoding=utf8
2323
# cython: language_level=3
2424

25+
2526
from pyslurm.core.error import verify_rpc, RPCError
2627

28+
from pyslurm cimport slurm
29+
from pyslurm.slurm cimport (
30+
slurm_free_ctl_conf,
31+
slurm_conf_t,
32+
slurm_load_ctl_conf,
33+
slurm_preempt_mode_string,
34+
)
35+
36+
cimport pyslurm.utils.cstr as cstr
2737

2838
cdef class Config:
2939

40+
cdef slurm_conf_t* ptr
41+
3042
def __cinit__(self):
3143
self.ptr = NULL
3244

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# cython: language_level=3

pyslurm/utils/uint.pyx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,13 @@ cdef u16_set_bool_flag(uint16_t *flags, boolean, true_flag, false_flag=0):
182182
cdef u32_set_bool_flag(uint32_t *flags, boolean, true_flag, false_flag=0):
183183
flags[0] = uint_set_bool_flag(flags[0], boolean, true_flag, false_flag)
184184

185-
cdef u32_set_bool_flag(uint32_t *flags, boolean, true_flag, false_flag=0):
186-
flags[0] = uint_set_bool_flag(flags[0], boolean, true_flag, false_flag)
187-
188-
189185
cdef u64_set_bool_flag(uint64_t *flags, boolean, true_flag, false_flag=0):
190186
flags[0] = uint_set_bool_flag(flags[0], boolean, true_flag, false_flag)
191187

192188

193189
cdef u16_parse_bool_flag(uint16_t flags, flag):
194190
return uint_parse_bool_flag(flags, flag, slurm.NO_VAL16)
195191

196-
cdef u32_parse_bool_flag(uint32_t flags, flag):
197-
return uint_parse_bool_flag(flags, flag, slurm.NO_VAL16)
198-
199192
cdef u8_parse_bool_flag(uint8_t flags, flag):
200193
return uint_parse_bool_flag(flags, flag, slurm.NO_VAL8)
201194

0 commit comments

Comments
 (0)