1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-09 03:53:48 -05:00

Compare commits

...

36 Commits

Author SHA1 Message Date
Anton Petrov
fc4c0ac52d 2.3.10 2023-01-10 19:03:46 +03:00
Anton Petrov
579c34e570 2.3.10 2023-01-10 19:03:00 +03:00
native-api
2369ac2a08 Fix using dependencies from Ports in BSD with no pkg-config (#2586) 2023-01-10 01:13:09 +03:00
Brendan Falk
25c974d59a Add Fig as autocomplete suggestion (#2574)
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2023-01-05 05:03:45 +03:00
native-api
2ea797e226 Merge pull request #2583 from aphedges/update-miniconda-22.11.1
Add miniconda 22.11.1-1
2023-01-05 04:47:28 +03:00
Alex Hedges
7d7f8b94ae Add miniconda 22.11.1-1 2023-01-03 20:31:01 -05:00
Alex Hedges
e715e03be0 Support new miniconda file name format 2023-01-03 20:29:19 -05:00
Alex Hedges
b3a5b5eee3 Support miniconda with Python 3.10 2023-01-03 20:18:26 -05:00
Anton Petrov
894bcd8717 Merge pull request #2579 from hauntsaninja/faster-cpython
Mention how to build for maximum performance
2023-01-03 09:04:44 +03:00
hauntsaninja
03ee3ffd32 Mention how to build for maximum performance 2023-01-02 14:35:16 -08:00
dand-oss
3d83bcdbef Add PyPy 7.3.11 (#2576)
Co-authored-by: Dan Dees <dand@appsmiths.com>
2022-12-31 11:17:18 +03:00
Ian Chen
f897c50202 Fix non-bash output while detecting shell (#2561)
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2022-12-25 02:35:03 +03:00
Anton Petrov
773c65416b Merge pull request #2554 from anton-petrov/master
Build CPython with--enable-shared flag by default on non-mac systems
2022-12-23 13:48:30 +03:00
Anton Petrov
ca1593c80e Fix build tests 2022-12-23 13:36:37 +03:00
Anton Petrov
cb5da5e831 Merge pull request #2568 from rockandska/fix/919
Allow multiple versions for pyenv-install
2022-12-22 21:44:28 +03:00
rockandska
31f372034d Allow multiple versions for pyenv-install 2022-12-22 19:04:04 +01:00
Tobias Klauser
ff93c58bab Remove stray newline after python-build installation (#2566)
To match other Pyenv commands
2022-12-20 22:01:19 +03:00
Anton Petrov
2bb59169db 2.3.9 2022-12-19 07:52:52 +03:00
Anton Petrov
f9e519611a 2.3.9 2022-12-19 07:52:31 +03:00
Phung Nhat-Huy
ae04877154 Add Anaconda3-2022.10 (#2565) 2022-12-19 01:16:18 +03:00
Anton Petrov
e82e12739c Merge pull request #2564 from samdoran/openssl-patches
Add `openssl` patches for 3.7.15, 3.7.16, and 3.8.16
2022-12-16 10:10:32 +03:00
Sam Doran
6b9795728e Add openssl patches for 3.7.15, 3.7.16, and 3.8.16 2022-12-15 16:48:41 -05:00
宇萱/土撥鼠(Lisbeth)
23576296ae Fix compilation error when building OpenSSL 1.1.1q in MacOS 11+ for 3.9.16 (#2558) 2022-12-13 20:05:01 +03:00
Anton Petrov
2128b4f27d Merge pull request #2559 from smcgivern/add-miniforge3-22.9.0-2
Add miniforge3 and mambaforge 22.9.0-2
2022-12-13 19:17:19 +03:00
Sean McGivern
9ba6124833 Add miniforge3 and mambaforge 22.9.0-2 2022-12-13 11:19:40 +00:00
native-api
6c63e086e9 Merge pull request #2553 from dand-oss/pypy7.3.10
Add Pypy 7.3.10
2022-12-11 04:18:08 +03:00
Dan Dees
540c94bdb1 CI: Use PyPy 2.7 as PyPy source build bootstrapper 2022-12-11 02:19:19 +03:00
Ivan Pozdeev
18f62f266d Remove no-longer-needed PyPy prerequisites 2022-12-11 02:18:36 +03:00
Ivan Pozdeev
49cc88094a CI: Install bootstrapper Python for PyPy source builds 2022-12-11 02:17:39 +03:00
Dan Dees
cad18bb332 Add PyPy 7.3.10 2022-12-11 02:17:19 +03:00
Ivan Pozdeev
79fdf1e3bb Improve Mac feature messages phrasing 2022-12-09 16:58:44 +03:00
Ivan Pozdeev
03bba03291 Set --enable-shared earlier
To take advantage of the existing logic to add to rpath
2022-12-09 16:52:47 +03:00
Ivan Pozdeev
cf50e2a2db Don't hide output from extension checks 2022-12-09 11:41:26 +03:00
Anton Petrov
b3d52b05d2 --enable-shared by default on non-mac systems 2022-12-08 12:17:53 +03:00
Anton Petrov
73dc5547fc Merge pull request #2551 from nwh/add-miniforge3-latest-suffix
add -latest suffix to miniforge3
2022-12-08 11:33:16 +03:00
Nick Henderson
8cfa967d74 add -latest suffix to miniforge3
The auto-resolve feature (#2487) means that

  pyenv install miniforge3

installs miniforge3-4.10.3-10 and not the exactly named "miniforge3"
recipe.  Renaming "miniforge3" to "miniforge3-latest" solves this
issue allowing users to execute

  pyenv install miniforge3-latest

This is similar to the naming of the current "miniconda3-latest" recipe.
2022-12-07 12:56:03 -08:00
42 changed files with 1308 additions and 363 deletions

View File

@@ -32,26 +32,36 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: | - run: |
brew install openssl openssl@1.1 readline sqlite3 xz zlib #envvars
- run: |
export PYENV_ROOT="$GITHUB_WORKSPACE" export PYENV_ROOT="$GITHUB_WORKSPACE"
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
#prerequisites
brew install openssl openssl@1.1 readline sqlite3 xz zlib
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
pyenv install $PYENV_BOOTSTRAP_VERSION
fi
- run: |
#build
pyenv install -v ${{ matrix.python-version }} pyenv install -v ${{ matrix.python-version }}
pyenv global ${{ matrix.python-version }} pyenv global ${{ matrix.python-version }}
# Micropython doesn't support --version # Micropython doesn't support --version
- run: > - run: |
#print version
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
python -c 'import sys; print(sys.version)' python -c 'import sys; print(sys.version)'
else else
python --version; python --version
python -m pip --version python -m pip --version
fi fi
# Micropython doesn't support sys.executable, os.path, older versions even os # Micropython doesn't support sys.executable, os.path, older versions even os
- env: - env:
EXPECTED_PYTHON: ${{ matrix.python-version }} EXPECTED_PYTHON: ${{ matrix.python-version }}
run: | run: |
#check
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
[[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1 [[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1
python -c 'import sys; assert sys.implementation.name == "micropython"' python -c 'import sys; assert sys.implementation.name == "micropython"'
@@ -82,29 +92,39 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: | - run: |
sudo apt-get update -q; sudo apt-get install -yq make build-essential \ #envvars
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev
- run: |
export PYENV_ROOT="$GITHUB_WORKSPACE" export PYENV_ROOT="$GITHUB_WORKSPACE"
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
#prerequisites
sudo apt-get update -q; sudo apt-get install -yq make build-essential \
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
pyenv install $PYENV_BOOTSTRAP_VERSION
fi
- run: |
#build
pyenv install -v ${{ matrix.python-version }} pyenv install -v ${{ matrix.python-version }}
pyenv global ${{ matrix.python-version }} pyenv global ${{ matrix.python-version }}
# Micropython doesn't support --version # Micropython doesn't support --version
- run: > - run: |
#print version
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
python -c 'import sys; print(sys.version)' python -c 'import sys; print(sys.version)'
else else
python --version; python --version
python -m pip --version python -m pip --version
fi fi
# Micropython doesn't support sys.executable, os.path, older versions even os # Micropython doesn't support sys.executable, os.path, older versions even os
- env: - env:
EXPECTED_PYTHON: ${{ matrix.python-version }} EXPECTED_PYTHON: ${{ matrix.python-version }}
run: | run: |
#check
if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then
[[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1 [[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1
python -c 'import sys; assert sys.implementation.name == "micropython"' python -c 'import sys; assert sys.implementation.name == "micropython"'

View File

@@ -1,5 +1,26 @@
# Version History # Version History
## Release 2.3.10
* Remove stray newline after python-build installation by @tklauser in https://github.com/pyenv/pyenv/pull/2566
* Allow multiple versions for pyenv-install by @rockandska in https://github.com/pyenv/pyenv/pull/2568
* --enable-shared by default by @anton-petrov in https://github.com/pyenv/pyenv/pull/2554
* Fix non-bash output while detecting shell by @ianchen-tw in https://github.com/pyenv/pyenv/pull/2561
* add pypy 7.3.11 release by @dand-oss in https://github.com/pyenv/pyenv/pull/2576
* Mention how to build for maximum performance by @hauntsaninja in https://github.com/pyenv/pyenv/pull/2579
* Add miniconda 22.11.1-1 by @aphedges in https://github.com/pyenv/pyenv/pull/2583
* Add Fig as autocomplete suggestion by @brendanfalk in https://github.com/pyenv/pyenv/pull/2574
* Fix using dependencies from Ports in BSD with no pkg-config by @native-api in https://github.com/pyenv/pyenv/pull/2586
## Release 2.3.9
* Add -latest suffix to miniforge3 by @nwh in https://github.com/pyenv/pyenv/pull/2551
* Add PyPy 7.3.10 by @dand-oss in https://github.com/pyenv/pyenv/pull/2553
* Add miniforge3 and mambaforge 22.9.0-2 by @smcgivern in https://github.com/pyenv/pyenv/pull/2559
* Fix compilation error when building OpenSSL 1.1.1q in MacOS 11+ for 3.9.16 by @lisbethw1130 in https://github.com/pyenv/pyenv/pull/2558
* Add `openssl` patches for 3.7.15, 3.7.16, and 3.8.16 by @samdoran in https://github.com/pyenv/pyenv/pull/2564
* Add support for Anaconda3-2022.10 by @huypn12 in https://github.com/pyenv/pyenv/pull/2565
## Release 2.3.8 ## Release 2.3.8
* Export detected shell environment in pyenv-init by @ianchen-tw in https://github.com/pyenv/pyenv/pull/2540 * Export detected shell environment in pyenv-init by @ianchen-tw in https://github.com/pyenv/pyenv/pull/2540

View File

@@ -357,6 +357,11 @@ See [Advanced configuration](#advanced-configuration) for details and more confi
**Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too. **Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too.
In MacOS, you might also want to install [Fig](https://fig.io/) which
provides alternative shell completions for many command line tools with an
IDE-like popup interface in the terminal window.
(Note that their completions are independent from Pyenv's codebase
so they might be slightly out of sync for bleeding-edge interface changes.)
### Restart your shell ### Restart your shell
@@ -396,6 +401,9 @@ You can pass options to Python's `configure` and compiler flags to customize the
see [_Special environment variables_ in Python-Build's README](plugins/python-build/README.md#special-environment-variables) see [_Special environment variables_ in Python-Build's README](plugins/python-build/README.md#special-environment-variables)
for details. for details.
**NOTE:** If you'd like a faster interpreter at the cost of longer build times,
see [_Building for maximum performance_ in Python-Build's README](plugins/python-build/README.md#building-for-maximum-performance).
**NOTE:** If you want to use proxy for download, please set the `http_proxy` and `https_proxy` **NOTE:** If you want to use proxy for download, please set the `http_proxy` and `https_proxy`
environment variables. environment variables.

View File

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

View File

@@ -83,7 +83,7 @@ function main() {
exit 0 exit 0
;; ;;
"detect-shell") "detect-shell")
detect_profile detect_profile 1
print_detect_shell print_detect_shell
exit 0 exit 0
;; ;;
@@ -93,6 +93,8 @@ function main() {
} }
function detect_profile() { function detect_profile() {
local detect_for_detect_shell="$1"
case "$shell" in case "$shell" in
bash ) bash )
if [ -e '~/.bash_profile' ]; then if [ -e '~/.bash_profile' ]; then
@@ -112,8 +114,13 @@ function detect_profile() {
rc='~/.profile' rc='~/.profile'
;; ;;
* ) * )
if [ -n "$detect_for_detect_shell" ]; then
profile=
rc=
else
profile='your shell'\''s login startup file' profile='your shell'\''s login startup file'
rc='your shell'\''s interactive startup file' rc='your shell'\''s interactive startup file'
fi
;; ;;
esac esac
} }

View File

@@ -164,6 +164,21 @@ the version(s) installed with `--enable-shared`.
$ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.9 $ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.9
``` ```
### Building for maximum performance
Building CPython with `--enable-optimizations` will result in a faster
interpreter at the cost of significantly longer build times. Most notably, this
enables PGO (profile guided optimization). While your mileage may vary, it is
common for performance improvement from this to be in the ballpark of 30%.
```sh
env PYTHON_CONFIGURE_OPTS='--enable-optimizations --with-lto' PYTHON_CFLAGS='-march=native -mtune=native' pyenv install 3.6.0
```
You can also customize the task used for profile guided optimization by setting
the `PROFILE_TASK` environment variable, for instance, `PROFILE_TASK='-m
test.regrtest --pgo -j0'` will run much faster than the default task.
### Checksum verification ### Checksum verification
If you have the `shasum`, `openssl`, or `sha256sum` tool installed, python-build will If you have the `shasum`, `openssl`, or `sha256sum` tool installed, python-build will

View File

@@ -2,7 +2,7 @@
# #
# Summary: Install a Python version using python-build # Summary: Install a Python version using python-build
# #
# Usage: pyenv install [-f] [-kvp] <version> # Usage: pyenv install [-f] [-kvp] <version>...
# pyenv install [-f] [-kvp] <definition-file> # pyenv install [-f] [-kvp] <definition-file>
# pyenv install -l|--list # pyenv install -l|--list
# pyenv install --version # pyenv install --version
@@ -113,17 +113,15 @@ for option in "${OPTIONS[@]}"; do
esac esac
done done
[ "${#ARGUMENTS[@]}" -le 1 ] || usage 1 >&2
unset VERSION_NAME unset VERSION_NAME
# The first argument contains the definition to install. If the # The first argument contains the definition to install. If the
# argument is missing, try to install whatever local app-specific # argument is missing, try to install whatever local app-specific
# version is specified by pyenv. Show usage instructions if a local # version is specified by pyenv. Show usage instructions if a local
# version is not specified. # version is not specified.
DEFINITION="${ARGUMENTS[0]}" DEFINITIONS=("${ARGUMENTS[@]}")
[ -n "$DEFINITION" ] || DEFINITION="$(pyenv-local 2>/dev/null || true)" [ -n "${DEFINITIONS[*]}" ] || DEFINITIONS=($(pyenv-local 2>/dev/null || true))
[ -n "$DEFINITION" ] || usage 1 >&2 [ -n "${DEFINITIONS[*]}" ] || usage 1 >&2
# Define `before_install` and `after_install` functions that allow # Define `before_install` and `after_install` functions that allow
# plugin hooks to register a string of code for execution before or # plugin hooks to register a string of code for execution before or
@@ -140,19 +138,27 @@ after_install() {
after_hooks["${#after_hooks[@]}"]="$hook" after_hooks["${#after_hooks[@]}"]="$hook"
} }
# Plan cleanup on unsuccessful installation.
cleanup() {
[ -z "${PREFIX_EXISTS}" ] && rm -rf "$PREFIX"
}
trap cleanup SIGINT
OLDIFS="$IFS" OLDIFS="$IFS"
IFS=$'\n' scripts=(`pyenv-hooks install`) IFS=$'\n' scripts=(`pyenv-hooks install`)
IFS="$OLDIFS" IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done for script in "${scripts[@]}"; do source "$script"; done
for DEFINITION in "${DEFINITIONS[@]}";do
# Try to resolve a prefix if user indeed gave a prefix. # Try to resolve a prefix if user indeed gave a prefix.
# We install the version under the resolved name # We install the version under the resolved name
# and hooks also see the resolved name # and hooks also see the resolved name
DEFINITION="$(pyenv-latest -q -k "$DEFINITION" || echo "$DEFINITION")" DEFINITION="$(pyenv-latest -q -k "$DEFINITION" || echo "$DEFINITION")"
# Set VERSION_NAME from $DEFINITION, if it is not already set. Then # Set VERSION_NAME from $DEFINITION. Then compute the installation prefix.
# compute the installation prefix. VERSION_NAME="${DEFINITION##*/}"
[ -n "$VERSION_NAME" ] || VERSION_NAME="${DEFINITION##*/}"
[ -n "$DEBUG" ] && VERSION_NAME="${VERSION_NAME}-debug" [ -n "$DEBUG" ] && VERSION_NAME="${VERSION_NAME}-debug"
PREFIX="${PYENV_ROOT}/versions/${VERSION_NAME}" PREFIX="${PYENV_ROOT}/versions/${VERSION_NAME}"
@@ -173,7 +179,7 @@ if [ -d "${PREFIX}/bin" ]; then
# Since we know the python version is already installed, and are opting to # Since we know the python version is already installed, and are opting to
# not force installation of existing versions, we just `exit 0` here to # not force installation of existing versions, we just `exit 0` here to
# leave things happy # leave things happy
exit 0 continue
fi fi
fi fi
@@ -219,7 +225,7 @@ if [ -z "${PYENV_BOOTSTRAP_VERSION}" ]; then
done done
fi fi
if [ -n "$PYENV_BOOTSTRAP_VERSION" ]; then if [ -n "$PYENV_BOOTSTRAP_VERSION" ]; then
for dep in curses genc pycparser; do for dep in pycparser; do
if ! PYENV_VERSION="$PYENV_BOOTSTRAP_VERSION" pyenv-exec python -c "import ${dep}" 1>/dev/null 2>&1; then if ! PYENV_VERSION="$PYENV_BOOTSTRAP_VERSION" pyenv-exec python -c "import ${dep}" 1>/dev/null 2>&1; then
echo "pyenv-install: $VERSION_NAME: PyPy requires \`${dep}' in $PYENV_BOOTSTRAP_VERSION to build from source." >&2 echo "pyenv-install: $VERSION_NAME: PyPy requires \`${dep}' in $PYENV_BOOTSTRAP_VERSION to build from source." >&2
exit 1 exit 1
@@ -240,13 +246,6 @@ fi
# Execute `before_install` hooks. # Execute `before_install` hooks.
for hook in "${before_hooks[@]}"; do eval "$hook"; done for hook in "${before_hooks[@]}"; do eval "$hook"; done
# Plan cleanup on unsuccessful installation.
cleanup() {
[ -z "${PREFIX_EXISTS}" ] && rm -rf "$PREFIX"
}
trap cleanup SIGINT
# Invoke `python-build` and record the exit status in $STATUS. # Invoke `python-build` and record the exit status in $STATUS.
STATUS=0 STATUS=0
python-build $KEEP $VERBOSE $HAS_PATCH $DEBUG "$DEFINITION" "$PREFIX" || STATUS="$?" python-build $KEEP $VERBOSE $HAS_PATCH $DEBUG "$DEFINITION" "$PREFIX" || STATUS="$?"
@@ -283,7 +282,10 @@ for hook in "${after_hooks[@]}"; do eval "$hook"; done
if [ "$STATUS" == "0" ]; then if [ "$STATUS" == "0" ]; then
pyenv-rehash pyenv-rehash
else else
break
cleanup cleanup
fi fi
exit "$STATUS" done
exit "${STATUS:-0}"

View File

@@ -233,9 +233,7 @@ install_package_using() {
make_package "${make_args[@]}" make_package "${make_args[@]}"
popd >&4 popd >&4
{ echo "Installed ${package_name} to ${PREFIX_PATH}" echo "Installed ${package_name} to ${PREFIX_PATH}" >&2
echo
} >&2
} }
make_package() { make_package() {
@@ -940,7 +938,13 @@ build_package_micropython() {
pypy_architecture() { pypy_architecture() {
case "$(uname -s)" in case "$(uname -s)" in
"Darwin" ) echo "osx64" ;; "Darwin" )
case "$(uname -m)" in
"arm64" ) echo "osarm64" ;;
"x86_64" ) echo "osx64" ;;
* ) return 1 ;;
esac
;;
"Linux" ) "Linux" )
case "$(uname -m)" in case "$(uname -m)" in
"armel" ) echo "linux-armel" ;; "armel" ) echo "linux-armel" ;;
@@ -1412,20 +1416,17 @@ use_freebsd_pkg() {
if [ "FreeBSD" = "$(uname -s)" ]; then if [ "FreeBSD" = "$(uname -s)" ]; then
# use openssl if installed from Ports Collection # use openssl if installed from Ports Collection
if [ -f /usr/local/include/openssl/ssl.h ]; then if [ -f /usr/local/include/openssl/ssl.h ]; then
package_option ruby configure --with-openssl-dir="/usr/local" package_option python configure --with-openssl="/usr/local"
fi fi
# check if 11-R or later # check if 11-R or later
release="$(uname -r)" release="$(uname -r)"
if [ "${release%%.*}" -ge 11 ]; then if [ "${release%%.*}" -ge 11 ]; then
# prefers readline to compile most of ruby versions if pkg info -e readline > /dev/null && ! command -v pkg-config > /dev/null ; then
if pkg info -e readline > /dev/null; then
# use readline from Ports Collection # use readline from Ports Collection
package_option ruby configure --with-readline-dir="/usr/local" # unlike Linux, BSD's cc does not look in /usr/local by default
elif pkg info -e libedit > /dev/null; then export CPPFLAGS="${CPPFLAGS:+${CPPFLAGS% } }-I/usr/local/include"
# use libedit from Ports Collection export LDFLAGS="${LDFLAGS:+${LDFLAGS% } }-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
package_option ruby configure --enable-libedit
package_option ruby configure --with-libedit-dir="/usr/local"
fi fi
fi fi
fi fi
@@ -1788,7 +1789,7 @@ verify_python() {
} }
try_python_module() { try_python_module() {
if ! "$PYTHON_BIN" -c "import $1" 1>/dev/null 2>&1; then if ! "$PYTHON_BIN" -c "import $1"; then
{ colorize 1 "WARNING" { colorize 1 "WARNING"
echo ": The Python $1 extension was not compiled${3:+ $3}. Missing the ${2:-$1}?" echo ": The Python $1 extension was not compiled${3:+ $3}. Missing the ${2:-$1}?"
return 0 return 0
@@ -1797,7 +1798,7 @@ try_python_module() {
} }
verify_python_module() { verify_python_module() {
if ! "$PYTHON_BIN" -c "import $1" 1>/dev/null 2>&1; then if ! "$PYTHON_BIN" -c "import $1"; then
{ colorize 1 "ERROR" { colorize 1 "ERROR"
echo ": The Python $1 extension was not compiled. Missing the ${2:-$1}?" echo ": The Python $1 extension was not compiled. Missing the ${2:-$1}?"
echo echo
@@ -2188,11 +2189,15 @@ if [ -n "$DEBUG" ]; then
package_option python configure --with-pydebug package_option python configure --with-pydebug
fi fi
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" != *"--enable-framework"* ]]; then
package_option python configure --enable-shared
fi
# python-build: Specify `--libdir` on configure to fix build on openSUSE (#36) # python-build: Specify `--libdir` on configure to fix build on openSUSE (#36)
package_option python configure --libdir="${PREFIX_PATH}/lib" package_option python configure --libdir="${PREFIX_PATH}/lib"
# python-build: Set `RPATH` if `--enable-shared` was given (#65, #66, #82) # python-build: Set `RPATH` if `--enable-shared` was given (#65, #66, #82)
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]]; then if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS ${PYTHON_CONFIGURE_OPTS_ARRAY[@]}" == *"--enable-shared"* ]]; then
# The ld on Darwin embeds the full paths to each dylib by default # The ld on Darwin embeds the full paths to each dylib by default
if [[ "$LDFLAGS" != *"-rpath="* ]] && ! is_mac; then if [[ "$LDFLAGS" != *"-rpath="* ]] && ! is_mac; then
export LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}" export LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}"
@@ -2207,7 +2212,7 @@ fi
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99) # Add support for framework installation (`--enable-framework`) of CPython (#55, #99)
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
if ! is_mac; then if ! is_mac; then
echo "python-build: framework installation is not supported." >&2 echo "python-build: framework installation is not supported outside of MacOS." >&2
exit 1 exit 1
fi fi
create_framework_dirs() { create_framework_dirs() {
@@ -2228,7 +2233,7 @@ fi
# Build against universal SDK # Build against universal SDK
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then
if ! is_mac; then if ! is_mac; then
echo "python-build: universal installation is not supported." >&2 echo "python-build: universal installation is not supported outside of MacOS." >&2
exit 1 exit 1
fi fi
package_option python configure --enable-universalsdk=/ package_option python configure --enable-universalsdk=/

View File

@@ -108,6 +108,7 @@ class PyVersion(StrEnum):
PY37 = "py37" PY37 = "py37"
PY38 = "py38" PY38 = "py38"
PY39 = "py39" PY39 = "py39"
PY310 = "py310"
def version(self): def version(self):
first, *others = self.value[2:] first, *others = self.value[2:]
@@ -120,7 +121,7 @@ class PyVersion(StrEnum):
@total_ordering @total_ordering
class VersionStr(str): class VersionStr(str):
def info(self): def info(self):
return tuple(int(n) for n in self.split(".")) return tuple(int(n) for n in self.replace("-", ".").split("."))
def __eq__(self, other): def __eq__(self, other):
return str(self) == str(other) return str(self) == str(other)
@@ -213,7 +214,10 @@ class CondaSpec(NamedTuple):
@classmethod @classmethod
def from_filestem(cls, stem, md5, repo, py_version=None): def from_filestem(cls, stem, md5, repo, py_version=None):
miniconda_n, ver, os, arch = stem.split("-") # The `*vers` captures the new trailing `-1` in some file names (a build number?)
# so they can be processed properly.
miniconda_n, *vers, os, arch = stem.split("-")
ver = "-".join(vers)
suffix = miniconda_n[-1] suffix = miniconda_n[-1]
if suffix in string.digits: if suffix in string.digits:
tflavor = miniconda_n[:-1] tflavor = miniconda_n[:-1]
@@ -371,7 +375,7 @@ if __name__ == "__main__":
reason = "already exists" reason = "already exists"
elif key.version_str.info() <= (4, 3, 30): elif key.version_str.info() <= (4, 3, 30):
reason = "too old" reason = "too old"
elif len(key.version_str.info()) >= 4: elif len(key.version_str.info()) >= 4 and "-" not in key.version_str:
reason = "ignoring hotfix releases" reason = "ignoring hotfix releases"
if reason: if reason:

View File

@@ -0,0 +1,28 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Anaconda3-2022.10-Linux-aarch64" "https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-aarch64.sh#dac187c9fa6cae4ad663937f0ef79c8f" "anaconda" verify_py39
;;
"Linux-ppc64le" )
install_script "Anaconda3-2022.10-Linux-ppc64le" "https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-ppc64le.sh#8dee159ac42f80eca8ce99ddbfd94099" "anaconda" verify_py39
;;
"Linux-s390x" )
install_script "Anaconda3-2022.10-Linux-s390x" "https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-s390x.sh#ef2a6accc4d0d77756130198cb481358" "anaconda" verify_py39
;;
"Linux-x86_64" )
install_script "Anaconda3-2022.10-Linux-x86_64" "https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh#80256bd7a55509665c4179fd61516745" "anaconda" verify_py39
;;
"MacOSX-arm64" )
install_script "Anaconda3-2022.10-MacOSX-arm64" "https://repo.anaconda.com/archive/Anaconda3-2022.10-MacOSX-arm64.sh#3a5d726f90e11270990e520905cf8466" "anaconda" verify_py39
;;
"MacOSX-x86_64" )
install_script "Anaconda3-2022.10-MacOSX-x86_64" "https://repo.anaconda.com/archive/Anaconda3-2022.10-MacOSX-x86_64.sh#83fe2cbd4b32eeb63e99c3e15d72be85" "anaconda" verify_py39
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Anaconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,25 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Mambaforge-22.9.0-2-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Mambaforge-22.9.0-2-Linux-aarch64.sh#26cf4a5cd3a3b9085f75911b459b969d6ff8ab426ef9a8e7ce3b47cc683ead86" "miniconda" verify_py310
;;
"Linux-ppc64le" )
install_script "Mambaforge-22.9.0-2-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Mambaforge-22.9.0-2-Linux-ppc64le.sh#e13044cdbce8542896dd8b7128a00b691c119e7ad6e872c7de93ec9954b4775d" "miniconda" verify_py310
;;
"Linux-x86_64" )
install_script "Mambaforge-22.9.0-2-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Mambaforge-22.9.0-2-Linux-x86_64.sh#d2bb6c33f2373131fc71283baae9eb81a279708d007e55d627d85abe30c2d0eb" "miniconda" verify_py310
;;
"MacOSX-arm64" )
install_script "Mambaforge-22.9.0-2-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Mambaforge-22.9.0-2-MacOSX-arm64.sh#21959f1a17a662b3f260e8b04fe2dfe82f1246746875a72f513d39159d8b816b" "miniconda" verify_py310
;;
"MacOSX-x86_64" )
install_script "Mambaforge-22.9.0-2-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Mambaforge-22.9.0-2-MacOSX-x86_64.sh#844fc1ac61967990f0cfb9e516e8b0704ac2e500854588fd9851d2790d817bab" "miniconda" verify_py310
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Mambaforge is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,28 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py310_22.11.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-Linux-aarch64.sh#48a96df9ff56f7421b6dd7f9f71d548023847ba918c3826059918c08326c2017" "miniconda" verify_py310
;;
"Linux-ppc64le" )
install_script "Miniconda3-py310_22.11.1-1-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-Linux-ppc64le.sh#4c86c3383bb27b44f7059336c3a46c34922df42824577b93eadecefbf7423836" "miniconda" verify_py310
;;
"Linux-s390x" )
install_script "Miniconda3-py310_22.11.1-1-Linux-s390x" "https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-Linux-s390x.sh#a150511e7fd19d07b770f278fb5dd2df4bc24a8f55f06d6274774f209a36c766" "miniconda" verify_py310
;;
"Linux-x86_64" )
install_script "Miniconda3-py310_22.11.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-Linux-x86_64.sh#00938c3534750a0e4069499baf8f4e6dc1c2e471c86a59caa0dd03f4a9269db6" "miniconda" verify_py310
;;
"MacOSX-arm64" )
install_script "Miniconda3-py310_22.11.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-MacOSX-arm64.sh#22eec9b7d3add25ac3f9b60621d8f3d8df3e63d4aa0ae5eb846b558d7ba68333" "miniconda" verify_py310
;;
"MacOSX-x86_64" )
install_script "Miniconda3-py310_22.11.1-1-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_22.11.1-1-MacOSX-x86_64.sh#7406579393427eaf9bc0e094dcd3c66d1e1b93ee9db4e7686d0a72ea5d7c0ce5" "miniconda" verify_py310
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,25 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py37_22.11.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-Linux-aarch64.sh#ebba2f7e33ce5594c50e6422477106e6bb327310838fbac3db89d2eaebcde943" "miniconda" verify_py37
;;
"Linux-ppc64le" )
install_script "Miniconda3-py37_22.11.1-1-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-Linux-ppc64le.sh#dda16ae14992697e3c90b56fe9de819f5f3b1dcb3ac7a31d24ab5736ccd5f129" "miniconda" verify_py37
;;
"Linux-s390x" )
install_script "Miniconda3-py37_22.11.1-1-Linux-s390x" "https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-Linux-s390x.sh#3c71628865164c3f8b461f8e4b2a353ff1367eed61c83b9c3e14fc201608b1a7" "miniconda" verify_py37
;;
"Linux-x86_64" )
install_script "Miniconda3-py37_22.11.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-Linux-x86_64.sh#22b14d52265b4e609c6ce78e2f2884b277d976b83b5f9c8a83423e3eba2ccfbe" "miniconda" verify_py37
;;
"MacOSX-x86_64" )
install_script "Miniconda3-py37_22.11.1-1-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-MacOSX-x86_64.sh#e51d459aae45bb6b86c2716738b778b788785e6e1ea4b2ed244a0fdd754feb19" "miniconda" verify_py37
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,28 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py38_22.11.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-aarch64.sh#ff65684bce7a7ad7abb698ff649195816ee0f47a4f17cb9632a44abf69357ea5" "miniconda" verify_py38
;;
"Linux-ppc64le" )
install_script "Miniconda3-py38_22.11.1-1-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-ppc64le.sh#59fd0901f9fa1ba6b07e734adff4d6c5215e9d7f13ad37f0044af22e9b72194a" "miniconda" verify_py38
;;
"Linux-s390x" )
install_script "Miniconda3-py38_22.11.1-1-Linux-s390x" "https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-s390x.sh#5bdc6ead307c098b32ba8473b7cbbe87eb80f8eca9adba03f47848bcb34a9b38" "miniconda" verify_py38
;;
"Linux-x86_64" )
install_script "Miniconda3-py38_22.11.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-x86_64.sh#473e5ecc8e078e9ef89355fbca21f8eefa5f9081544befca99867c7beac3150d" "miniconda" verify_py38
;;
"MacOSX-arm64" )
install_script "Miniconda3-py38_22.11.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-MacOSX-arm64.sh#bf75dbf193db6895c62b2bb963cab2534a8bbdf0ac956f270da8d7a19f4d1b54" "miniconda" verify_py38
;;
"MacOSX-x86_64" )
install_script "Miniconda3-py38_22.11.1-1-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-MacOSX-x86_64.sh#6c4cea3c355326f503d15ae97e5126437529a595499e3ce304cd0f247e935da8" "miniconda" verify_py38
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,28 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniconda3-py39_22.11.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-Linux-aarch64.sh#031b6c52060bb75e930846c0a66baa91db8196f0d97fd32f3822c54db6b7c76a" "miniconda" verify_py39
;;
"Linux-ppc64le" )
install_script "Miniconda3-py39_22.11.1-1-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-Linux-ppc64le.sh#16cc2d74644cf838d2761723c01172e0b704674317630480902ef429af29bd0b" "miniconda" verify_py39
;;
"Linux-s390x" )
install_script "Miniconda3-py39_22.11.1-1-Linux-s390x" "https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-Linux-s390x.sh#ed6176aa6b52e22d939ea5c0c38f9f3cf52d2519a5d0dcb414936287893a31f9" "miniconda" verify_py39
;;
"Linux-x86_64" )
install_script "Miniconda3-py39_22.11.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-Linux-x86_64.sh#e685005710679914a909bfb9c52183b3ccc56ad7bb84acc861d596fcbe5d28bb" "miniconda" verify_py39
;;
"MacOSX-arm64" )
install_script "Miniconda3-py39_22.11.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-MacOSX-arm64.sh#eca5e241faea19d4b352aba819f99f42e2336fdbeecb04f5bc89c9ca786ea798" "miniconda" verify_py39
;;
"MacOSX-x86_64" )
install_script "Miniconda3-py39_22.11.1-1-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_22.11.1-1-MacOSX-x86_64.sh#9a537f3a1b472098754c59a30b94822f1e9458405af831172aaa8f8124e9df88" "miniconda" verify_py39
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,25 @@
case "$(anaconda_architecture 2>/dev/null || true)" in
"Linux-aarch64" )
install_script "Miniforge3-22.9.0-2-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Miniforge3-22.9.0-2-Linux-aarch64.sh#3d75758c4d98181946b29d391323209752c5a111530738b5e36eba77e8e026aa" "miniconda" verify_py310
;;
"Linux-ppc64le" )
install_script "Miniforge3-22.9.0-2-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Miniforge3-22.9.0-2-Linux-ppc64le.sh#e84ffc9f018d5b23601106f299fefd25a75afb6fdd3416037ce4b561781156fc" "miniconda" verify_py310
;;
"Linux-x86_64" )
install_script "Miniforge3-22.9.0-2-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Miniforge3-22.9.0-2-Linux-x86_64.sh#180aefcbcf8a9f24123adb9e64e16c9bb16bc3f129bd79a5912ff44f295cc405" "miniconda" verify_py310
;;
"MacOSX-arm64" )
install_script "Miniforge3-22.9.0-2-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Miniforge3-22.9.0-2-MacOSX-arm64.sh#6ac610dabf9a64574ec83b158b2eb6023bc3de0de9a0c528d4fa876df2a27d13" "miniconda" verify_py310
;;
"MacOSX-x86_64" )
install_script "Miniforge3-22.9.0-2-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/22.9.0-2/Miniforge3-22.9.0-2-MacOSX-x86_64.sh#d7f50abd340f63515b2059ed462548f5d395e2f9d7847a98c5428998504f5bff" "miniconda" verify_py310
;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View File

