mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-18 08:35:19 +00:00
setup.py: Add cython annotation option.
This commit is contained in:
parent
6e67c3b8b4
commit
79b56f4fa8
3
setup.py
3
setup.py
@ -98,6 +98,8 @@ enable_coverage = bool(os.environ.get("SETOOLS_COVERAGE", False))
|
||||
if enable_coverage:
|
||||
macros.append(("CYTHON_TRACE", 1))
|
||||
|
||||
cython_annotate = bool(os.environ.get("SETOOLS_ANNOTATE", False))
|
||||
|
||||
ext_py_mods = [Extension('setools.policyrep.libpolicyrep', ['setools/policyrep/libpolicyrep.pyx'],
|
||||
include_dirs=include_dirs,
|
||||
libraries=['selinux', 'sepol'],
|
||||
@ -137,6 +139,7 @@ setup(name='setools',
|
||||
data_files=[(join(sys.prefix, 'share/man/man1'), glob.glob("man/*.1"))],
|
||||
package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map']},
|
||||
ext_modules=cythonize(ext_py_mods, include_path=['setools/policyrep'],
|
||||
annotate=cython_annotate,
|
||||
compiler_directives={"language_level": 3,
|
||||
"c_string_type": "str",
|
||||
"c_string_encoding": "ascii",
|
||||
|
Loading…
Reference in New Issue
Block a user