mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-11 04:53:47 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc70546565 | ||
|
|
9e03d1b62e | ||
|
|
82ef0424d6 | ||
|
|
d511f7ba88 | ||
|
|
973597d67d | ||
|
|
2bf6111fa0 | ||
|
|
db939bbcfc | ||
|
|
23677c5124 | ||
|
|
9052491a05 | ||
|
|
7307b185d2 | ||
|
|
943015ebb2 |
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
||||
.git/
|
||||
.python-version
|
||||
.vscode/
|
||||
.idea/
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
## Version History
|
||||
|
||||
## 1.2.22
|
||||
|
||||
+ python-build: Add LDFLAGS for zlib on macOS >= 1100 (#1711)
|
||||
+ python-build: Add the CPython 3.9.1 (#1752)
|
||||
+ python-build: Change order of LDFLAGS paths (#1754)
|
||||
+ python-build: Docker config for testing python-build (#1548)
|
||||
+ python-build: Put prerequisite for installation before install (#1750)
|
||||
+ python-build: Add GraalPython 20.3 (#1736)
|
||||
+ python-build: Add CPython 3.8.7
|
||||
+ python-build: Added anaconda3-2020.11 (#1774)
|
||||
+ python-build: Added arm64 architecture support in python-build for macOS (#1775)
|
||||
|
||||
## 1.2.21
|
||||
|
||||
* python-build: Add CPython 3.9.0 (#1706)
|
||||
|
||||
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="Chris L. Barnes <chrislloydbarnes@gmail.com>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y \
|
||||
make \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
zlib1g-dev \
|
||||
libbz2-dev \
|
||||
libreadline-dev \
|
||||
libsqlite3-dev \
|
||||
wget \
|
||||
curl \
|
||||
llvm \
|
||||
libncurses5-dev \
|
||||
libncursesw5-dev \
|
||||
xz-utils \
|
||||
tk-dev \
|
||||
libffi-dev \
|
||||
liblzma-dev \
|
||||
python-openssl \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PYENV_ROOT "/pyenv"
|
||||
ENV PATH "$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
COPY . /pyenv
|
||||
|
||||
RUN eval "$(pyenv init -)"
|
||||
|
||||
@@ -167,6 +167,10 @@ We'd recommend to install pyenv-virtualenv as well if you have some plan to play
|
||||
|
||||
## Installation
|
||||
|
||||
### Prerequisites:
|
||||
|
||||
For pyenv to install python correctly you should [**install the Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment).
|
||||
|
||||
### Homebrew on macOS
|
||||
|
||||
1. Consider installing with [Homebrew](https://brew.sh)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="1.2.21"
|
||||
version="1.2.22"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -226,3 +226,51 @@ Please see the [pyenv wiki](https://github.com/pyenv/pyenv/wiki) for solutions t
|
||||
If you can't find an answer on the wiki, open an issue on the [issue
|
||||
tracker](https://github.com/pyenv/pyenv/issues). Be sure to include
|
||||
the full build log for build failures.
|
||||
|
||||
## Contributing
|
||||
|
||||
### Testing new python versions
|
||||
|
||||
If you are contributing a new python version for python-build,
|
||||
you can test the build in a [docker](https://www.docker.com/) container based on Ubuntu 18.04.
|
||||
|
||||
With docker installed:
|
||||
|
||||
```sh
|
||||
docker build -t my_container .
|
||||
docker run my_container pyenv install <my_version>
|
||||
```
|
||||
|
||||
To enter a shell which will allow you to build and then test a python version,
|
||||
replace the second line with
|
||||
|
||||
```sh
|
||||
docker run -it my_container
|
||||
```
|
||||
|
||||
The container will need to be rebuilt whenever you change the repo,
|
||||
but after the first build, this will be very fast,
|
||||
as the layer including the build dependencies will be cached.
|
||||
|
||||
Changes made inside the container will not be persisted.
|
||||
|
||||
To test *all* new versions since a particular revision (e.g. `master`), `cd` to the root of your `pyenv` repo, and run this script:
|
||||
|
||||
```sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
docker build -t pyenv-test-container .
|
||||
|
||||
git diff --name-only master \
|
||||
| grep '^plugins/python-build/share/python-build/' \
|
||||
| awk -F '/' '{print $NF}' \
|
||||
| xargs -I _ docker run pyenv-test-container pyenv install _
|
||||
```
|
||||
|
||||
- Build the docker image with the **t**ag pyenv-test-container
|
||||
- Look for the names files changed since revision `master`
|
||||
- Filter out any which don't live where python-build keeps its build scripts
|
||||
- Look only at the file name (i.e. the python version name)
|
||||
- Run a new docker container for each, building that version
|
||||
|
||||
|
||||
@@ -995,7 +995,12 @@ build_package_activepython() {
|
||||
|
||||
anaconda_architecture() {
|
||||
case "$(uname -s)" in
|
||||
"Darwin" ) echo "MacOSX-x86_64" ;;
|
||||
"Darwin" )
|
||||
case "$(uname -m)" in
|
||||
"arm64" ) echo "MacOSX-arm64" ;;
|
||||
* ) echo "MacOSX-x86_64" ;;
|
||||
esac
|
||||
;;
|
||||
"Linux" )
|
||||
case "$(uname -m)" in
|
||||
"armv7l" ) echo "Linux-armv7l" ;;
|
||||
@@ -1493,6 +1498,9 @@ use_xcode_sdk_zlib() {
|
||||
if [ -d "$xc_sdk_path" ]; then
|
||||
echo "python-build: use zlib from xcode sdk"
|
||||
export CFLAGS="-I${xc_sdk_path}/usr/include ${CFLAGS}"
|
||||
if is_mac -ge 1100; then
|
||||
export LDFLAGS="${LDFLAGS} -L${xc_sdk_path}/usr/lib"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
10
plugins/python-build/share/python-build/3.8.7
Normal file
10
plugins/python-build/share/python-build/3.8.7
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.0j" "https://www.openssl.org/source/old/1.1.0/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.8.7" "https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tar.xz#ddcc1df16bb5b87aa42ec5d20a5b902f2d088caa269b28e01590f97a798ec50a" ldflags_dirs standard verify_py38 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.8.7" "https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz#20e5a04262f0af2eb9c19240d7ec368f385788bba2d8dfba7e74b20bab4d2bac" ldflags_dirs standard verify_py38 copy_python_gdb ensurepip
|
||||
fi
|
||||
11
plugins/python-build/share/python-build/3.9.1
Normal file
11
plugins/python-build/share/python-build/3.9.1
Normal file
@@ -0,0 +1,11 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.0j" "https://www.openssl.org/source/old/1.1.0/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.1" "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tar.xz#991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff" ldflags_dirs standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.1" "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz#29cb91ba038346da0bd9ab84a0a55a845d872c341a4da6879f462e94c741f117" ldflags_dirs standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
|
||||
19
plugins/python-build/share/python-build/anaconda3-2020.11
Normal file
19
plugins/python-build/share/python-build/anaconda3-2020.11
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Anaconda3-2020.11-Linux-ppc64le" "https://repo.continuum.io/archive/Anaconda3-2020.11-Linux-ppc64le.sh#870535ada0a8ae75eeda8cd2bf7dde853ac9f4949b20e1b5641f1843a655f3b8" "anaconda" verify_py38
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Anaconda3-2020.11-Linux-x86_64" "https://repo.continuum.io/archive/Anaconda3-2020.11-Linux-x86_64.sh#cf2ff493f11eaad5d09ce2b4feaa5ea90db5174303d5b3fe030e16d29aeef7de" "anaconda" verify_py38
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Anaconda3-2020.11-MacOSX-x86_64" "https://repo.continuum.io/archive/Anaconda3-2020.11-MacOSX-x86_64.sh#ec11e325c792a6f49dbdbe5e641991d0a29788689176d7e54da97def9532c762" "anaconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Anaconda3 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -42,7 +42,7 @@ esac
|
||||
if [ -n "${BUILD}" ]; then
|
||||
urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}"
|
||||
else
|
||||
urlprefix="https://github.com/graalvm/graalpython/releases/download/vm-${VERSION}"
|
||||
urlprefix="https://github.com/oracle/graalpython/releases/download/vm-${VERSION}"
|
||||
fi
|
||||
|
||||
install_package "graalpython-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpython_arch}-amd64.tar.gz#${checksum}" "graalpython" ensurepip
|
||||
|
||||
@@ -42,7 +42,7 @@ esac
|
||||
if [ -n "${BUILD}" ]; then
|
||||
urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}"
|
||||
else
|
||||
urlprefix="https://github.com/graalvm/graalpython/releases/download/vm-${VERSION}"
|
||||
urlprefix="https://github.com/oracle/graalpython/releases/download/vm-${VERSION}"
|
||||
fi
|
||||
|
||||
install_package "graalpython-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpython_arch}-amd64.tar.gz#${checksum}" "graalpython" ensurepip
|
||||
|
||||
48
plugins/python-build/share/python-build/graalpython-20.3.0
Normal file
48
plugins/python-build/share/python-build/graalpython-20.3.0
Normal file
@@ -0,0 +1,48 @@
|
||||
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='20.3.0'
|
||||
BUILD=''
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux64" )
|
||||
graalpython_arch="linux"
|
||||
checksum="121508c64c2f18e9a57294d38a4c090c7a9417087f8549e120d0050906e2c82f"
|
||||
;;
|
||||
"osx64" )
|
||||
graalpython_arch="macos"
|
||||
checksum="1a80bf3fde2dc2d0fdc92605176c281835d912c26847346150b3be82d2a250e0"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPython is available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}"
|
||||
else
|
||||
urlprefix="https://github.com/oracle/graalpython/releases/download/vm-${VERSION}"
|
||||
fi
|
||||
|
||||
install_package "graalpython-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpython_arch}-amd64.tar.gz#${checksum}" "graalpython" ensurepip
|
||||
Reference in New Issue
Block a user