@@ -0,0 +1,12 @@
diff --git a/test/v3ext.c b/test/v3ext.c
index 7a240cd706..6cec6f1a9b 100644
--- a/test/v3ext.c
+++ b/test/v3ext.c
@@ -15,6 +15,7 @@
#include <openssl/err.h>
#include "internal/nelem.h"
+#include <string.h>
#include "testutil.h"
static const char *infile;

View File

@@ -0,0 +1,12 @@
diff --git a/test/v3ext.c b/test/v3ext.c
index 7a240cd706..6cec6f1a9b 100644
--- a/test/v3ext.c
+++ b/test/v3ext.c
@@ -15,6 +15,7 @@
#include <openssl/err.h>
#include "internal/nelem.h"
+#include <string.h>
#include "testutil.h"
static const char *infile;

View File

@@ -0,0 +1,12 @@
diff --git a/test/v3ext.c b/test/v3ext.c
index 7a240cd706..6cec6f1a9b 100644
--- a/test/v3ext.c
+++ b/test/v3ext.c
@@ -15,6 +15,7 @@
#include <openssl/err.h>
#include "internal/nelem.h"
+#include <string.h>
#include "testutil.h"
static const char *infile;

View File

@@ -0,0 +1,12 @@
diff --git a/test/v3ext.c b/test/v3ext.c
index 7a240cd706..6cec6f1a9b 100644
--- a/test/v3ext.c
+++ b/test/v3ext.c
@@ -15,6 +15,7 @@
#include <openssl/err.h>
#include "internal/nelem.h"
+#include <string.h>
#include "testutil.h"
static const char *infile;

