mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-30 07:16:46 +00:00
setup.py: Reduce aggressiveness of compiler flags.
The C code is generated by Cython, so SETools is dependent on Cython's function.. If there is some misalignment between Cython and the Python headers, for example, the code uses functions in Python 3.8 that are deprecated in Python 3.9, that is temporary and not SETools' bug. The unit tests are the standard for finding issues in SETools. This addresses the current issue with Python 3.9 compiles: setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_6AVRule_9statement’: setools/policyrep.c:92274:3: error: ‘_PyUnicode_get_wstr_length’ is deprecated [-Werror=deprecated-declarations] 92274 | __pyx_t_1 = (__pyx_v_self->__pyx_base.rule_string != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_self->__pyx_base.rule_string) != 0); | ^~~~~~~~~ In file included from /usr/include/python3.9/unicodeobject.h:1026, from /usr/include/python3.9/Python.h:97, from setools/policyrep.c:52: Closes #54 Signed-off-by: Chris PeBenito <pebenito@ieee.org>
This commit is contained in:
parent
a1d70c851c
commit
f1b4a5d375
9
setup.py
9
setup.py
@ -106,7 +106,7 @@ ext_py_mods = [Extension('setools.policyrep', ['setools/policyrep.pyx'],
|
||||
libraries=['selinux', 'sepol'],
|
||||
library_dirs=lib_dirs,
|
||||
define_macros=macros,
|
||||
extra_compile_args=['-Werror', '-Wextra',
|
||||
extra_compile_args=['-Wextra',
|
||||
'-Waggregate-return',
|
||||
'-Wfloat-equal',
|
||||
'-Wformat', '-Wformat=2',
|
||||
@ -119,13 +119,6 @@ ext_py_mods = [Extension('setools.policyrep', ['setools/policyrep.pyx'],
|
||||
'-Wstrict-prototypes',
|
||||
'-Wunknown-pragmas',
|
||||
'-Wwrite-strings',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-suggest-attribute=format',
|
||||
'-Wno-sign-compare',
|
||||
'-Wno-cast-qual',
|
||||
'-Wno-unreachable-code',
|
||||
'-Wno-implicit-fallthrough',
|
||||
'-Wno-cast-function-type',
|
||||
'-fno-exceptions'])]
|
||||
|
||||
installed_data = [('share/man/man1', glob.glob("man/*.1"))]
|
||||
|
Loading…
Reference in New Issue
Block a user