Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build-native-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"
- uses: actions/checkout@v3

- name: Set up Python 3.10
Expand Down Expand Up @@ -96,6 +101,11 @@ jobs:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"
- uses: actions/checkout@v3

- name: Patch /usr/local
Expand Down Expand Up @@ -214,6 +224,11 @@ jobs:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"
- uses: actions/checkout@v3

- name: Set up Python 3.10
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
0.20.5
======

* Update gdbm from 1.25 to 1.26
* Update libffi from 3.5.1 to 3.5.2
* Update readline from 8.2.13 to 8.3
* Update sqlite from 3.50.2 to 3.50.4


0.20.4
======

Expand Down
2 changes: 1 addition & 1 deletion relenv/_scripts/install_vc_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ if ( Test-Path -Path $MSBUILD_BIN ) {
"--add Microsoft.VisualStudio.Component.VC.140", `
"--lang en-US", `
"--includeRecommended", `
"--quiet", `
# "--quiet", `
"--wait" `
-Wait -WindowStyle Hidden
if ( Test-Path -Path "$env:TEMP\build_tools\vs_buildtools.exe" ) {
Expand Down
4 changes: 2 additions & 2 deletions relenv/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from ..pyversions import python_versions, Version

from ..common import build_arch
from ..common import build_arch, DEFAULT_PYTHON


def platform_module():
Expand Down Expand Up @@ -58,7 +58,7 @@ def setup_parser(subparsers):
)
build_subparser.add_argument(
"--python",
default="3.10.17",
default=DEFAULT_PYTHON,
type=str,
help="The python version [default: %(default)s]",
)
Expand Down
4 changes: 2 additions & 2 deletions relenv/build/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def build_python(env, dirs, logfp):
download={
"url": "https://sqlite.org/2025/sqlite-autoconf-{version}.tar.gz",
"fallback_url": "https://woz.io/relenv/dependencies/sqlite-autoconf-{version}.tar.gz",
"version": "3500200",
"checksum": "f57c0e54fcddf91f73916987d5c52e743c8bfa76",
"version": "3500400",
"checksum": "145048005c777796dd8494aa1cfed304e8c34283",
},
)

Expand Down
16 changes: 8 additions & 8 deletions relenv/build/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ def build_python(env, dirs, logfp):
build_func=build_sqlite,
download={
"url": "https://sqlite.org/2025/sqlite-autoconf-{version}.tar.gz",
"version": "3500200",
"checksum": "f57c0e54fcddf91f73916987d5c52e743c8bfa76",
"version": "3500400",
"checksum": "145048005c777796dd8494aa1cfed304e8c34283",
"checkfunc": sqlite_version,
"checkurl": "https://sqlite.org/",
},
Expand All @@ -523,8 +523,8 @@ def build_python(env, dirs, logfp):
build_func=build_gdbm,
download={
"url": "https://ftp.gnu.org/gnu/gdbm/gdbm-{version}.tar.gz",
"version": "1.25",
"checksum": "d55bdf2bb5f92f80006166dd8a8323cb2a428bd1",
"version": "1.26",
"checksum": "6cee3657de948e691e8df26509157be950cef4d4",
"checkfunc": tarball_version,
},
)
Expand All @@ -548,8 +548,8 @@ def build_python(env, dirs, logfp):
build_libffi,
download={
"url": "https://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gz",
"version": "3.5.1",
"checksum": "5375e956b0d662e118e47758bd656861e43ba3ef",
"version": "3.5.2",
"checksum": "2bd35b135b0eeb5c631e02422c9dbe786ddb626a",
"checkfunc": github_version,
"checkurl": "https://github.com/libffi/libffi/releases/",
},
Expand Down Expand Up @@ -595,8 +595,8 @@ def build_python(env, dirs, logfp):
wait_on=["ncurses"],
download={
"url": "https://ftp.gnu.org/gnu/readline/readline-{version}.tar.gz",
"version": "8.2.13",
"checksum": "5ffb6a334c2422acbe8f4d2cb11e345265c8d930",
"version": "8.3",
"checksum": "2c05ae9350b695f69d70b47f17f092611de2081f",
"checkfunc": tarball_version,
},
)
Expand Down
45 changes: 45 additions & 0 deletions relenv/build/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,44 @@ def populate_env(env, dirs):
env["MSBUILDDISABLENODEREUSE"] = "1"


def patch_file(path, old, new):
"""
Search a file line by line for a string to replace.

:param path: Location of the file to search
:type path: str
:param old: The value that will be replaced
:type path: str
:param new: The value that will replace the 'old' value.
:type path: str
"""
import re

with open(path, "r") as fp:
content = fp.read()
new_content = ""
for line in content.splitlines():
re.sub(old, new, line)
new_content += line + os.linesep
with open(path, "w") as fp:
fp.write(new_content)


def override_dependency(source, old, new):
"""
Overwrite a dependency string for Windoes PCBuild.

:param source: Python's source directory
:type path: str
:param old: Regular expression to search for
:type path: str
:param new: Replacement text
:type path: str
"""
patch_file(source / "PCbuild" / "python.props", old, new)
patch_file(source / "PCbuild" / "get_externals.bat", old, new)


def build_python(env, dirs, logfp):
"""
Run the commands to build Python.
Expand All @@ -47,6 +85,13 @@ def build_python(env, dirs, logfp):
:param logfp: A handle for the log file
:type logfp: file
"""
# Override default versions
if env["RELENV_PY_MAJOR_VERSION"] in [
"3.10",
"3.11",
]:
override_dependency(dirs.source, r"sqlite-\d+.\d+.\d+.\d+", "sqlite-3.50.4.0")

arch_to_plat = {
"amd64": "x64",
"x86": "win32",
Expand Down
4 changes: 3 additions & 1 deletion relenv/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
import time

# relenv package version
__version__ = "0.20.4"
__version__ = "0.20.5"

MODULE_DIR = pathlib.Path(__file__).resolve().parent

DEFAULT_PYTHON = "3.10.18"

LINUX = "linux"
WIN32 = "win32"
DARWIN = "darwin"
Expand Down
3 changes: 2 additions & 1 deletion relenv/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from .common import (
CHECK_HOSTS,
DATA_DIR,
DEFAULT_PYTHON,
__version__,
build_arch,
check_url,
Expand Down Expand Up @@ -39,7 +40,7 @@ def setup_parser(subparsers):
)
subparser.add_argument(
"--python",
default="3.10.18",
default=DEFAULT_PYTHON,
type=str,
help="The python version [default: %(default)s]",
)
Expand Down
Loading