View File

@@ -0,0 +1,81 @@
VERSION='7.3.10'
PYVER='2.7'
# https://www.pypy.org/checksums.html
aarch64_hash=274342f0e75e99d60ba7a0cfb0e13792e7664163e01450d2f7f2f7825603a0ae
linux32_hash=0b17132f62d2a0c3c4572c57eb53820f25611afad71f3d6a310202942baed6e1
linux64_hash=461fb6df524208af9e94ffb16989f628b585bdb4b9e97d81e668899fc3a064a3
osarm64_hash=14b178f005603e3df6db7574b77b9c65ae79feda1a629214cafcb4eee7da679d
osx64_hash=188551185ee945d5e42a3a619205d02ac31db77bdd5d98b6c11469e125c3bdb5
s390x_hash=0fac1ec1e05c70941f758be05d40ce7ffe6a42c0416e70b55d40a7523e3e70ae
### 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
;;
's390x' )
hash="${s390x_hash}"
;;
* )
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'

View File

@@ -0,0 +1,14 @@
VERSION='7.3.10'
PYVER='2.7'
# https://www.pypy.org/checksums.html
hash=35e2cf4519cb51c4d5ffb4493ee24f0c7f42b4b04944903ca4b33981a04a3bc5
### 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'

View File

@@ -0,0 +1,81 @@
VERSION='7.3.11'
PYVER='2.7'
# https://www.pypy.org/checksums.html
aarch64_hash=ea924da1defe9325ef760e288b04f984614e405580f5321eb6a5c8f539bd415a
linux32_hash=30fd245fab7068c96a75b9ff1323ac55174c64fc8c4751cceb4b7a9bedc1851e
linux64_hash=ba8ed958a905c0735a4cfff2875c25089954dc020e087d982b0ffa5b9da316cd
osarm64_hash=cc5696ab4f93cd3481c1e4990b5dedd7ba60ac0602fa1890d368889a6c5bf771
osx64_hash=56deee9c22640f5686c35b9d64fdb1ce3abd044583e4078f0b171ca2fd2a198e
s390x_hash=8fe9481c473178e53266983678684a70fe0c42bafc95f1807bf3ef28770316d4
### 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
;;
's390x' )
hash="${s390x_hash}"
;;
* )
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'

