mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-06 14:13:28 -06:00
meson: add man pages
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
1f80a62239
commit
6a462a3f60
5
.gitignore
vendored
5
.gitignore
vendored
@ -10,9 +10,4 @@
|
||||
|
||||
/data/gschemas.compiled
|
||||
|
||||
/man/virt-manager.1
|
||||
/man/virt-install.1
|
||||
/man/virt-clone.1
|
||||
/man/virt-xml.1
|
||||
|
||||
/virtinst/build.cfg
|
||||
|
18
man/meson.build
Normal file
18
man/meson.build
Normal file
@ -0,0 +1,18 @@
|
||||
rst_files = files(
|
||||
'virt-install.rst',
|
||||
'virt-clone.rst',
|
||||
'virt-xml.rst',
|
||||
'virt-manager.rst',
|
||||
)
|
||||
|
||||
rst2man_prog = find_program(['rst2man', 'rst2man.py'], required: true)
|
||||
|
||||
foreach rst_file : rst_files
|
||||
man_page = custom_target(
|
||||
input: rst_file,
|
||||
output: '@BASENAME@.1',
|
||||
command: [ rst2man_prog, '--strict', '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: datadir / 'man' / 'man1',
|
||||
)
|
||||
endforeach
|
@ -6,10 +6,14 @@ project('virt-manager',
|
||||
python = import('python')
|
||||
python3 = python.find_installation('python3')
|
||||
|
||||
prefix = get_option('prefix')
|
||||
datadir = prefix / get_option('datadir')
|
||||
|
||||
# figure out if we are building from git
|
||||
git = run_command('test', '-e', '.git', check: false).returncode() == 0
|
||||
|
||||
subdir('scripts')
|
||||
subdir('man')
|
||||
|
||||
if git
|
||||
spec_conf = configuration_data({
|
||||
|
28
setup.py
28
setup.py
@ -160,26 +160,6 @@ from %(pkgname)s import %(filename)s
|
||||
make_script("virtManager", "virtmanager", "virt-manager")
|
||||
|
||||
|
||||
def _make_man_pages(self):
|
||||
rstbin = shutil.which("rst2man")
|
||||
if not rstbin:
|
||||
rstbin = shutil.which("rst2man.py")
|
||||
if not rstbin:
|
||||
sys.exit("Didn't find rst2man or rst2man.py")
|
||||
|
||||
for path in glob.glob("man/*.rst"):
|
||||
base = os.path.basename(path)
|
||||
appname = os.path.splitext(base)[0]
|
||||
newpath = os.path.join(os.path.dirname(path),
|
||||
appname + ".1")
|
||||
|
||||
print("Generating %s" % newpath)
|
||||
out = subprocess.check_output([rstbin, "--strict", path])
|
||||
open(newpath, "wb").write(out)
|
||||
|
||||
self.distribution.data_files.append(
|
||||
('share/man/man1', (newpath,)))
|
||||
|
||||
def _build_icons(self):
|
||||
for size in glob.glob(os.path.join("data/icons", "*")):
|
||||
for category in glob.glob(os.path.join(size, "*")):
|
||||
@ -221,7 +201,6 @@ from %(pkgname)s import %(filename)s
|
||||
|
||||
def run(self):
|
||||
self._make_bin_wrappers()
|
||||
self._make_man_pages()
|
||||
self._build_icons()
|
||||
self._make_bash_completion_files()
|
||||
|
||||
@ -499,13 +478,6 @@ setuptools.setup(
|
||||
["data/org.virt-manager.virt-manager.gschema.xml"]),
|
||||
("share/virt-manager/ui", glob.glob("ui/*.ui")),
|
||||
|
||||
("share/man/man1", [
|
||||
"man/virt-manager.1",
|
||||
"man/virt-install.1",
|
||||
"man/virt-clone.1",
|
||||
"man/virt-xml.1"
|
||||
]),
|
||||
|
||||
("share/virt-manager/virtManager", glob.glob("virtManager/*.py")),
|
||||
("share/virt-manager/virtManager/details",
|
||||
glob.glob("virtManager/details/*.py")),
|
||||
|
Loading…
Reference in New Issue
Block a user