mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-25 04:26:28 +00:00
PEP8 whitespace fixes in setup.py.
This commit is contained in:
parent
8a37ea0ed9
commit
27be28ecf6
141
setup.py
141
setup.py
@ -19,11 +19,13 @@ class YaccCommand(Command):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
command = ['bison','-y','-d','libqpol/policy_parse.y','-o','libqpol/policy_parse.c']
|
command = ['bison', '-y', '-d', 'libqpol/policy_parse.y',
|
||||||
self.announce("Generating parser",level=log.INFO)
|
'-o', 'libqpol/policy_parse.c']
|
||||||
|
self.announce("Generating parser", level=log.INFO)
|
||||||
self.announce(' '.join(command), level=log.INFO)
|
self.announce(' '.join(command), level=log.INFO)
|
||||||
subprocess.check_call(command)
|
subprocess.check_call(command)
|
||||||
|
|
||||||
|
|
||||||
class LexCommand(Command):
|
class LexCommand(Command):
|
||||||
description = "Build lex scanners."
|
description = "Build lex scanners."
|
||||||
user_options = []
|
user_options = []
|
||||||
@ -35,80 +37,83 @@ class LexCommand(Command):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
command = ['flex','-o','libqpol/policy_scan.c','libqpol/policy_scan.l']
|
command = [
|
||||||
self.announce("Generating scanner",level=log.INFO)
|
'flex', '-o', 'libqpol/policy_scan.c', 'libqpol/policy_scan.l']
|
||||||
|
self.announce("Generating scanner", level=log.INFO)
|
||||||
self.announce(' '.join(command), level=log.INFO)
|
self.announce(' '.join(command), level=log.INFO)
|
||||||
subprocess.check_call(command)
|
subprocess.check_call(command)
|
||||||
|
|
||||||
|
|
||||||
class BuildExtCommand(build_ext):
|
class BuildExtCommand(build_ext):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.run_command('build_yacc')
|
self.run_command('build_yacc')
|
||||||
self.run_command('build_lex')
|
self.run_command('build_lex')
|
||||||
build_ext.run(self)
|
build_ext.run(self)
|
||||||
|
|
||||||
ext_py_mods=[Extension('setools.policyrep._qpol',
|
ext_py_mods = [Extension('setools.policyrep._qpol',
|
||||||
['setools/policyrep/qpol.i',
|
['setools/policyrep/qpol.i',
|
||||||
'libqpol/avrule_query.c',
|
'libqpol/avrule_query.c',
|
||||||
'libqpol/bool_query.c',
|
'libqpol/bool_query.c',
|
||||||
'libqpol/bounds_query.c',
|
'libqpol/bounds_query.c',
|
||||||
'libqpol/class_perm_query.c',
|
'libqpol/class_perm_query.c',
|
||||||
'libqpol/cond_query.c',
|
'libqpol/cond_query.c',
|
||||||
'libqpol/constraint_query.c',
|
'libqpol/constraint_query.c',
|
||||||
'libqpol/context_query.c',
|
'libqpol/context_query.c',
|
||||||
'libqpol/default_object_query.c',
|
'libqpol/default_object_query.c',
|
||||||
'libqpol/expand.c',
|
'libqpol/expand.c',
|
||||||
'libqpol/fs_use_query.c',
|
'libqpol/fs_use_query.c',
|
||||||
'libqpol/ftrule_query.c',
|
'libqpol/ftrule_query.c',
|
||||||
'libqpol/genfscon_query.c',
|
'libqpol/genfscon_query.c',
|
||||||
'libqpol/isid_query.c',
|
'libqpol/isid_query.c',
|
||||||
'libqpol/iterator.c',
|
'libqpol/iterator.c',
|
||||||
'libqpol/mls_query.c',
|
'libqpol/mls_query.c',
|
||||||
'libqpol/mlsrule_query.c',
|
'libqpol/mlsrule_query.c',
|
||||||
'libqpol/module.c',
|
'libqpol/module.c',
|
||||||
'libqpol/module_compiler.c',
|
'libqpol/module_compiler.c',
|
||||||
'libqpol/netifcon_query.c',
|
'libqpol/netifcon_query.c',
|
||||||
'libqpol/nodecon_query.c',
|
'libqpol/nodecon_query.c',
|
||||||
'libqpol/permissive_query.c',
|
'libqpol/permissive_query.c',
|
||||||
'libqpol/polcap_query.c',
|
'libqpol/polcap_query.c',
|
||||||
'libqpol/policy.c',
|
'libqpol/policy.c',
|
||||||
'libqpol/policy_define.c',
|
'libqpol/policy_define.c',
|
||||||
'libqpol/policy_extend.c',
|
'libqpol/policy_extend.c',
|
||||||
'libqpol/portcon_query.c',
|
'libqpol/portcon_query.c',
|
||||||
'libqpol/queue.c',
|
'libqpol/queue.c',
|
||||||
'libqpol/rbacrule_query.c',
|
'libqpol/rbacrule_query.c',
|
||||||
'libqpol/role_query.c',
|
'libqpol/role_query.c',
|
||||||
'libqpol/syn_rule_query.c',
|
'libqpol/syn_rule_query.c',
|
||||||
'libqpol/terule_query.c',
|
'libqpol/terule_query.c',
|
||||||
'libqpol/type_query.c',
|
'libqpol/type_query.c',
|
||||||
'libqpol/user_query.c',
|
'libqpol/user_query.c',
|
||||||
'libqpol/util.c',
|
'libqpol/util.c',
|
||||||
'libqpol/policy_parse.c',
|
'libqpol/policy_parse.c',
|
||||||
'libqpol/policy_scan.c'],
|
'libqpol/policy_scan.c'],
|
||||||
include_dirs=['libqpol','libqpol/include'],
|
include_dirs=['libqpol', 'libqpol/include'],
|
||||||
libraries=['bz2','selinux','sepol'],
|
libraries=['bz2', 'selinux', 'sepol'],
|
||||||
extra_link_args=['-Wl,--version-script=libqpol/libqpol.map',
|
extra_link_args=['-Wl,--version-script=libqpol/libqpol.map',
|
||||||
'/usr/lib/libsepol.a'],
|
'/usr/lib/libsepol.a'],
|
||||||
swig_opts=['-Ilibqpol/include'])]
|
swig_opts=['-Ilibqpol/include'])]
|
||||||
|
|
||||||
setup(name='setools',
|
setup(name='setools',
|
||||||
version='4.0.0-alpha1',
|
version='4.0.0-alpha1',
|
||||||
description='SELinux Policy tools.',
|
description='SELinux Policy tools.',
|
||||||
author='Tresys Technology, LLC',
|
author='Tresys Technology, LLC',
|
||||||
author_email='setools@tresys.com',
|
author_email='setools@tresys.com',
|
||||||
url='https://github.com/TresysTechnology/setools',
|
url='https://github.com/TresysTechnology/setools',
|
||||||
cmdclass={'build_yacc': YaccCommand,
|
cmdclass={'build_yacc': YaccCommand,
|
||||||
'build_lex': LexCommand,
|
'build_lex': LexCommand,
|
||||||
'build_ext': BuildExtCommand},
|
'build_ext': BuildExtCommand},
|
||||||
packages=['setools', 'setools.policyrep'],
|
packages=['setools', 'setools.policyrep'],
|
||||||
scripts = ['seinfo', 'seinfoflow', 'sesearch', 'sedta'],
|
scripts=['seinfo', 'seinfoflow', 'sesearch', 'sedta'],
|
||||||
data_files=[('/usr/share/setools', ['data/perm_map'])],
|
data_files=[('/usr/share/setools', ['data/perm_map'])],
|
||||||
ext_modules=ext_py_mods,
|
ext_modules=ext_py_mods,
|
||||||
test_suite='tests',
|
test_suite='tests',
|
||||||
license='GPLv2+, LGPLv2.1+',
|
license='GPLv2+, LGPLv2.1+',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'Intended Audience :: Information Technology',
|
'Intended Audience :: Information Technology',
|
||||||
'Topic :: Security',
|
'Topic :: Security',
|
||||||
'Topic :: Utilities',
|
'Topic :: Utilities',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user