mirror of
https://github.com/apisnetworks/pyenv.git
synced 2026-11-30 19:59:01 +00:00
python-build: create PEP 394 symlinks for Pyston (#3557)
* Consolidate build_package_pyston2_2 into build_package_pyston There's no longer a difference --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
9 files changed
+41
-29
No files matched your search
@@ -998,27 +998,18 @@ build_package_jython_builder() {
|
||||
( cd "dist" && build_package_jython )
|
||||
}
|
||||
|
||||
build_package_pyston2_2() {
|
||||
# currently supported version 2.2 and 2.3
|
||||
build_package_copy
|
||||
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
|
||||
local bin
|
||||
shopt -s nullglob
|
||||
for bin in "bin/"*; do
|
||||
if [ -f "${bin}" ] && [ -x "${bin}" ] && [ ! -L "${bin}" ]; then
|
||||
case "${bin##*/}" in
|
||||
"pyston"* )
|
||||
( cd "${PREFIX_PATH}/bin" && ln -fs "${bin##*/}" "python" )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
}
|
||||
|
||||
build_package_pyston() {
|
||||
# currently supported version 2.3.1v2 and higher
|
||||
build_package_copy
|
||||
|
||||
# Pyston tarballs provide an executable with a version-specific naming scheme
|
||||
# and `pyston` and `pyston3` symlinks to it.
|
||||
# Add the `python', `pythonX' and `pythonX.Y' symlinks as per PEP 394.
|
||||
local real_interpreter version_suffix
|
||||
real_interpreter=$(resolve_link "${PREFIX_PATH}/bin/pyston" || echo pyston)
|
||||
version_suffix=$("${PREFIX_PATH}/bin/pyston" -c 'import sys; print("%d.%d" % sys.version_info[:2])' 2>&4)
|
||||
for name in python "python${version_suffix%.*}" "python${version_suffix}"; do
|
||||
ln -fs "${real_interpreter}" "${PREFIX_PATH}/bin/$name"
|
||||
done
|
||||
}
|
||||
|
||||
build_package_ironpython() {
|
||||
|
||||
Reference in new issue
Block a user