View File

@@ -0,0 +1,14 @@
VERSION='7.3.11'
PYVER='2.7'
# https://www.pypy.org/checksums.html
hash=1117afb66831da4ea6f39d8d2084787a74689fd0229de0be301f9ed9b255093c
### 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'

View File

@@ -11,29 +11,38 @@ win64_hash=ca7b0f4c576995b388cfb4c796e3f6f20b037e5314571bf267daa068a3a2af31
### end of manual settings - following lines same for every download ### end of manual settings - following lines same for every download
function pypy_pkg_data { function err_no_binary {
# pypy architecture local archmsg="${1}"
local ARCH="${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
}
local basesrc="pypy${PYVER}-${VERSION}-src" function pypy_pkg_data {
local basever="pypy${PYVER}-v${VERSION}" # pypy architecture tag
local baseurl="https://downloads.python.org/pypy/${basever}" local ARCH="${1}"
# defaults # defaults
local cmd='install_package' # use bz2 local cmd='install_package' # use bz2
local pkg="${ARCH}" # assume matches local pkg="${ARCH}" # assume matches
local url="${baseurl}-${pkg}.tar.bz2" # use bz2 local ext='tar.bz2' # windows is always diff...
local hash='' # undefined local hash='' # undefined
case "${pkg}" in # select the hash, fix pkg if not match ARCH, windows has ext of zip
case "${ARCH}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url pkg='aarch64'
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
pkg='linux32' # package name revised pkg='linux32'
url="${baseurl}-${pkg}.tar.bz2" # new url
;; ;;
'linux64' ) 'linux64' )
hash="${linux64_hash}" hash="${linux64_hash}"
@@ -42,13 +51,7 @@ function pypy_pkg_data {
if require_osx_version "10.13"; then if require_osx_version "10.13"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo err_no_binary "${ARCH}, OS X < 10.13"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
fi fi
;; ;;
's390x' ) 's390x' )
@@ -57,21 +60,18 @@ function pypy_pkg_data {
'win64' ) 'win64' )
hash="${win64_hash}" hash="${win64_hash}"
cmd='install_zip' # diff command cmd='install_zip' # diff command
url="${baseurl}-${pkg}.zip" # zip rather than bz2 ext='zip' # zip rather than bz2
;; ;;
* ) * )
{ echo err_no_binary "${ARCH}"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
;; ;;
esac esac
local basever="pypy${PYVER}-v${VERSION}"
local baseurl="https://downloads.python.org/pypy/${basever}"
# result - command, package dir, url+hash # result - command, package dir, url+hash
echo "${cmd}" "${basever}-${pkg}" "${url}#${hash}" echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
} }
# determine command, package directory, url+hash # determine command, package directory, url+hash

