Changeset View
Changeset View
Standalone View
Standalone View
bin/CraftSetupHelper.py
Show First 20 Lines • Show All 373 Lines • ▼ Show 20 Line(s) | 314 | def setupEnvironment(self): | |||
---|---|---|---|---|---|
374 | 374 | | |||
375 | self.setXDG() | 375 | self.setXDG() | ||
376 | 376 | | |||
377 | self.prependEnvVar("PATH", CraftCore.standardDirs.craftBin()) | 377 | self.prependEnvVar("PATH", CraftCore.standardDirs.craftBin()) | ||
378 | 378 | | |||
379 | # make sure that craftroot bin is the first to look for dlls etc | 379 | # make sure that craftroot bin is the first to look for dlls etc | ||
380 | self.prependEnvVar("PATH", os.path.join(CraftCore.standardDirs.craftRoot(), "bin")) | 380 | self.prependEnvVar("PATH", os.path.join(CraftCore.standardDirs.craftRoot(), "bin")) | ||
381 | self.prependEnvVar("PATH", os.path.join(CraftCore.standardDirs.craftRoot(), "dev-utils", "bin")) | 381 | self.prependEnvVar("PATH", os.path.join(CraftCore.standardDirs.craftRoot(), "dev-utils", "bin")) | ||
382 | # Prefer the same python we used to run this script (ie: the python from CraftSettings) | ||||
383 | self.prependEnvVar("PATH", os.path.dirname(os.environ["CRAFT_PYTHON"])) | ||||
382 | 384 | | |||
383 | # add python site packages to pythonpath | 385 | # add python site packages to pythonpath | ||
384 | self.prependEnvVar("PYTHONPATH", os.path.join(CraftCore.standardDirs.craftRoot(), "lib", "site-packages")) | 386 | self.prependEnvVar("PYTHONPATH", os.path.join(CraftCore.standardDirs.craftRoot(), "lib", "site-packages")) | ||
385 | 387 | | |||
386 | 388 | | |||
387 | if CraftCore.compiler.isClang(): | 389 | if CraftCore.compiler.isClang(): | ||
388 | if OsUtils.isUnix(): | 390 | if OsUtils.isUnix(): | ||
389 | self.addEnvVar("CC", "/usr/bin/clang") | 391 | self.addEnvVar("CC", "/usr/bin/clang") | ||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |