mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge 3006.x into master
This commit is contained in:
commit
4a63636225
3 changed files with 76 additions and 46 deletions
6
.github/workflows/build-deps-onedir.yml
vendored
6
.github/workflows/build-deps-onedir.yml
vendored
|
@ -19,14 +19,12 @@ on:
|
|||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
relenv-version:
|
||||
required: false
|
||||
required: true
|
||||
type: string
|
||||
default: 0.13.2
|
||||
description: The version of relenv to use
|
||||
python-version:
|
||||
required: false
|
||||
required: true
|
||||
type: string
|
||||
default: 3.10.12
|
||||
description: The version of python to use with relenv
|
||||
|
||||
env:
|
||||
|
|
6
.github/workflows/build-salt-onedir.yml
vendored
6
.github/workflows/build-salt-onedir.yml
vendored
|
@ -19,14 +19,12 @@ on:
|
|||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
relenv-version:
|
||||
required: false
|
||||
required: true
|
||||
type: string
|
||||
default: 0.13.2
|
||||
description: The version of relenv to use
|
||||
python-version:
|
||||
required: false
|
||||
required: true
|
||||
type: string
|
||||
default: 3.10.12
|
||||
description: The version of python to use with relenv
|
||||
|
||||
env:
|
||||
|
|
|
@ -10,6 +10,7 @@ import os
|
|||
import pathlib
|
||||
import shutil
|
||||
import tarfile
|
||||
import tempfile
|
||||
import zipfile
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
|
@ -94,8 +95,18 @@ def debian(
|
|||
os.environ[key] = value
|
||||
env_args.extend(["-e", key])
|
||||
|
||||
ctx.run("ln", "-sf", "pkg/debian/", ".")
|
||||
ctx.run("debuild", *env_args, "-uc", "-us")
|
||||
constraints = ["setuptools-scm<8"]
|
||||
with tempfile.NamedTemporaryFile(
|
||||
"w", prefix="reqs-constraints-", suffix=".txt", delete=False
|
||||
) as tfile:
|
||||
with open(tfile.name, "w", encoding="utf-8") as wfh:
|
||||
for req in constraints:
|
||||
wfh.write(f"{req}\n")
|
||||
env = os.environ.copy()
|
||||
env["PIP_CONSTRAINT"] = str(tfile.name)
|
||||
|
||||
ctx.run("ln", "-sf", "pkg/debian/", ".")
|
||||
ctx.run("debuild", *env_args, "-uc", "-us", env=env)
|
||||
|
||||
ctx.info("Done")
|
||||
|
||||
|
@ -160,8 +171,20 @@ def rpm(
|
|||
for key, value in new_env.items():
|
||||
os.environ[key] = value
|
||||
|
||||
spec_file = checkout / "pkg" / "rpm" / "salt.spec"
|
||||
ctx.run("rpmbuild", "-bb", f"--define=_salt_src {checkout}", str(spec_file))
|
||||
constraints = ["setuptools-scm<8"]
|
||||
with tempfile.NamedTemporaryFile(
|
||||
"w", prefix="reqs-constraints-", suffix=".txt", delete=False
|
||||
) as tfile:
|
||||
with open(tfile.name, "w", encoding="utf-8") as wfh:
|
||||
for req in constraints:
|
||||
wfh.write(f"{req}\n")
|
||||
env = os.environ.copy()
|
||||
env["PIP_CONSTRAINT"] = str(tfile.name)
|
||||
|
||||
spec_file = checkout / "pkg" / "rpm" / "salt.spec"
|
||||
ctx.run(
|
||||
"rpmbuild", "-bb", f"--define=_salt_src {checkout}", str(spec_file), env=env
|
||||
)
|
||||
|
||||
ctx.info("Done")
|
||||
|
||||
|
@ -549,40 +572,51 @@ 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",
|
||||
*install_args,
|
||||
"-r",
|
||||
str(requirements_file),
|
||||
env=env,
|
||||
)
|
||||
constraints = ["setuptools-scm<8"]
|
||||
with tempfile.NamedTemporaryFile(
|
||||
"w", prefix="reqs-constraints-", suffix=".txt", delete=False
|
||||
) as tfile:
|
||||
with open(tfile.name, "w", encoding="utf-8") as wfh:
|
||||
for req in constraints:
|
||||
wfh.write(f"{req}\n")
|
||||
env["PIP_CONSTRAINT"] = str(tfile.name)
|
||||
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",
|
||||
"pip",
|
||||
"install",
|
||||
*install_args,
|
||||
"-r",
|
||||
str(requirements_file),
|
||||
env=env,
|
||||
)
|
||||
|
||||
|
||||
@build.command(
|
||||
|
|
Loading…
Add table
Reference in a new issue