View File

@@ -11,29 +11,38 @@ win64_hash=8acb184b48fb3c854de0662e4d23a66b90e73b1ab73a86695022c12c745d8b00
### end of manual settings - following lines same for every download ### end of manual settings - following lines same for every download
function pypy_pkg_data { function err_no_binary {
# pypy architecture local archmsg="${1}"
local ARCH="${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
}
local basesrc="pypy${PYVER}-${VERSION}-src" function pypy_pkg_data {
local basever="pypy${PYVER}-v${VERSION}" # pypy architecture tag
local baseurl="https://downloads.python.org/pypy/${basever}" local ARCH="${1}"
# defaults # defaults
local cmd='install_package' # use bz2 local cmd='install_package' # use bz2
local pkg="${ARCH}" # assume matches local pkg="${ARCH}" # assume matches
local url="${baseurl}-${pkg}.tar.bz2" # use bz2 local ext='tar.bz2' # windows is always diff...
local hash='' # undefined local hash='' # undefined
case "${pkg}" in # select the hash, fix pkg if not match ARCH, windows has ext of zip
case "${ARCH}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url pkg='aarch64'
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
pkg='linux32' # package name revised pkg='linux32'
url="${baseurl}-${pkg}.tar.bz2" # new url
;; ;;
'linux64' ) 'linux64' )
hash="${linux64_hash}" hash="${linux64_hash}"
@@ -42,13 +51,7 @@ function pypy_pkg_data {
if require_osx_version "10.13"; then if require_osx_version "10.13"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo err_no_binary "${ARCH}, OS X < 10.13"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
fi fi
;; ;;
's390x' ) 's390x' )
@@ -57,21 +60,18 @@ function pypy_pkg_data {
'win64' ) 'win64' )
hash="${win64_hash}" hash="${win64_hash}"
cmd='install_zip' # diff command cmd='install_zip' # diff command
url="${baseurl}-${pkg}.zip" # zip rather than bz2 ext='zip' # zip rather than bz2
;; ;;
* ) * )
{ echo err_no_binary "${ARCH}"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
;; ;;
esac esac
local basever="pypy${PYVER}-v${VERSION}"
local baseurl="https://downloads.python.org/pypy/${basever}"
# result - command, package dir, url+hash # result - command, package dir, url+hash
echo "${cmd}" "${basever}-${pkg}" "${url}#${hash}" echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
} }
# determine command, package directory, url+hash # determine command, package directory, url+hash

View File

@@ -0,0 +1,81 @@
VERSION='7.3.10'
PYVER='3.8'
# https://www.pypy.org/checksums.html
aarch64_hash=e4caa1a545f22cfee87d5b9aa6f8852347f223643ad7d2562e0b2a2f4663ad98
linux32_hash=b70ed7fdc73a74ebdc04f07439f7bad1a849aaca95e26b4a74049d0e483f071c
linux64_hash=ceef6496fd4ab1c99e3ec22ce657b8f10f8bb77a32427fadfb5e1dd943806011
osarm64_hash=6cb1429371e4854b718148a509d80143f801e3abfc72fef58d88aeeee1e98f9e
osx64_hash=399eb1ce4c65f62f6a096b7c273536601b7695e3c0dc0457393a659b95b7615b
s390x_hash=c294f8e815158388628fe77ac5b8ad6cd93c8db1359091fa02d41cf6da4d61a1
### 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
;;
's390x' )
hash="${s390x_hash}"
;;
* )
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'

View File

@@ -0,0 +1,14 @@
VERSION='7.3.10'
PYVER='3.8'
# https://www.pypy.org/checksums.html
hash=218a1e062f17aba89f61bc398e8498f13c048b9fcf294343f5d9d56c3ac9b882
### 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'

View File

@@ -0,0 +1,81 @@
VERSION='7.3.11'
PYVER='3.8'
# https://www.pypy.org/checksums.html
aarch64_hash=9a2fa0b8d92b7830aa31774a9a76129b0ff81afbd22cd5c41fbdd9119e859f55
linux32_hash=a79b31fce8f5bc1f9940b6777134189a1d3d18bda4b1c830384cda90077c9176
linux64_hash=470330e58ac105c094041aa07bb05676b06292bc61409e26f5c5593ebb2292d9
osarm64_hash=78cdc79ff964c4bfd13eb45a7d43a011cbe8d8b513323d204891f703fdc4fa1a
osx64_hash=194ca0b4d91ae409a9cb1a59eb7572d7affa8a451ea3daf26539aa515443433a
s390x_hash=eab7734d86d96549866f1cba67f4f9c73c989f6a802248beebc504080d4c3fcd
### 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
;;
's390x' )
hash="${s390x_hash}"
;;
* )
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'

View File

@@ -0,0 +1,14 @@
VERSION='7.3.11'
PYVER='3.8'
# https://www.pypy.org/checksums.html
hash=4d6769bfca73734e8666fd70503b7ceb06a6e259110e617331bb3899ca4e6058
### 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'

View File

@@ -11,29 +11,38 @@ win64_hash=05022baaa55db2b60880f2422312d9e4025e1267303ac57f33e8253559d0be88
### end of manual settings - following lines same for every download ### end of manual settings - following lines same for every download
function pypy_pkg_data { function err_no_binary {
# pypy architecture local archmsg="${1}"
local ARCH="${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
}
local basesrc="pypy${PYVER}-${VERSION}-src" function pypy_pkg_data {
local basever="pypy${PYVER}-v${VERSION}" # pypy architecture tag
local baseurl="https://downloads.python.org/pypy/${basever}" local ARCH="${1}"
# defaults # defaults
local cmd='install_package' # use bz2 local cmd='install_package' # use bz2
local pkg="${ARCH}" # assume matches local pkg="${ARCH}" # assume matches
local url="${baseurl}-${pkg}.tar.bz2" # use bz2 local ext='tar.bz2' # windows is always diff...
local hash='' # undefined local hash='' # undefined
case "${pkg}" in # select the hash, fix pkg if not match ARCH, windows has ext of zip
case "${ARCH}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url pkg='aarch64'
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
pkg='linux32' # package name revised pkg='linux32'
url="${baseurl}-${pkg}.tar.bz2" # new url
;; ;;
'linux64' ) 'linux64' )
hash="${linux64_hash}" hash="${linux64_hash}"
@@ -42,13 +51,7 @@ function pypy_pkg_data {
if require_osx_version "10.13"; then if require_osx_version "10.13"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo err_no_binary "${ARCH}, OS X < 10.13"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
fi fi
;; ;;
's390x' ) 's390x' )
@@ -57,21 +60,18 @@ function pypy_pkg_data {
'win64' ) 'win64' )
hash="${win64_hash}" hash="${win64_hash}"
cmd='install_zip' # diff command cmd='install_zip' # diff command
url="${baseurl}-${pkg}.zip" # zip rather than bz2 ext='zip' # zip rather than bz2
;; ;;
* ) * )
{ echo err_no_binary "${ARCH}"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
;; ;;
esac esac
local basever="pypy${PYVER}-v${VERSION}"
local baseurl="https://downloads.python.org/pypy/${basever}"
# result - command, package dir, url+hash # result - command, package dir, url+hash
echo "${cmd}" "${basever}-${pkg}" "${url}#${hash}" echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
} }
# determine command, package directory, url+hash # determine command, package directory, url+hash

View File

@@ -0,0 +1,81 @@
VERSION='7.3.10'
PYVER='3.9'
# https://www.pypy.org/checksums.html
aarch64_hash=657a04fd9a5a992a2f116a9e7e9132ea0c578721f59139c9fb2083775f71e514
linux32_hash=b6db59613b9a1c0c1ab87bc103f52ee95193423882dc8a848b68850b8ba59cc5
linux64_hash=95cf99406179460d63ddbfe1ec870f889d05f7767ce81cef14b88a3a9e127266
osarm64_hash=e2a6bec7408e6497c7de8165aa4a1b15e2416aec4a72f2578f793fb06859ccba
osx64_hash=f90c8619b41e68ec9ffd7d5e913fe02e60843da43d3735b1c1bc75bcfe638d97
s390x_hash=ca6525a540cf0c682d1592ae35d3fbc97559a97260e4b789255cc76dde7a14f0
### 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
;;
's390x' )
hash="${s390x_hash}"
;;
* )
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'

View File

@@ -0,0 +1,14 @@
VERSION='7.3.10'
PYVER='3.9'
# https://www.pypy.org/checksums.html
hash=3738d32575ed2513e3e66878e4e4c6c208caed267570f3f9f814748830002967
### 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'

View File

@@ -0,0 +1,81 @@
VERSION='7.3.11'
PYVER='3.9'
# https://www.pypy.org/checksums.html
aarch64_hash=09175dc652ed895d98e9ad63d216812bf3ee7e398d900a9bf9eb2906ba8302b9
linux32_hash=0099d72c2897b229057bff7e2c343624aeabdc60d6fb43ca882bff082f1ffa48
linux64_hash=d506172ca11071274175d74e9c581c3166432d0179b036470e3b9e8d20eae581
osarm64_hash=91ad7500f1a39531dbefa0b345a3dcff927ff9971654e8d2e9ef7c5ae311f57e
osx64_hash=d33f40b207099872585afd71873575ca6ea638a27d823bc621238c5ae82542ed
s390x_hash=e1f30f2ddbe3f446ddacd79677b958d56c07463b20171fb2abf8f9a3178b79fc
### 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
;;
's390x' )
hash="${s390x_hash}"
;;
* )
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'

View File

@@ -0,0 +1,14 @@
VERSION='7.3.11'
PYVER='3.9'
# https://www.pypy.org/checksums.html
hash=b0f3166fb2a5aadfd5ceb9db5cdd5f7929a0eccca02b4a26c0dae0492f7ca8ea
### 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'

View File

@@ -11,29 +11,38 @@ win64_hash=be48ab42f95c402543a7042c999c9433b17e55477c847612c8733a583ca6dff5
### end of manual settings - following lines same for every download ### end of manual settings - following lines same for every download
function pypy_pkg_data { function err_no_binary {
# pypy architecture local archmsg="${1}"
local ARCH="${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
}
local basesrc="pypy${PYVER}-${VERSION}-src" function pypy_pkg_data {
local basever="pypy${PYVER}-v${VERSION}" # pypy architecture tag
local baseurl="https://downloads.python.org/pypy/${basever}" local ARCH="${1}"
# defaults # defaults
local cmd='install_package' # use bz2 local cmd='install_package' # use bz2
local pkg="${ARCH}" # assume matches local pkg="${ARCH}" # assume matches
local url="${baseurl}-${pkg}.tar.bz2" # use bz2 local ext='tar.bz2' # windows is always diff...
local hash='' # undefined local hash='' # undefined
case "${pkg}" in # select the hash, fix pkg if not match ARCH, windows has ext of zip
case "${ARCH}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url pkg='aarch64'
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
pkg='linux32' # package name revised pkg='linux32'
url="${baseurl}-${pkg}.tar.bz2" # new url
;; ;;
'linux64' ) 'linux64' )
hash="${linux64_hash}" hash="${linux64_hash}"
@@ -42,13 +51,7 @@ function pypy_pkg_data {
if require_osx_version "10.13"; then if require_osx_version "10.13"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo err_no_binary "${ARCH}, OS X < 10.13"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
fi fi
;; ;;
's390x' ) 's390x' )
@@ -57,21 +60,18 @@ function pypy_pkg_data {
'win64' ) 'win64' )
hash="${win64_hash}" hash="${win64_hash}"
cmd='install_zip' # diff command cmd='install_zip' # diff command
url="${baseurl}-${pkg}.zip" # zip rather than bz2 ext='zip' # zip rather than bz2
;; ;;
* ) * )
{ echo err_no_binary "${ARCH}"
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo "try '${basesrc}' to build from source."
echo
} >&2
exit 1
;; ;;
esac esac
local basever="pypy${PYVER}-v${VERSION}"
local baseurl="https://downloads.python.org/pypy/${basever}"
# result - command, package dir, url+hash # result - command, package dir, url+hash
echo "${cmd}" "${basever}-${pkg}" "${url}#${hash}" echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
} }
# determine command, package directory, url+hash # determine command, package directory, url+hash

View File

