Skip to content

Commit

Permalink
Capitalise constants
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 18, 2023
1 parent 66bf71b commit cf79e2c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ def cmd_msbuild(

SF_PROJECTS = "https://sourceforge.net/projects"

architectures = {
ARCHITECTURES = {
"x86": {"vcvars_arch": "x86", "msbuild_arch": "Win32"},
"x64": {"vcvars_arch": "x86_amd64", "msbuild_arch": "x64"},
"ARM64": {"vcvars_arch": "x86_arm64", "msbuild_arch": "ARM64"},
}

# dependencies, listed in order of compilation
deps = {
DEPS = {
"libjpeg": {
"url": SF_PROJECTS
+ "/libjpeg-turbo/files/3.0.0/libjpeg-turbo-3.0.0.tar.gz/download",
Expand Down Expand Up @@ -530,7 +530,7 @@ def build_env() -> None:


def build_dep(name: str) -> str:
dep = deps[name]
dep = DEPS[name]
dir = dep["dir"]
file = f"build_dep_{name}.cmd"

Expand Down Expand Up @@ -581,7 +581,7 @@ def build_dep(name: str) -> str:

def build_dep_all() -> None:
lines = [r'call "{build_dir}\build_env.cmd"']
for dep_name in deps:
for dep_name in DEPS:
print()
if dep_name in disabled:
print(f"Skipping disabled dependency {dep_name}")
Expand Down Expand Up @@ -627,7 +627,7 @@ def build_dep_all() -> None:
)
parser.add_argument(
"--architecture",
choices=architectures,
choices=ARCHITECTURES,
default=os.environ.get(
"ARCHITECTURE",
(
Expand Down Expand Up @@ -659,7 +659,7 @@ def build_dep_all() -> None:
)
args = parser.parse_args()

arch_prefs = architectures[args.architecture]
arch_prefs = ARCHITECTURES[args.architecture]
print("Target architecture:", args.architecture)

msvs = find_msvs()
Expand Down Expand Up @@ -718,7 +718,7 @@ def build_dep_all() -> None:
# TODO find NASM automatically
}

for k, v in deps.items():
for k, v in DEPS.items():
prefs[f"dir_{k}"] = os.path.join(sources_dir, v["dir"])

print()
Expand Down

0 comments on commit cf79e2c

Please sign in to comment.