mirror of https://gitlab.com/pamhyr/pamhyr2
doc: Fix path for build version.
parent
24cb32c96c
commit
2825d02cb2
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os, sys
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
@ -37,10 +37,18 @@ class DocWindow(PamhyrWindow):
|
||||||
_pamhyr_name = "Doc"
|
_pamhyr_name = "Doc"
|
||||||
|
|
||||||
def _path_file(self, filename):
|
def _path_file(self, filename):
|
||||||
|
if ".py" in sys.argv[0]:
|
||||||
|
return os.path.abspath(
|
||||||
|
os.path.join(
|
||||||
|
os.path.dirname(__file__),
|
||||||
|
"..", "..", "..", "doc", filename
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return os.path.abspath(
|
return os.path.abspath(
|
||||||
os.path.join(
|
os.path.join(
|
||||||
os.path.dirname(__file__),
|
os.path.dirname(__file__),
|
||||||
"..", "..", "..", "doc", filename
|
"..", "..", "..", "..", "doc", filename
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,10 @@ def license():
|
||||||
logger.info("license: This is free software, and you are welcome to redistribute it")
|
logger.info("license: This is free software, and you are welcome to redistribute it")
|
||||||
logger.info("license: under certain conditions.")
|
logger.info("license: under certain conditions.")
|
||||||
|
|
||||||
|
py_version = sys.version.split("\n")[0]
|
||||||
|
|
||||||
|
logger.info(f"python: {py_version}")
|
||||||
|
|
||||||
def setup_lang(app, conf:Config):
|
def setup_lang(app, conf:Config):
|
||||||
"Return QTranslator configured for current language"
|
"Return QTranslator configured for current language"
|
||||||
lang_file = ""
|
lang_file = ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue