doc: Fix path for build version.

setup.py
Pierre-Antoine Rouby 2023-10-09 14:16:15 +02:00
parent 24cb32c96c
commit 2825d02cb2
2 changed files with 14 additions and 2 deletions

View File

@ -16,7 +16,7 @@
# -*- coding: utf-8 -*-
import os
import os, sys
import logging
import subprocess
@ -37,10 +37,18 @@ class DocWindow(PamhyrWindow):
_pamhyr_name = "Doc"
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(
os.path.join(
os.path.dirname(__file__),
"..", "..", "..", "doc", filename
"..", "..", "..", "..", "doc", filename
)
)

View File

@ -83,6 +83,10 @@ def license():
logger.info("license: This is free software, and you are welcome to redistribute it")
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):
"Return QTranslator configured for current language"
lang_file = ""