mirror of
https://github.com/SELinuxProject/setools
synced 2025-02-15 19:48:06 +00:00
Generate Apol compressed help file with "setup.py build_qhc"
"setup.py build_qhc" invokes qcollectiongenerator on qhc/apol.qhcp, which produces two files: - apol.qhc, a Qt Help Collection file - apol.qch, a Qt Compressed Help file As apol.qhc is merely a set of metadata with a relative link to apol.qch, Qt Assistant requires both files in order to display Apol help. Make "setup.py build_qhc" build both files in setoolsgui/apol/. Moreover '*.qch' needs to be added to package_data in order to install apol.qch. Fixes: https://github.com/TresysTechnology/setools/issues/165
This commit is contained in:
parent
e3a905f027
commit
3868613c8f
4
.gitignore
vendored
4
.gitignore
vendored
@ -11,8 +11,8 @@ setools/policyrep/qpol.py
|
||||
*.so
|
||||
|
||||
# Qt Generated Help files
|
||||
help/apol.qch
|
||||
#help/apol.qhc
|
||||
qhc/apol.qch
|
||||
qhc/apol.qhc
|
||||
|
||||
# Generated by tox
|
||||
/.tox
|
||||
|
10
setup.py
10
setup.py
@ -24,13 +24,13 @@ class QtHelpCommand(Command):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
command = ['qcollectiongenerator', 'apol.qhcp', '-o', '../setoolsgui/apol/apol.qhc']
|
||||
command = ['qcollectiongenerator', 'qhc/apol.qhcp']
|
||||
self.announce("Building Qt help files", level=log.INFO)
|
||||
self.announce(' '.join(command), level=log.INFO)
|
||||
pwd = os.getcwd()
|
||||
os.chdir("./qhc")
|
||||
subprocess.check_call(command)
|
||||
os.chdir(pwd)
|
||||
self.announce("Moving Qt help files to setoolsgui/apol")
|
||||
os.rename('qhc/apol.qhc', 'setoolsgui/apol/apol.qhc')
|
||||
os.rename('qhc/apol.qch', 'setoolsgui/apol/apol.qch')
|
||||
|
||||
|
||||
class YaccCommand(Command):
|
||||
@ -182,7 +182,7 @@ setup(name='setools',
|
||||
packages=['setools', 'setools.diff', 'setools.policyrep', 'setoolsgui', 'setoolsgui.apol'],
|
||||
scripts=['apol', 'sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta'],
|
||||
data_files=[(join(sys.prefix, 'share/man/man1'), glob.glob("man/*.1"))],
|
||||
package_data={'': ['*.ui', '*.qhc'], 'setools': ['perm_map']},
|
||||
package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map']},
|
||||
ext_modules=ext_py_mods,
|
||||
test_suite='tests',
|
||||
license='GPLv2+, LGPLv2.1+',
|
||||
|
Loading…
Reference in New Issue
Block a user