mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Set RELENV_BUILDENV in tools/pkg.py
This commit is contained in:
parent
74bdd39a77
commit
79b3a56223
1 changed files with 12 additions and 3 deletions
|
@ -332,10 +332,13 @@ def onedir_dependencies(
|
|||
dest = pathlib.Path(package_name).resolve()
|
||||
create(dest, arch=arch, version=python_version)
|
||||
|
||||
env = os.environ.copy()
|
||||
env["RELENV_DEBUG"] = "1"
|
||||
install_args = ["-v"]
|
||||
if platform == "windows":
|
||||
python_bin = dest / "Scripts" / "python"
|
||||
else:
|
||||
env["RELENV_BUILDENV"] = "1"
|
||||
python_bin = dest / "bin" / "python3"
|
||||
install_args.extend(
|
||||
[
|
||||
|
@ -350,6 +353,7 @@ def onedir_dependencies(
|
|||
"-c",
|
||||
"import sys; print('{}.{}'.format(*sys.version_info))",
|
||||
capture=True,
|
||||
env=env,
|
||||
)
|
||||
requirements_version = version_info.stdout.strip().decode()
|
||||
requirements_file = (
|
||||
|
@ -362,9 +366,11 @@ def onedir_dependencies(
|
|||
)
|
||||
_check_pkg_build_files_exist(ctx, requirements_file=requirements_file)
|
||||
|
||||
ctx.run(str(python_bin), "-m", "pip", "install", "-U", "wheel")
|
||||
ctx.run(str(python_bin), "-m", "pip", "install", "-U", "pip>=22.3.1,<23.0")
|
||||
ctx.run(str(python_bin), "-m", "pip", "install", "-U", "setuptools>=65.6.3,<66")
|
||||
ctx.run(str(python_bin), "-m", "pip", "install", "-U", "wheel", env=env)
|
||||
ctx.run(str(python_bin), "-m", "pip", "install", "-U", "pip>=22.3.1,<23.0", env=env)
|
||||
ctx.run(
|
||||
str(python_bin), "-m", "pip", "install", "-U", "setuptools>=65.6.3,<66", env=env
|
||||
)
|
||||
ctx.run(
|
||||
str(python_bin),
|
||||
"-m",
|
||||
|
@ -373,6 +379,7 @@ def onedir_dependencies(
|
|||
*install_args,
|
||||
"-r",
|
||||
str(requirements_file),
|
||||
env=env,
|
||||
)
|
||||
extras_dir = dest / f"extras-{requirements_version}"
|
||||
extras_dir.mkdir()
|
||||
|
@ -412,6 +419,8 @@ def salt_onedir(
|
|||
_check_pkg_build_files_exist(ctx, onedir_env=onedir_env, salt_archive=salt_archive)
|
||||
|
||||
os.environ["USE_STATIC_REQUIREMENTS"] = "1"
|
||||
os.environ["RELENV_DEBUG"] = "1"
|
||||
os.environ["RELENV_BUILDENV"] = "1"
|
||||
if platform == "windows":
|
||||
ctx.run(
|
||||
"powershell.exe",
|
||||
|
|
Loading…
Add table
Reference in a new issue