mirror of
https://github.com/pyenv/pyenv.git
synced 2026-10-02 23:41:06 +09:00
commit
49cc565e1c
4
.github/actions/build-python/action.yml
vendored
4
.github/actions/build-python/action.yml
vendored
@ -20,12 +20,12 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
#prerequisites
|
#prerequisites
|
||||||
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd
|
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd gdbm
|
||||||
- if: runner.os == 'Linux'
|
- if: runner.os == 'Linux'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
#prerequisites
|
#prerequisites
|
||||||
pyenv install-prerequisites
|
pyenv install-prerequisites --all
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
#build
|
#build
|
||||||
|
|||||||
4
.github/workflows/modified_scripts_build.yml
vendored
4
.github/workflows/modified_scripts_build.yml
vendored
@ -108,7 +108,7 @@ jobs:
|
|||||||
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
||||||
- run: |
|
- run: |
|
||||||
#prerequisites
|
#prerequisites
|
||||||
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd
|
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd gdbm
|
||||||
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
|
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
|
||||||
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
|
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
|
||||||
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
|
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
|
||||||
@ -222,7 +222,7 @@ jobs:
|
|||||||
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
||||||
- run: |
|
- run: |
|
||||||
#prerequisites
|
#prerequisites
|
||||||
pyenv install-prerequisites
|
pyenv install-prerequisites --all
|
||||||
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
|
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
|
||||||
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
|
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
|
||||||
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
|
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
|
||||||
|
|||||||
@ -261,7 +261,7 @@ for i in "${!DEFINITIONS[@]}"; do
|
|||||||
PYENV_BOOTSTRAP_VERSION="${PYENV_RPYTHON_VERSION}"
|
PYENV_BOOTSTRAP_VERSION="${PYENV_RPYTHON_VERSION}"
|
||||||
else
|
else
|
||||||
for version in $(pyenv-versions --bare | sort -r); do
|
for version in $(pyenv-versions --bare | sort -r); do
|
||||||
if [[ "${version}" == "2.7"* ]]; then
|
if [[ "${version}" =~ ^(2\.7|pypy2\.7) ]]; then
|
||||||
PYENV_BOOTSTRAP_VERSION="$version"
|
PYENV_BOOTSTRAP_VERSION="$version"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -275,7 +275,7 @@ for i in "${!DEFINITIONS[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "pyenv-install: $VERSION_NAME: PyPy requires Python 2.7 to build from source." >&2
|
echo "pyenv-install: $VERSION_NAME: PyPy requires Python 2.7 to build from source. You can specify the version to use by setting the PYENV_BOOTSTRAP_VERSION environment variable." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
77
plugins/python-build/share/python-build/pypy2.7-7.3.23
Normal file
77
plugins/python-build/share/python-build/pypy2.7-7.3.23
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
VERSION='7.3.23'
|
||||||
|
PYVER='2.7'
|
||||||
|
|
||||||
|
# https://www.pypy.org/checksums.html
|
||||||
|
aarch64_hash=b0bec20c16b6ab2bd46bd4f5d6049b6070a22a53eaed437ee9ac36d842ceda74
|
||||||
|
linux32_hash=fa6499281775ec22f4742e9dd7b31c22b8fc6a700c1cf50aebc7ef24f61461c5
|
||||||
|
linux64_hash=7833be48244a6f4aa0720c6b98f151428291a52697da849ef6b3ca7d5bf45b96
|
||||||
|
osarm64_hash=f83d8fce9695f598dc55187c0f6c06c367dbf76d288d2bca7dbf040e4be15f37
|
||||||
|
osx64_hash=edbddb678c00f29c2361dbe6c6ea634f5d62e6854a775a9209c6b789bb0dc00b
|
||||||
|
|
||||||
|
### end of manual settings - following lines same for every download
|
||||||
|
|
||||||
|
function err_no_binary {
|
||||||
|
local archmsg="${1}"
|
||||||
|
local ver="pypy${PYVER}-v${VERSION}-src"
|
||||||
|
local url="https://downloads.python.org/pypy/${ver}.tar.bz2"
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of PyPy is not available for ${archmsg}."
|
||||||
|
echo "try '${url}' to build from source."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function pypy_pkg_data {
|
||||||
|
# pypy architecture tag
|
||||||
|
local ARCH="${1}"
|
||||||
|
|
||||||
|
# defaults
|
||||||
|
local cmd='install_package' # use bz2
|
||||||
|
local pkg="${ARCH}" # assume matches
|
||||||
|
local ext='tar.bz2'
|
||||||
|
local hash='' # undefined
|
||||||
|
|
||||||
|
# select the hash, fix pkg if not match ARCH
|
||||||
|
case "${ARCH}" in
|
||||||
|
'linux-aarch64' )
|
||||||
|
hash="${aarch64_hash}"
|
||||||
|
pkg='aarch64'
|
||||||
|
;;
|
||||||
|
'linux' )
|
||||||
|
hash="${linux32_hash}"
|
||||||
|
pkg='linux32'
|
||||||
|
;;
|
||||||
|
'linux64' )
|
||||||
|
hash="${linux64_hash}"
|
||||||
|
;;
|
||||||
|
'osarm64' )
|
||||||
|
hash="${osarm64_hash}"
|
||||||
|
pkg='macos_arm64'
|
||||||
|
;;
|
||||||
|
'osx64' )
|
||||||
|
if require_osx_version "10.13"; then
|
||||||
|
hash="${osx64_hash}"
|
||||||
|
pkg='macos_x86_64'
|
||||||
|
else
|
||||||
|
err_no_binary "${ARCH}, OS X < 10.13"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
err_no_binary "${ARCH}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local basever="pypy${PYVER}-v${VERSION}"
|
||||||
|
local baseurl="https://downloads.python.org/pypy/${basever}"
|
||||||
|
|
||||||
|
# result - command, package dir, url+hash
|
||||||
|
echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# determine command, package directory, url+hash
|
||||||
|
declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")"
|
||||||
|
|
||||||
|
# install
|
||||||
|
${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip_lt21'
|
||||||
14
plugins/python-build/share/python-build/pypy2.7-7.3.23-src
Normal file
14
plugins/python-build/share/python-build/pypy2.7-7.3.23-src
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
VERSION='7.3.23'
|
||||||
|
PYVER='2.7'
|
||||||
|
|
||||||
|
# https://www.pypy.org/checksums.html
|
||||||
|
hash=7aa8eaf414d25f916fe426365404759c56aa28aea6190e65967c4a45f64dc899
|
||||||
|
|
||||||
|
### end of manual settings - following lines same for every download
|
||||||
|
|
||||||
|
ver="pypy${PYVER}-v${VERSION}-src"
|
||||||
|
url="https://downloads.python.org/pypy/${ver}.tar.bz2"
|
||||||
|
|
||||||
|
prefer_openssl11
|
||||||
|
install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl
|
||||||
|
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip_lt21'
|
||||||
77
plugins/python-build/share/python-build/pypy3.11-7.3.23
Normal file
77
plugins/python-build/share/python-build/pypy3.11-7.3.23
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
VERSION='7.3.23'
|
||||||
|
PYVER='3.11'
|
||||||
|
|
||||||
|
# https://www.pypy.org/checksums.html
|
||||||
|
aarch64_hash=5433ac0ad526aeb35025ef8509bed65cd62ea35cb9e21ac649c69a5eff4eecb6
|
||||||
|
linux32_hash=c7e2ffb173dcadbe4708a2e606e0b705474c1c33f25a09a4084f265d538172e4
|
||||||
|
linux64_hash=16f9f56e82d1f4ec95a324c1a8cacfd78afc7f0656c0a809a18725ef4391453a
|
||||||
|
osarm64_hash=4747b3aceba4c1c6104cddc0fe5ea302101d32955f0957347b9ecc4fbd7aed05
|
||||||
|
osx64_hash=c95363c4e87235d11a6cec8128239c291b1eb67a752778fbcfe029a71da82b5e
|
||||||
|
|
||||||
|
### end of manual settings - following lines same for every download
|
||||||
|
|
||||||
|
function err_no_binary {
|
||||||
|
local archmsg="${1}"
|
||||||
|
local ver="pypy${PYVER}-v${VERSION}-src"
|
||||||
|
local url="https://downloads.python.org/pypy/${ver}.tar.bz2"
|
||||||
|
{ echo
|
||||||
|
colorize 1 "ERROR"
|
||||||
|
echo ": The binary distribution of PyPy is not available for ${archmsg}."
|
||||||
|
echo "try '${url}' to build from source."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function pypy_pkg_data {
|
||||||
|
# pypy architecture tag
|
||||||
|
local ARCH="${1}"
|
||||||
|
|
||||||
|
# defaults
|
||||||
|
local cmd='install_package' # use bz2
|
||||||
|
local pkg="${ARCH}" # assume matches
|
||||||
|
local ext='tar.bz2'
|
||||||
|
local hash='' # undefined
|
||||||
|
|
||||||
|
# select the hash, fix pkg if not match ARCH
|
||||||
|
case "${ARCH}" in
|
||||||
|
'linux-aarch64' )
|
||||||
|
hash="${aarch64_hash}"
|
||||||
|
pkg='aarch64'
|
||||||
|
;;
|
||||||
|
'linux' )
|
||||||
|
hash="${linux32_hash}"
|
||||||
|
pkg='linux32'
|
||||||
|
;;
|
||||||
|
'linux64' )
|
||||||
|
hash="${linux64_hash}"
|
||||||
|
;;
|
||||||
|
'osarm64' )
|
||||||
|
hash="${osarm64_hash}"
|
||||||
|
pkg='macos_arm64'
|
||||||
|
;;
|
||||||
|
'osx64' )
|
||||||
|
if require_osx_version "10.13"; then
|
||||||
|
hash="${osx64_hash}"
|
||||||
|
pkg='macos_x86_64'
|
||||||
|
else
|
||||||
|
err_no_binary "${ARCH}, OS X < 10.13"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
err_no_binary "${ARCH}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local basever="pypy${PYVER}-v${VERSION}"
|
||||||
|
local baseurl="https://downloads.python.org/pypy/${basever}"
|
||||||
|
|
||||||
|
# result - command, package dir, url+hash
|
||||||
|
echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# determine command, package directory, url+hash
|
||||||
|
declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")"
|
||||||
|
|
||||||
|
# install
|
||||||
|
${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip'
|
||||||
14
plugins/python-build/share/python-build/pypy3.11-7.3.23-src
Normal file
14
plugins/python-build/share/python-build/pypy3.11-7.3.23-src
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
VERSION='7.3.23'
|
||||||
|
PYVER='3.11'
|
||||||
|
|
||||||
|
# https://www.pypy.org/checksums.html
|
||||||
|
hash=f15c9c41e03f3f7ecc25228c6c67427b8918f21ef2d694215994b1fade20f69b
|
||||||
|
|
||||||
|
### end of manual settings - following lines same for every download
|
||||||
|
|
||||||
|
ver="pypy${PYVER}-v${VERSION}-src"
|
||||||
|
url="https://downloads.python.org/pypy/${ver}.tar.bz2"
|
||||||
|
|
||||||
|
prefer_openssl11
|
||||||
|
install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl
|
||||||
|
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip'
|
||||||
Loading…
x
Reference in New Issue
Block a user