Compare commits

..

No commits in common. "master" and "v2.6.18" have entirely different histories.

7 changed files with 25 additions and 63 deletions

View File

@ -4,7 +4,7 @@ on:
workflow_dispatch: {}
schedule:
# Every N hours
- cron: '0 */8 * * *'
- cron: '* */8 * * *'
permissions:
contents: write
@ -34,7 +34,7 @@ jobs:
versions=[l.rstrip() for l in open("added_versions.lst")]
with open(os.environ['GITHUB_ENV'],'a') as f:
f.write(f'branch_name=auto_add_version/{"_".join(versions)}\n')
f.write(f'pr_name=Add CPython {", ".join(versions)}\n')
f.write(f'pr_name=Add {", ".join(versions)}\n')
os.remove("added_versions.lst")
- name: Create Pull Request

View File

@ -1,8 +1,5 @@
# Version History
## Release v2.6.19
* Add CPython 3.15.0a4 by @nedbat in https://github.com/pyenv/pyenv/pull/3390
## Release v2.6.18
* Fix an infinite loop if a shim is symlinked to and called from a different location with "system" version active by @native-api in https://github.com/pyenv/pyenv/pull/3375
* CI: Update and cleanup workflow scripts by @native-api in https://github.com/pyenv/pyenv/pull/3372

View File

@ -12,7 +12,7 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x
version="2.6.19"
version="2.6.18"
git_revision=""
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then

View File

@ -14,7 +14,7 @@
# -g/--debug Build a debug version
#
PYTHON_BUILD_VERSION="2.6.19"
PYTHON_BUILD_VERSION="2.6.18"
OLDIFS="$IFS"

View File

@ -13,11 +13,9 @@ import io
import itertools
import logging
import operator
import os.path
import pathlib
import pprint
import re
import subprocess
import sys
import typing
import urllib.parse
@ -42,8 +40,7 @@ OUT_DIR: pathlib.Path = here.parent.parent / "share" / "python-build"
T_THUNK=\
'''export PYTHON_BUILD_FREE_THREADING=1
source "${BASH_SOURCE[0]%t}"
'''
source "${BASH_SOURCE[0]%t}"'''
def adapt_script(version: packaging.version.Version,
@ -123,7 +120,7 @@ def add_version(version: packaging.version.Version):
return False
VersionDirectory.existing.append(_CPythonExistingScriptInfo(version,str(new_path)))
cleanup_prerelease_upgrade(is_prerelease_upgrade, previous_version, version)
cleanup_prerelease_upgrade(is_prerelease_upgrade, previous_version)
handle_t_thunks(version, previous_version, is_prerelease_upgrade)
@ -133,55 +130,26 @@ def add_version(version: packaging.version.Version):
def cleanup_prerelease_upgrade(
is_prerelease_upgrade: bool,
previous_version: packaging.version.Version,
new_version: packaging.version.Version)\
previous_version: packaging.version.Version)\
-> None:
if not is_prerelease_upgrade:
return
previous_version_filename = str(previous_version)
new_version_filename = str(new_version)
new_version_path = OUT_DIR / new_version_filename
logger.info(f'Git moving {previous_version_filename} '
f'to {new_version_filename} (preserving new data)')
data = new_version_path.read_text()
new_version_path.unlink()
subprocess.check_call(("git","-C",OUT_DIR,
"mv",
previous_version_filename,
new_version_filename))
new_version_path.write_text(data)
del VersionDirectory.existing[previous_version]
if is_prerelease_upgrade:
previous_version_path = OUT_DIR / str(previous_version)
logger.info(f'Deleting {previous_version_path}')
previous_version_path.unlink()
del VersionDirectory.existing[previous_version]
def handle_t_thunks(version, previous_version, is_prerelease_upgrade):
if (version.major, version.minor) < (3, 13):
return
# an old thunk may have older version-specific code
# so it's safer to write a known version-independent template
thunk_name = (str(version) + "t")
thunk_path = OUT_DIR / thunk_name
previous_thunk_name = str(previous_version) + "t"
previous_thunk_path = OUT_DIR / previous_thunk_name
if is_prerelease_upgrade:
logger.info(f"Git moving {previous_thunk_name} to {thunk_name}")
subprocess.check_call(("git","-C",OUT_DIR,
"mv",
previous_thunk_name,
thunk_name))
else:
logger.info(f"Deleting {previous_thunk_path}")
previous_thunk_path.unlink()
logger.info(f"Writing {thunk_path}")
thunk_path.write_text(T_THUNK, encoding='utf-8')
if (version.major, version.minor) >= (3, 13):
# an old thunk may have older version-specific code
# so it's safer to write a known version-independent template
thunk_path = OUT_DIR.joinpath(str(version) + "t")
logger.info(f"Writing {thunk_path}")
thunk_path.write_text(T_THUNK, encoding='utf-8')
if is_prerelease_upgrade:
previous_thunk_path = OUT_DIR.joinpath(str(previous_version) + "t")
logger.info(f"Deleting {previous_thunk_path}")
previous_thunk_path.unlink()
Arguments: argparse.Namespace
@ -500,13 +468,10 @@ class ReadlineVersionsDirectory(KeyedList[_ReadlineVersionInfo, packaging.versio
max_item = candidates._latest_release()
hash_ = Url.sha256_url(max_item.url, VersionDirectory.session)
permalink = 'https://ftpmirror.gnu.org/readline/' +\
os.path.basename(urllib.parse.urlparse(max_item.url).path)
result = _ReadlineVersionInfo(
max_item.version,
max_item.package_name,
permalink,
max_item.url,
hash_)
self.append(result)

View File

@ -4,7 +4,7 @@ export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.15.0a4" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a4.tar.xz#a0a521d5c480b89979da1aefce29750eb158128c0178728ebfef7511c21b4e77" standard verify_py315 copy_python_gdb ensurepip
install_package "Python-3.15.0a3" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a3.tar.xz#6ab02cdac24505779877bb1d9189432d67e90ddf2a9b8b7b373ead54ac07b607" standard verify_py315 copy_python_gdb ensurepip
else
install_package "Python-3.15.0a4" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a4.tgz#c6e450064e38f903cb2857018fc31cff8fcdedae04820b0bfff0825d690ff85f" standard verify_py315 copy_python_gdb ensurepip
install_package "Python-3.15.0a3" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a3.tgz#a8afd71361baf8f02f459a4ab9b73eb4cdf2895991218b8418cf7ba49c96bef7" standard verify_py315 copy_python_gdb ensurepip
fi