@@ -62,7 +62,7 @@ assert_build_log() {
cached_tarball "yaml-0.1.6" cached_tarball "yaml-0.1.6"
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Linux'; done for i in {1..10}; do stub uname '-s : echo Linux'; done
stub brew false stub brew false
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -74,12 +74,12 @@ assert_build_log() {
unstub make unstub make
assert_build_log <<OUT assert_build_log <<OUT
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
yaml-0.1.6: --prefix=$INSTALL_ROOT yaml-0.1.6: --prefix=$INSTALL_ROOT
make -j 2 make -j 2
make install make install
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -89,7 +89,7 @@ OUT
cached_tarball "yaml-0.1.6" cached_tarball "yaml-0.1.6"
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Linux'; done for i in {1..10}; do stub uname '-s : echo Linux'; done
stub brew false stub brew false
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -103,13 +103,13 @@ OUT
unstub patch unstub patch
assert_build_log <<OUT assert_build_log <<OUT
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
yaml-0.1.6: --prefix=$INSTALL_ROOT yaml-0.1.6: --prefix=$INSTALL_ROOT
make -j 2 make -j 2
make install make install
patch -p0 --force -i $TMP/python-patch.XXX patch -p0 --force -i $TMP/python-patch.XXX
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -119,7 +119,7 @@ OUT
cached_tarball "yaml-0.1.6" cached_tarball "yaml-0.1.6"
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Linux'; done for i in {1..10}; do stub uname '-s : echo Linux'; done
stub brew false stub brew false
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -133,13 +133,13 @@ OUT
unstub patch unstub patch
assert_build_log <<OUT assert_build_log <<OUT
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
yaml-0.1.6: --prefix=$INSTALL_ROOT yaml-0.1.6: --prefix=$INSTALL_ROOT
make -j 2 make -j 2
make install make install
patch -p1 --force -i $TMP/python-patch.XXX patch -p1 --force -i $TMP/python-patch.XXX
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -151,7 +151,7 @@ OUT
BREW_PREFIX="$TMP/homebrew-prefix" BREW_PREFIX="$TMP/homebrew-prefix"
mkdir -p "$BREW_PREFIX" mkdir -p "$BREW_PREFIX"
for i in {1..8}; do stub uname '-s : echo Darwin'; done for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew "--prefix : echo '$BREW_PREFIX'" false stub brew "--prefix : echo '$BREW_PREFIX'" false
stub_make_install stub_make_install
@@ -167,7 +167,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${TMP}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${TMP}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -179,7 +179,7 @@ OUT
brew_libdir="$TMP/homebrew-yaml" brew_libdir="$TMP/homebrew-yaml"
mkdir -p "$brew_libdir" mkdir -p "$brew_libdir"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew "--prefix libyaml : echo '$brew_libdir'" stub brew "--prefix libyaml : echo '$brew_libdir'"
for i in {1..4}; do stub brew false; done for i in {1..4}; do stub brew false; done
@@ -195,7 +195,7 @@ OUT
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I$brew_libdir/include -I${TMP}/install/include " LDFLAGS="-L$brew_libdir/lib -L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I$brew_libdir/include -I${TMP}/install/include " LDFLAGS="-L$brew_libdir/lib -L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -205,7 +205,7 @@ OUT
cached_tarball "yaml-0.1.6" cached_tarball "yaml-0.1.6"
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Linux'; done for i in {1..10}; do stub uname '-s : echo Linux'; done
stub brew true; brew stub brew true; brew
stub_make_install stub_make_install
stub_make_install stub_make_install
@@ -218,12 +218,12 @@ OUT
unstub make unstub make
assert_build_log <<OUT assert_build_log <<OUT
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
yaml-0.1.6: --prefix=${TMP}/install yaml-0.1.6: --prefix=${TMP}/install
make -j 2 make -j 2
make install make install
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -234,7 +234,7 @@ OUT
readline_libdir="$TMP/homebrew-readline" readline_libdir="$TMP/homebrew-readline"
mkdir -p "$readline_libdir" mkdir -p "$readline_libdir"
for i in {1..7}; do stub uname '-s : echo Darwin'; done for i in {1..8}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..2}; do stub brew false; done for i in {1..2}; do stub brew false; done
stub brew "--prefix readline : echo '$readline_libdir'" stub brew "--prefix readline : echo '$readline_libdir'"
@@ -253,7 +253,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I$readline_libdir/include -I${TMP}/install/include " LDFLAGS="-L$readline_libdir/lib -L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I$readline_libdir/include -I${TMP}/install/include " LDFLAGS="-L$readline_libdir/lib -L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -262,7 +262,7 @@ OUT
@test "no library searches performed during normal operation touch homebrew in non-MacOS" { @test "no library searches performed during normal operation touch homebrew in non-MacOS" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..8}; do stub uname '-s : echo Linux'; done for i in {1..9}; do stub uname '-s : echo Linux'; done
stub brew true; brew stub brew true; brew
stub_make_install stub_make_install
@@ -276,8 +276,8 @@ DEF
unstub make unstub make
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -286,7 +286,7 @@ OUT
@test "no library searches performed during normal operation touch homebrew if envvar is set" { @test "no library searches performed during normal operation touch homebrew if envvar is set" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..4}; do stub uname '-s : echo Darwin'; done for i in {1..5}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew true; brew stub brew true; brew
stub_make_install stub_make_install
@@ -303,7 +303,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -317,7 +317,7 @@ OUT
mkdir -p "$readline_libdir/include/readline" mkdir -p "$readline_libdir/include/readline"
touch "$readline_libdir/include/readline/rlconf.h" touch "$readline_libdir/include/readline/rlconf.h"
for i in {1..7}; do stub uname '-s : echo Darwin'; done for i in {1..8}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..3}; do stub brew false; done for i in {1..3}; do stub brew false; done
@@ -336,7 +336,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -349,7 +349,7 @@ OUT
mkdir -p "$tcl_tk_libdir/lib" mkdir -p "$tcl_tk_libdir/lib"
echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh" echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
stub brew false stub brew false
@@ -370,7 +370,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="${TMP}/homebrew-tcl-tk/lib/pkgconfig" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="${TMP}/homebrew-tcl-tk/lib/pkgconfig"
Python-3.6.2: --prefix=${TMP}/install --libdir=${TMP}/install/lib --with-tcltk-libs=-L${TMP}/homebrew-tcl-tk/lib -ltcl$tcl_tk_version -ltk$tcl_tk_version --with-tcltk-includes=-I${TMP}/homebrew-tcl-tk/include Python-3.6.2: --prefix=${TMP}/install --enable-shared --libdir=${TMP}/install/lib --with-tcltk-libs=-L${TMP}/homebrew-tcl-tk/lib -ltcl$tcl_tk_version -ltk$tcl_tk_version --with-tcltk-includes=-I${TMP}/homebrew-tcl-tk/include
make -j 2 make -j 2
make install make install
OUT OUT
@@ -383,7 +383,7 @@ OUT
tcl_tk_version_long="8.6.10" tcl_tk_version_long="8.6.10"
tcl_tk_version="${tcl_tk_version_long%.*}" tcl_tk_version="${tcl_tk_version_long%.*}"
for i in {1..8}; do stub uname '-s : echo Darwin'; done for i in {1..9}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..4}; do stub brew false; done for i in {1..4}; do stub brew false; done
@@ -402,7 +402,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --with-tcltk-libs=-L${TMP}/custom-tcl-tk/lib -ltcl8.6 -ltk8.6 Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib --with-tcltk-libs=-L${TMP}/custom-tcl-tk/lib -ltcl8.6 -ltk8.6
make -j 2 make -j 2
make install make install
OUT OUT
@@ -411,7 +411,7 @@ OUT
@test "tcl-tk is linked from Homebrew via pkgconfig only when envvar is set" { @test "tcl-tk is linked from Homebrew via pkgconfig only when envvar is set" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
tcl_tk_libdir="$TMP/homebrew-tcl-tk" tcl_tk_libdir="$TMP/homebrew-tcl-tk"
@@ -436,7 +436,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="${TMP}/homebrew-tcl-tk/lib/pkgconfig" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="${TMP}/homebrew-tcl-tk/lib/pkgconfig"
Python-3.6.2: --prefix=${TMP}/install --libdir=${TMP}/install/lib Python-3.6.2: --prefix=${TMP}/install --enable-shared --libdir=${TMP}/install/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -444,7 +444,7 @@ OUT
@test "number of CPU cores defaults to 2" { @test "number of CPU cores defaults to 2" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done
stub sysctl false stub sysctl false
@@ -462,7 +462,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -471,7 +471,7 @@ OUT
@test "number of CPU cores is detected on Mac" { @test "number of CPU cores is detected on Mac" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done
stub sysctl '-n hw.ncpu : echo 4' stub sysctl '-n hw.ncpu : echo 4'
@@ -490,7 +490,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 4 make -j 4
make install make install
OUT OUT
@@ -499,7 +499,7 @@ OUT
@test "number of CPU cores is detected on FreeBSD" { @test "number of CPU cores is detected on FreeBSD" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..7}; do stub uname '-s : echo FreeBSD'; done for i in {1..8}; do stub uname '-s : echo FreeBSD'; done
stub uname '-r : echo 11.0-RELEASE' stub uname '-r : echo 11.0-RELEASE'
for i in {1..2}; do stub uname '-s : echo FreeBSD'; done for i in {1..2}; do stub uname '-s : echo FreeBSD'; done
@@ -517,8 +517,8 @@ DEF
unstub make unstub make
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 1 make -j 1
make install make install
OUT OUT
@@ -527,7 +527,7 @@ OUT
@test "setting PYTHON_MAKE_INSTALL_OPTS to a multi-word string" { @test "setting PYTHON_MAKE_INSTALL_OPTS to a multi-word string" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..8}; do stub uname '-s : echo Linux'; done for i in {1..9}; do stub uname '-s : echo Linux'; done
stub_make_install stub_make_install
@@ -541,8 +541,8 @@ DEF
unstub make unstub make
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install DOGE="such wow" make install DOGE="such wow"
OUT OUT
@@ -551,7 +551,7 @@ OUT
@test "configuring with dSYM in MacOS" { @test "configuring with dSYM in MacOS" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done
for i in {1..4}; do stub brew false; done for i in {1..4}; do stub brew false; done
stub_make_install stub_make_install
@@ -569,7 +569,7 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=${TMP}/install/lib --with-dsymutil Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=${TMP}/install/lib --with-dsymutil
make -j 2 make -j 2
make install make install
OUT OUT
@@ -578,7 +578,7 @@ OUT
@test "configuring with dSYM has no effect in non-MacOS" { @test "configuring with dSYM has no effect in non-MacOS" {
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..9}; do stub uname '-s : echo Linux'; done for i in {1..10}; do stub uname '-s : echo Linux'; done
stub_make_install stub_make_install
run_inline_definition <<DEF run_inline_definition <<DEF
@@ -591,8 +591,8 @@ DEF
unstub make unstub make
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=${TMP}/install/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=${TMP}/install/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -611,7 +611,7 @@ OUT
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
stub uname "-s : echo FreeBSD" "-r : echo 9.1" stub uname "-s : echo FreeBSD" "-r : echo 9.1"
for i in {1..6}; do stub uname "-s : echo FreeBSD"; done for i in {1..7}; do stub uname "-s : echo FreeBSD"; done
stub uname "-r : echo 9.1" stub uname "-r : echo 9.1"
for i in {1..2}; do stub uname "-s : echo FreeBSD"; done for i in {1..2}; do stub uname "-s : echo FreeBSD"; done
@@ -628,7 +628,7 @@ OUT
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE" stub uname "-s : echo FreeBSD" "-r : echo 10.0-RELEASE"
for i in {1..6}; do stub uname "-s : echo FreeBSD"; done for i in {1..7}; do stub uname "-s : echo FreeBSD"; done
stub uname "-r : echo 10.0-RELEASE" stub uname "-r : echo 10.0-RELEASE"
for i in {1..2}; do stub uname "-s : echo FreeBSD"; done for i in {1..2}; do stub uname "-s : echo FreeBSD"; done
@@ -644,7 +644,7 @@ OUT
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE" stub uname "-s : echo FreeBSD" "-r : echo 11.0-RELEASE"
for i in {1..6}; do stub uname "-s : echo FreeBSD"; done for i in {1..7}; do stub uname "-s : echo FreeBSD"; done
stub uname "-r : echo 11.0-RELEASE" stub uname "-r : echo 11.0-RELEASE"
for i in {1..2}; do stub uname "-s : echo FreeBSD"; done for i in {1..2}; do stub uname "-s : echo FreeBSD"; done
@@ -665,7 +665,7 @@ apply -p1 -i /my/patch.diff
exec ./configure "\$@" exec ./configure "\$@"
CONF CONF
for i in {1..8}; do stub uname '-s : echo Linux'; done for i in {1..9}; do stub uname '-s : echo Linux'; done
stub apply 'echo apply "$@" >> build.log' stub apply 'echo apply "$@" >> build.log'
stub_make_install stub_make_install
@@ -681,8 +681,8 @@ DEF
assert_build_log <<OUT assert_build_log <<OUT
apply -p1 -i /my/patch.diff apply -p1 -i /my/patch.diff
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " PKG_CONFIG_PATH="" Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib " PKG_CONFIG_PATH=""
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT

View File

@@ -45,7 +45,7 @@ DEF
assert_success assert_success
assert_output <<OUT assert_output <<OUT
CC=${TMP}/bin/gcc CC=${TMP}/bin/gcc
MACOSX_DEPLOYMENT_TARGET=10.9 MACOSX_DEPLOYMENT_TARGET=10.10
OUT OUT
} }
@@ -63,7 +63,7 @@ DEF
mkdir -p "$INSTALL_ROOT" mkdir -p "$INSTALL_ROOT"
cd "$INSTALL_ROOT" cd "$INSTALL_ROOT"
for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..10}; do stub uname '-s : echo Darwin'; done
for i in {1..3}; do stub sw_vers '-productVersion : echo 10.10'; done for i in {1..3}; do stub sw_vers '-productVersion : echo 10.10'; done
stub cc 'false' stub cc 'false'
@@ -90,7 +90,7 @@ DEF
unstub sw_vers unstub sw_vers
assert_output <<OUT assert_output <<OUT
./configure --prefix=$INSTALL_ROOT --libdir=${TMP}/install/lib ./configure --prefix=$INSTALL_ROOT --enable-shared --libdir=${TMP}/install/lib
CC=clang CC=clang
CFLAGS=no CFLAGS=no
make -j 2 make -j 2

View File

@@ -24,6 +24,26 @@ stub_python_build() {
unstub pyenv-rehash unstub pyenv-rehash
} }
@test "install proper multi versions" {
#stub python-build "--lib : $BATS_TEST_DIRNAME/../bin/python-build --lib" 'echo python-build "$@"' 'echo python-build "$@"'
#stub pyenv-latest ": false" ": false"
stub_python_build 'echo python-build "$@"' 'echo python-build "$@"'
stub pyenv-latest ": false"
stub pyenv-rehash 'true'
run pyenv-install 3.4.1 3.4.2
assert_success
assert_output <<OUT
python-build 3.4.1 ${TMP}/pyenv/versions/3.4.1
python-build 3.4.2 ${TMP}/pyenv/versions/3.4.2
OUT
unstub python-build
unstub pyenv-latest
unstub pyenv-hooks
unstub pyenv-rehash
}
@test "install resolves a prefix" { @test "install resolves a prefix" {
stub_python_build 'echo python-build "$@"' stub_python_build 'echo python-build "$@"'
stub pyenv-latest '-q -k 3.4 : echo 3.4.2' stub pyenv-latest '-q -k 3.4 : echo 3.4.2'
@@ -37,6 +57,24 @@ stub_python_build() {
unstub pyenv-rehash unstub pyenv-rehash
} }
@test "install resolves a prefix with multi versions" {
stub_python_build 'echo python-build "$@"' 'echo python-build "$@"'
stub pyenv-latest '-q -k 3.4 : echo 3.4.2' '-q -k 3.5 : echo 3.5.2'
stub pyenv-rehash 'true'
pyenv-latest || true # pass through the stub entry added by stub_python_build
run pyenv-install 3.4 3.5
assert_success <<OUT
python-build 3.4.2 ${PYENV_ROOT}/versions/3.4.2
python-build 3.5.2 ${PYENV_ROOT}/versions/3.5.2
OUT
unstub python-build
unstub pyenv-hooks
unstub pyenv-rehash
}
@test "install pyenv local version by default" { @test "install pyenv local version by default" {
stub_python_build 'echo python-build "$1"' stub_python_build 'echo python-build "$1"'
stub pyenv-local 'echo 3.4.2' stub pyenv-local 'echo 3.4.2'
@@ -48,6 +86,21 @@ stub_python_build() {
unstub pyenv-local unstub pyenv-local
} }
@test "install pyenv local multi versions by default" {
stub_python_build 'echo python-build "$1"' 'echo python-build "$1"'
stub pyenv-local 'printf "%s\n%s\n" 3.4.2 3.4.1'
stub pyenv-latest ": false"
run pyenv-install
assert_success <<OUT
python-build 3.4.2"
python-build 3.4.1"
OUT
unstub python-build
unstub pyenv-local
}
@test "list available versions" { @test "list available versions" {
stub_python_build \ stub_python_build \
"--definitions : echo 2.6.9 2.7.9-rc1 2.7.9-rc2 3.4.2 | tr ' ' $'\\n'" "--definitions : echo 2.6.9 2.7.9-rc1 2.7.9-rc2 3.4.2 | tr ' ' $'\\n'"
@@ -169,22 +222,23 @@ ${PYENV_ROOT}/plugins/foo/share/python-build
OUT OUT
} }
@test "not enough arguments for pyenv-install" { @test "not enough arguments for pyenv-install if no local version" {
stub_python_build stub_python_build
stub pyenv-help 'install : true' stub pyenv-help 'install : true'
run pyenv-install run pyenv-install
assert_failure assert_failure
unstub pyenv-help unstub pyenv-help
assert_output ""
} }
@test "too many arguments for pyenv-install" { @test "multi arguments for pyenv-install" {
stub_python_build stub_python_build
stub pyenv-help 'install : true' stub pyenv-help 'install : true'
run pyenv-install 3.4.1 3.4.2 run pyenv-install 3.4.1 3.4.2
assert_failure assert_success
unstub pyenv-help assert_output ""
} }
@test "show help for pyenv-install" { @test "show help for pyenv-install" {

View File

@@ -123,8 +123,8 @@ run_inline_definition_with_name() {
assert_build_log <<OUT assert_build_log <<OUT
patch -p0 --force -i $TMP/python-patch.XXX patch -p0 --force -i $TMP/python-patch.XXX
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib "
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -153,8 +153,8 @@ OUT
patch: bar patch: bar
patch: baz patch: baz
patch: foo patch: foo
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib "
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -178,7 +178,7 @@ OUT
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make altinstall make altinstall
OUT OUT
@@ -280,7 +280,7 @@ echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
OUT OUT
assert_success assert_success
assert_output <<EOS assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-universalsdk=/) PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${TMP}/install/lib --enable-universalsdk=/)
EOS EOS
} }
@@ -294,7 +294,7 @@ echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
OUT OUT
assert_success assert_success
assert_output <<EOS assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-universalsdk=/ --with-universal-archs=universal2) PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${TMP}/install/lib --enable-universalsdk=/ --with-universal-archs=universal2)
EOS EOS
} }
@@ -307,7 +307,7 @@ echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
OUT OUT
assert_success assert_success
assert_output <<EOS assert_output <<EOS
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-universalsdk=/) PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${TMP}/install/lib --enable-universalsdk=/)
EOS EOS
} }
@@ -315,7 +315,7 @@ EOS
cached_tarball "Python-3.6.2" cached_tarball "Python-3.6.2"
for i in {1..4}; do stub brew false; done for i in {1..4}; do stub brew false; done
for i in {1..7}; do stub uname '-s : echo Linux'; done for i in {1..8}; do stub uname '-s : echo Linux'; done
stub "$MAKE" \ stub "$MAKE" \
" : echo \"$MAKE \$@\" >> build.log" \ " : echo \"$MAKE \$@\" >> build.log" \
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'" " : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
@@ -324,8 +324,8 @@ EOS
assert_success assert_success
assert_build_log <<OUT assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib "
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-unicode=ucs2 --libdir=$INSTALL_ROOT/lib Python-3.6.2: --prefix=$INSTALL_ROOT --enable-unicode=ucs2 --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2 make -j 2
make install make install
OUT OUT
@@ -336,10 +336,8 @@ OUT
@test "default MACOSX_DEPLOYMENT_TARGET" { @test "default MACOSX_DEPLOYMENT_TARGET" {
# yyuu/pyenv#257 # yyuu/pyenv#257
stub uname '-s : echo Darwin' for i in {1..3}; do stub uname '-s : echo Darwin'; done
for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done
stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.10'
TMPDIR="$TMP" run_inline_definition <<OUT TMPDIR="$TMP" run_inline_definition <<OUT
echo "\${MACOSX_DEPLOYMENT_TARGET}" echo "\${MACOSX_DEPLOYMENT_TARGET}"

View File

@@ -63,6 +63,12 @@ OUT
assert_line 'pyenv init - | source' assert_line 'pyenv init - | source'
} }
@test "shell detection for installer" {
run pyenv-init --detect-shell
assert_success
assert_line "PYENV_SHELL_DETECT=bash"
}
@test "option to skip rehash" { @test "option to skip rehash" {
run pyenv-init - --no-rehash run pyenv-init - --no-rehash
assert_success assert_success