Fix invalid path references after moving tools & scripts

This commit is contained in:
Campbell Barton 2023-03-01 21:51:51 +11:00
parent 1ed783eed3
commit bd0aa88909
17 changed files with 22 additions and 21 deletions

View File

@ -5,7 +5,7 @@
# Needed for 'bl_keymap_utils.keymap_hierarchy' which inspects tools.
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "release", "scripts", "startup"))
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "scripts", "startup"))
del sys, os
from bl_keymap_utils import keymap_hierarchy

View File

@ -56,7 +56,7 @@ IGNORE_CMAKE = (
UTF8_CHECK = True
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
# doesn't have to exist, just use as reference
BUILD_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(SOURCE_DIR, "..", "build"))))

View File

@ -83,7 +83,7 @@ def deprecations() -> List[Tuple[datetime.datetime, Tuple[str, int], str]]:
# *DEPRECATED* 2010/12/22 ``some.py.func`` more info.
"""
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
SKIP_DIRS_ABS = [os.path.join(SOURCE_DIR, p) for p in SKIP_DIRS]

View File

@ -64,7 +64,7 @@ from check_spelling_c_config import (
)
BASEDIR = os.path.abspath(os.path.dirname(__file__))
ROOTDIR = os.path.normpath(os.path.join(BASEDIR, "..", "..", ".."))
ROOTDIR = os.path.normpath(os.path.join(BASEDIR, "..", ".."))
# Ensure native slashes.
files_ignore = {

View File

@ -11,7 +11,7 @@ sys.path.append(os.path.join(PWD, "..", "utils_maintenance", "modules"))
from batch_edit_text import run
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", "..", ".."))))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", ".."))))
# TODO, move to config file
SOURCE_DIRS = (

View File

@ -28,7 +28,8 @@ from typing import (
# Constants
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
SOURCE_DIR = os.path.normpath(os.path.join(CURRENT_DIR, "..", "..", ".."))
SOURCE_DIR = os.path.normpath(os.path.join(CURRENT_DIR, "..", ".."))
WIKI_URL = "https://wiki.blender.org/wiki/Source/File_Structure"
WIKI_URL_EDIT = "https://wiki.blender.org/w/index.php?title=Source/File_Structure&action=edit"

View File

@ -5,7 +5,7 @@
import os
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(CURRENT_DIR, "..", "..", ".."))))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(CURRENT_DIR, "..", ".."))))
print("creating git-log of %r" % SOURCE_DIR)
os.chdir(SOURCE_DIR)

View File

@ -14,7 +14,7 @@ import sys
import os
MODULE_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "utils"))
SOURCE_DIR = os.path.normpath(os.path.join(MODULE_DIR, "..", "..", "..", ".git"))
SOURCE_DIR = os.path.normpath(os.path.join(MODULE_DIR, "..", "..", ".git"))
sys.path.append(MODULE_DIR)

View File

@ -25,7 +25,7 @@ PATHS: Tuple[str, ...] = (
)
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(
os.path.join(os.path.dirname(__file__), "..", "..", ".."))))
os.path.join(os.path.dirname(__file__), "..", ".."))))
PATHS = tuple(
os.path.join(SOURCE_DIR, p.replace("/", os.sep))

View File

@ -68,13 +68,13 @@ del sys
source_dst = os.path.join(
os.path.dirname(__file__),
"..", "..", "..",
"..", "..",
"release", "datafiles", "userdef", "userdef_default_theme.c",
)
dna_rename_defs_h = os.path.join(
os.path.dirname(__file__),
"..", "..", "..",
"..", "..",
"source", "blender", "makesdna", "intern", "dna_rename_defs.h",
)

View File

@ -441,10 +441,10 @@ def module_classes(mod):
def main():
import os
BASE_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "..")
BASE_DIR = os.path.join(os.path.dirname(__file__), "..", "..")
BASE_DIR = os.path.normpath(os.path.abspath(BASE_DIR))
MODULE_DIR_UI = os.path.join(BASE_DIR, "release", "scripts", "startup")
MODULE_DIR_MOD = os.path.join(BASE_DIR, "release", "scripts", "modules")
MODULE_DIR_UI = os.path.join(BASE_DIR, "scripts", "startup")
MODULE_DIR_MOD = os.path.join(BASE_DIR, "scripts", "modules")
print("Using base dir: %r" % BASE_DIR)
print("Using module dir: %r" % MODULE_DIR_UI)

View File

@ -39,7 +39,7 @@ except ImportError:
sys.exit(1)
# The root of Blender's source directory.
BASE_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "..")
BASE_DIR = os.path.join(os.path.dirname(__file__), "..", "..")
# Names that don't match this regex can't be used as URL's.
re_name_sanity_match = re.compile("[a-zA-Z0-9._*]+")
@ -131,7 +131,7 @@ def main():
parser.add_argument(
"--output",
dest="output",
default=os.path.join(BASE_DIR, "release", "scripts", "modules", "rna_manual_reference.py"),
default=os.path.join(BASE_DIR, "scripts", "modules", "rna_manual_reference.py"),
required=False,
help="path to output including filename and extentsion",
metavar="FILE")

View File

@ -13,7 +13,7 @@ from typing import (
Optional,
)
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", "..", ".."))))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", ".."))))
# TODO, move to config file
SOURCE_DIRS = (

View File

@ -23,7 +23,7 @@ sys.path.append(os.path.join(PWD, "modules"))
from batch_edit_text import run
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", "..", ".."))))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", ".."))))
# TODO: move to configuration file.
SOURCE_DIRS = (

View File

@ -19,7 +19,7 @@ sys.path.append(os.path.join(PWD, "modules"))
from batch_edit_text import run
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", "..", ".."))))
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(PWD, "..", ".."))))
# TODO, move to config file
SOURCE_DIRS = (

View File

@ -48,7 +48,7 @@ VERBOSE_EDIT_ACTION = False
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
SOURCE_DIR = os.path.normpath(os.path.join(BASE_DIR, "..", "..", ".."))
SOURCE_DIR = os.path.normpath(os.path.join(BASE_DIR, "..", ".."))
# -----------------------------------------------------------------------------

View File

@ -22,7 +22,7 @@ PATHS = (
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(
os.path.join(os.path.dirname(__file__), "..", "..", ".."))))
os.path.join(os.path.dirname(__file__), "..", ".."))))
PATHS = tuple(
os.path.join(SOURCE_DIR, p.replace("/", os.sep))