mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2afd1733a4 | ||
|
|
032022dace | ||
|
|
c6ea700cdf | ||
|
|
97fd8f436d | ||
|
|
1b7d2f08fd | ||
|
|
74fea7edc6 | ||
|
|
94071a9374 | ||
|
|
7661437864 | ||
|
|
ea3a9fe895 | ||
|
|
c1c8646d75 | ||
|
|
fc28287273 | ||
|
|
8d3bba2f92 | ||
|
|
a419b003b4 | ||
|
|
1c05252dfc | ||
|
|
8087e811cd | ||
|
|
faddc0d3fe | ||
|
|
ce9d396ccc | ||
|
|
ba968fda2d | ||
|
|
8e34326347 | ||
|
|
519ce9dbf0 | ||
|
|
3e51bae343 | ||
|
|
ca551b3a55 | ||
|
|
bbe6301f01 | ||
|
|
8c3b705f04 | ||
|
|
90b1c28fa6 | ||
|
|
0052372fa3 | ||
|
|
1068875cc6 | ||
|
|
22a7c46d54 | ||
|
|
7881c26b5a | ||
|
|
4033a0a260 | ||
|
|
dee36c348d | ||
|
|
d275391f65 | ||
|
|
a7897ca0f6 | ||
|
|
92a28e531b | ||
|
|
8990110dcf | ||
|
|
68edd564cf | ||
|
|
0d987b0e4b | ||
|
|
857806e6ca | ||
|
|
85561398ea | ||
|
|
17fb66cd8b | ||
|
|
2ecd676a2a | ||
|
|
b57bdef584 | ||
|
|
cd78412b80 | ||
|
|
692ac77559 | ||
|
|
97eda4403f | ||
|
|
ab1331d3c0 | ||
|
|
7d3854b64d | ||
|
|
11c1898abb | ||
|
|
25e5989261 | ||
|
|
cd2f410f75 | ||
|
|
89b8e5f8da | ||
|
|
71a8d47b81 | ||
|
|
bc44cb8fc0 |
4
.github/workflows/macos_build.yml
vendored
4
.github/workflows/macos_build.yml
vendored
@@ -17,14 +17,14 @@ jobs:
|
||||
- "3.13"
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
# Normally, we would use the superbly maintained...
|
||||
# - uses: actions/setup-python@v2
|
||||
# with:
|
||||
# python-version: ${{ matrix.python-version }}
|
||||
# ... but in the repo, we want to test pyenv builds on macOS
|
||||
- run: |
|
||||
brew install openssl readline sqlite3 xz zlib
|
||||
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd
|
||||
# https://github.com/pyenv/pyenv#installation
|
||||
- run: pwd
|
||||
- env:
|
||||
|
||||
31
.github/workflows/modified_scripts_build.yml
vendored
31
.github/workflows/modified_scripts_build.yml
vendored
@@ -5,8 +5,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
versions: ${{steps.modified-versions.outputs.versions}}
|
||||
versions_cpython_only: ${{steps.modified-versions.outputs.versions_cpython_only}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- run: git fetch origin "$GITHUB_BASE_REF"
|
||||
- shell: bash
|
||||
run: >
|
||||
@@ -20,10 +21,10 @@ jobs:
|
||||
echo "$versions" >> $GITHUB_ENV;
|
||||
echo "$EOF" >> $GITHUB_ENV;
|
||||
|
||||
versions_cpython_only=$(grep -Ee '^[[:digit:]]' <<<"$version")
|
||||
versions_cpython_only=$(grep -Ee '^[[:digit:]]' <<<"$versions")
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64);
|
||||
echo "versions_cpython_only<<$EOF" >> $GITHUB_ENV;
|
||||
echo $versions_cpython_only >> $GITHUB_ENV;
|
||||
echo "$versions_cpython_only" >> $GITHUB_ENV;
|
||||
echo "$EOF" >> $GITHUB_ENV;
|
||||
- id: modified-versions
|
||||
run: |
|
||||
@@ -36,10 +37,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions)}}
|
||||
os: ["macos-13", "macos-14"]
|
||||
os: ["macos-14", "macos-15", "macos-15-intel"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
#envvars
|
||||
export PYENV_ROOT="$GITHUB_WORKSPACE"
|
||||
@@ -55,7 +56,8 @@ jobs:
|
||||
fi
|
||||
- run: |
|
||||
#build
|
||||
pyenv --debug install ${{ matrix.python-version }}
|
||||
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
||||
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
||||
pyenv global ${{ matrix.python-version }}
|
||||
# Micropython doesn't support --version
|
||||
- run: |
|
||||
@@ -96,10 +98,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions_cpython_only)}}
|
||||
os: ["macos-13", "macos-14"]
|
||||
os: ["macos-14", "macos-15", "macos-15-intel"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
#envvars
|
||||
export PYENV_ROOT="$GITHUB_WORKSPACE"
|
||||
@@ -116,7 +118,8 @@ jobs:
|
||||
fi
|
||||
- run: |
|
||||
#build
|
||||
pyenv --debug install ${{ matrix.python-version }}
|
||||
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
||||
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
||||
pyenv global ${{ matrix.python-version }}
|
||||
# Micropython doesn't support --version
|
||||
- run: |
|
||||
@@ -160,7 +163,7 @@ jobs:
|
||||
os: ["ubuntu-22.04", "ubuntu-24.04"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
#envvars
|
||||
export PYENV_ROOT="$GITHUB_WORKSPACE"
|
||||
@@ -179,7 +182,8 @@ jobs:
|
||||
fi
|
||||
- run: |
|
||||
#build
|
||||
pyenv install -v ${{ matrix.python-version }}
|
||||
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
||||
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
||||
pyenv global ${{ matrix.python-version }}
|
||||
# Micropython doesn't support --version
|
||||
- run: |
|
||||
@@ -218,7 +222,7 @@ jobs:
|
||||
os: ["ubuntu-latest"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- run: |
|
||||
#envvars
|
||||
export PYENV_ROOT="$GITHUB_WORKSPACE"
|
||||
@@ -238,7 +242,8 @@ jobs:
|
||||
fi
|
||||
- run: |
|
||||
#build
|
||||
pyenv install -v ${{ matrix.python-version }}
|
||||
pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$?
|
||||
if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi
|
||||
pyenv global ${{ matrix.python-version }}
|
||||
# Micropython doesn't support --version
|
||||
- run: |
|
||||
|
||||
13
.github/workflows/pyenv_tests.yml
vendored
13
.github/workflows/pyenv_tests.yml
vendored
@@ -12,11 +12,11 @@ jobs:
|
||||
os:
|
||||
- ubuntu-24.04
|
||||
- ubuntu-22.04
|
||||
- macos-15-intel
|
||||
- macos-14
|
||||
- macos-13
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
# Normally, we would use the superbly maintained...
|
||||
# - uses: actions/setup-python@v2
|
||||
# with:
|
||||
@@ -40,10 +40,15 @@ jobs:
|
||||
run: |
|
||||
echo $PYENV_ROOT
|
||||
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
||||
- run: |
|
||||
- name: Run test on the host
|
||||
run: |
|
||||
make test
|
||||
- name: Run test with docker
|
||||
if: ${{ ! contains(matrix.os, 'macos') }}
|
||||
run: |
|
||||
make test-docker
|
||||
- env:
|
||||
PYENV_NATIVE_EXT: 1
|
||||
run: |
|
||||
(cd src; ./configure; make)
|
||||
bats/bin/bats test/{pyenv,hooks,versions}.bats
|
||||
bats/bin/bats test/{pyenv,hooks,versions}.bats
|
||||
|
||||
2
.github/workflows/ubuntu_build.yml
vendored
2
.github/workflows/ubuntu_build.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
- "3.13"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
# Normally, we would use the superbly maintained...
|
||||
# - uses: actions/setup-python@v2
|
||||
# with:
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,7 +6,8 @@
|
||||
/libexec/*.dylib
|
||||
/src/Makefile
|
||||
/src/*.o
|
||||
/bats/
|
||||
/bats
|
||||
/bats-*/
|
||||
/default-packages
|
||||
.idea
|
||||
*.un~
|
||||
|
||||
32
CHANGELOG.md
32
CHANGELOG.md
@@ -1,5 +1,37 @@
|
||||
# Version History
|
||||
|
||||
## Release v2.6.12
|
||||
* Add graalpy-25.0.1 by @msimacek in https://github.com/pyenv/pyenv/pull/3350
|
||||
* Add CPython 3.9.25 by @nedbat in https://github.com/pyenv/pyenv/pull/3355
|
||||
|
||||
## Release v2.6.11
|
||||
* Support building against Homebrew Tcl/Tk 9 by @native-api in https://github.com/pyenv/pyenv/pull/3343
|
||||
* Add CPython 3.13.9 by @nedbat in https://github.com/pyenv/pyenv/pull/3346
|
||||
* Add CPython 3.15.0a1 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3347
|
||||
|
||||
## Release v2.6.10
|
||||
* Add CPython 3.12.12, 3.11.14, 3.10.19, 3.9.24 by @nedbat in https://github.com/pyenv/pyenv/pull/3344
|
||||
|
||||
## Release v2.6.9
|
||||
* CI: modified-scripts-build: fix CPython-specific jobs never firing by @tuzi3040 in https://github.com/pyenv/pyenv/pull/3338
|
||||
* CI: modified-scripts-build: fix output variable for CPython-specific workflows by @native-api in https://github.com/pyenv/pyenv/pull/3340
|
||||
* Add CPython 3.14.0 by @SnoopJ in https://github.com/pyenv/pyenv/pull/3339
|
||||
* Add CPython 3.13.8 by @jsirois in https://github.com/pyenv/pyenv/pull/3341
|
||||
|
||||
## Release v2.6.8
|
||||
* Use Zlib from XCode SDK in a way compatible with XCode 16 and CLT by @JarheadStever in https://github.com/pyenv/pyenv/pull/3301
|
||||
* Add miniforge 25.3.0-1, 25.3.0-2, 25.3.0-3, 25.3.1-0, skip miniforge 25.3.0-0 by @native-api in https://github.com/pyenv/pyenv/pull/3306
|
||||
* Fix Readline and OpenSSL detection for MacPorts without the corresponding package by @native-api in https://github.com/pyenv/pyenv/pull/3317
|
||||
* Bump actions/checkout from 4 to 5 in the github-actions group by @dependabot[bot] in https://github.com/pyenv/pyenv/pull/3318
|
||||
* Fix rehash hook for pipx/pipx.x/pipx.xx by @rockandska in https://github.com/pyenv/pyenv/pull/3320
|
||||
* Add miniconda 25.7.0-2 by @native-api in https://github.com/pyenv/pyenv/pull/3323
|
||||
* Support curl from a snap by @native-api in https://github.com/pyenv/pyenv/pull/3329
|
||||
* CI: Bats test suite in docker by @rockandska in https://github.com/pyenv/pyenv/pull/3324
|
||||
* Add GraalPy 25.0.0 by @msimacek in https://github.com/pyenv/pyenv/pull/3331
|
||||
* Upgrade pip detetcion in pip-rehash to accept multiple variations by @rockandska in https://github.com/pyenv/pyenv/pull/3330
|
||||
* Add CPython 3.14.0rc3 by @nedbat in https://github.com/pyenv/pyenv/pull/3333
|
||||
* Use TCLTK_* and pkg-config for 3.11+ linking with Homebrew Tcl/Tk; add PYTHON_BUILD_TCLTK_FORMULA envvar by @native-api in https://github.com/pyenv/pyenv/pull/3327
|
||||
|
||||
## Release v2.6.7
|
||||
* Skip Zlib from XCode for XCode 16+ by @native-api in https://github.com/pyenv/pyenv/pull/3298
|
||||
* Don't fail the build if `xcodebuild` fails by @native-api in https://github.com/pyenv/pyenv/pull/3302
|
||||
|
||||
@@ -13,12 +13,6 @@ General guidance
|
||||
You can still add performance optimizations etc that take advantage of newer Bash features
|
||||
as long as there is a fallback execution route for Bash 3.
|
||||
|
||||
* Be extra careful when submitting logic specific for the Apple Silicon platform
|
||||
|
||||
As of this writing, Github Actions do not support it and only one team member has the necessary hardware.
|
||||
So we may be unable to test your changes and may have to take your word for it.
|
||||
|
||||
|
||||
Formatting PRs
|
||||
==============
|
||||
|
||||
|
||||
35
Dockerfile
35
Dockerfile
@@ -1,35 +0,0 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="Chris L. Barnes <chrislloydbarnes@gmail.com>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y \
|
||||
make \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
zlib1g-dev \
|
||||
libbz2-dev \
|
||||
libreadline-dev \
|
||||
libsqlite3-dev \
|
||||
wget \
|
||||
curl \
|
||||
llvm \
|
||||
libncurses5-dev \
|
||||
libncursesw5-dev \
|
||||
xz-utils \
|
||||
tk-dev \
|
||||
libffi-dev \
|
||||
liblzma-dev \
|
||||
python-openssl \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PYENV_ROOT "/pyenv"
|
||||
ENV PATH "$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
COPY . /pyenv
|
||||
|
||||
RUN eval "$(pyenv init -)"
|
||||
|
||||
96
Makefile
96
Makefile
@@ -1,3 +1,86 @@
|
||||
TEST_BATS_VERSION = v1.10.0
|
||||
TEST_BASH_VERSIONS = 3.2.57 4.1.17
|
||||
TEST_UNIT_DOCKER_PREFIX = test-unit-docker
|
||||
TEST_UNIT_DOCKER_TARGETS = $(foreach bash,$(TEST_BASH_VERSIONS),$(addsuffix -$(bash),$(TEST_UNIT_DOCKER_PREFIX)) $(addsuffix -gnu-$(bash),$(TEST_UNIT_DOCKER_PREFIX)))
|
||||
TEST_PLUGIN_DOCKER_PREFIX = test-plugin-docker
|
||||
TEST_PLUGIN_DOCKER_TARGETS = $(foreach bash,$(TEST_BASH_VERSIONS),$(addsuffix -$(bash),$(TEST_PLUGIN_DOCKER_PREFIX)) $(addsuffix -gnu-$(bash),$(TEST_PLUGIN_DOCKER_PREFIX)))
|
||||
TEST_BATS_IMAGE_PREFIX = test-pyenv-docker-image
|
||||
TEST_BATS_IMAGE_TARGETS = $(foreach bash,$(TEST_BASH_VERSIONS),$(addsuffix -$(bash),$(TEST_BATS_IMAGE_PREFIX)) $(addsuffix -gnu-$(bash),$(TEST_BATS_IMAGE_PREFIX)))
|
||||
|
||||
.PHONY:
|
||||
test-docker: $(TEST_UNIT_DOCKER_PREFIX) $(TEST_PLUGIN_DOCKER_PREFIX)
|
||||
|
||||
# Run all unit test under bats docker
|
||||
.PHONY: $(TEST_UNIT_DOCKER_PREFIX)
|
||||
$(TEST_UNIT_DOCKER_PREFIX): $(TEST_UNIT_DOCKER_TARGETS)
|
||||
|
||||
# Run each unit test under bats docker
|
||||
.PHONY: $(TEST_UNIT_DOCKER_TARGETS)
|
||||
$(TEST_UNIT_DOCKER_TARGETS): DOCKER_IMAGE = $(TEST_BATS_IMAGE_PREFIX)
|
||||
$(TEST_UNIT_DOCKER_TARGETS): GNU = $(if $(findstring -gnu-,$@),True,False)
|
||||
$(TEST_UNIT_DOCKER_TARGETS): BASH = $(filter $(TEST_BASH_VERSIONS),$(subst -, ,$@))
|
||||
$(TEST_UNIT_DOCKER_TARGETS): DOCKER_TAG = bash-$(BASH)-gnu-$(GNU)
|
||||
$(TEST_UNIT_DOCKER_TARGETS): INTERACTIVE = $(if $(findstring true,$(CI)),,-ti)
|
||||
$(TEST_UNIT_DOCKER_TARGETS): $(TEST_UNIT_DOCKER_PREFIX)-% : $(TEST_BATS_IMAGE_PREFIX)-%
|
||||
$(info Running test with docker image '$(DOCKER_IMAGE):$(DOCKER_TAG)')
|
||||
docker run \
|
||||
--init \
|
||||
-v $(PWD):/code:ro \
|
||||
-v /etc/passwd:/etc/passwd:ro \
|
||||
-v /etc/group:/etc/group:ro \
|
||||
-u "$$(id -u $$(whoami)):$$(id -g $$(whoami))" \
|
||||
$${BATS_TEST_FILTER:+-e BATS_TEST_FILTER="$${BATS_TEST_FILTER}"} \
|
||||
$${BATS_FILE_FILTER:+-e BATS_FILE_FILTER="$${BATS_FILE_FILTER}"} \
|
||||
$${CI+-e CI="$${CI}"} \
|
||||
$(INTERACTIVE) \
|
||||
$(DOCKER_IMAGE):$(DOCKER_TAG) \
|
||||
test/run
|
||||
|
||||
# Run all plugin test under bats docker
|
||||
.PHONY: $(TEST_PLUGIN_DOCKER_PREFIX)
|
||||
$(TEST_PLUGIN_DOCKER_PREFIX): $(TEST_PLUGIN_DOCKER_TARGETS)
|
||||
|
||||
# Run each plugin test under bats docker
|
||||
.PHONY: $(TEST_PLUGIN_DOCKER_TARGETS)
|
||||
$(TEST_PLUGIN_DOCKER_TARGETS): DOCKER_IMAGE = $(TEST_BATS_IMAGE_PREFIX)
|
||||
$(TEST_PLUGIN_DOCKER_TARGETS): GNU = $(if $(findstring -gnu-,$@),True,False)
|
||||
$(TEST_PLUGIN_DOCKER_TARGETS): BASH = $(filter $(TEST_BASH_VERSIONS),$(subst -, ,$@))
|
||||
$(TEST_PLUGIN_DOCKER_TARGETS): DOCKER_TAG = bash-$(BASH)-gnu-$(GNU)
|
||||
$(TEST_PLUGIN_DOCKER_TARGETS): INTERACTIVE = $(if $(findstring true,$(CI)),,-ti)
|
||||
$(TEST_PLUGIN_DOCKER_TARGETS): $(TEST_PLUGIN_DOCKER_PREFIX)-% : $(TEST_BATS_IMAGE_PREFIX)-%
|
||||
$(info Running test with docker image '$(DOCKER_IMAGE):$(DOCKER_TAG)')
|
||||
docker run \
|
||||
--init \
|
||||
-v $(PWD):/code:ro \
|
||||
-v /etc/passwd:/etc/passwd:ro \
|
||||
-v /etc/group:/etc/group:ro \
|
||||
-u "$$(id -u $$(whoami)):$$(id -g $$(whoami))" \
|
||||
$${CI+-e CI="$${CI}"} \
|
||||
$(INTERACTIVE) \
|
||||
$(DOCKER_IMAGE):$(DOCKER_TAG) \
|
||||
bats $${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} plugins/python-build/test/$${BATS_FILE_FILTER}
|
||||
|
||||
# Build all images needed for bats under docker
|
||||
.PHONY: $(TEST_BATS_IMAGE_PREFIX)
|
||||
$(TEST_BATS_IMAGE_PREFIX): $(TEST_BATS_IMAGE_TARGETS)
|
||||
|
||||
# Build each image needed for bats under docker
|
||||
.PHONY: $(TEST_BATS_IMAGE_TARGETS)
|
||||
$(TEST_BATS_IMAGE_TARGETS): DOCKER_IMAGE = $(TEST_BATS_IMAGE_PREFIX)
|
||||
$(TEST_BATS_IMAGE_TARGETS): GNU = $(if $(findstring -gnu-,$@),True,False)
|
||||
$(TEST_BATS_IMAGE_TARGETS): BASH = $(filter $(TEST_BASH_VERSIONS),$(subst -, ,$@))
|
||||
$(TEST_BATS_IMAGE_TARGETS): DOCKER_TAG = bash-$(BASH)-gnu-$(GNU)
|
||||
$(TEST_BATS_IMAGE_TARGETS):
|
||||
$(info Building docker image '$(DOCKER_IMAGE):$(DOCKER_TAG)')
|
||||
docker build \
|
||||
--quiet \
|
||||
-f "$(PWD)/test/Dockerfile" \
|
||||
--build-arg GNU="$(GNU)" \
|
||||
--build-arg BASH="$(BASH)" \
|
||||
--build-arg BATS_VERSION="$(TEST_BATS_VERSION)" \
|
||||
-t $(DOCKER_IMAGE):$(DOCKER_TAG) \
|
||||
./
|
||||
|
||||
.PHONY: test test-build test-unit test-plugin
|
||||
|
||||
# Do not pass in user flags to build tests.
|
||||
@@ -10,7 +93,7 @@ test-unit: bats
|
||||
PATH="./bats/bin:$$PATH" test/run
|
||||
|
||||
test-plugin: bats
|
||||
cd plugins/python-build && $(PWD)/bats/bin/bats $${CI:+--tap} test
|
||||
cd plugins/python-build && $(PWD)/bats/bin/bats $${CI:+--tap} $${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} test/$${BATS_FILE_FILTER}
|
||||
|
||||
PYTHON_BUILD_ROOT := $(CURDIR)/plugins/python-build
|
||||
PYTHON_BUILD_OPTS ?= --verbose
|
||||
@@ -25,5 +108,12 @@ test-build:
|
||||
[ -e $(PYTHON_BUILD_TEST_PREFIX)/bin/pip ]
|
||||
$(PYTHON_BUILD_TEST_PREFIX)/bin/pip -V
|
||||
|
||||
bats:
|
||||
git clone --depth 1 --branch v1.2.0 https://github.com/bats-core/bats-core.git bats
|
||||
.SECONDARY: bats-$(TEST_BATS_VERSION)
|
||||
bats-$(TEST_BATS_VERSION):
|
||||
rm -rf bats
|
||||
ln -sf bats-$(TEST_BATS_VERSION) bats
|
||||
git clone --depth 1 --branch $(TEST_BATS_VERSION) https://github.com/bats-core/bats-core.git bats-$(TEST_BATS_VERSION)
|
||||
|
||||
.PHONY: bats
|
||||
bats: bats-$(TEST_BATS_VERSION)
|
||||
ln -sf bats-$(TEST_BATS_VERSION) bats
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="2.6.7"
|
||||
version="2.6.12"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -47,7 +47,11 @@ done
|
||||
|
||||
# If shell is not provided, detect it.
|
||||
if [ -z "$shell" ]; then
|
||||
shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
|
||||
if shell=$(tr '\0' ' ' 2>/dev/null </proc/"$PPID"/cmdline);then
|
||||
:
|
||||
else
|
||||
shell=$(ps p "$PPID" -o 'args=' 2>/dev/null || true)
|
||||
fi
|
||||
shell="${shell%% *}"
|
||||
shell="${shell##-}"
|
||||
shell="${shell:-$SHELL}"
|
||||
|
||||
@@ -175,6 +175,7 @@ You can set certain environment variables to control the build process.
|
||||
* `PYTHON_BUILD_SKIP_HOMEBREW`, if set, will not search for libraries installed by Homebrew when it would normally will.
|
||||
* `PYTHON_BUILD_USE_HOMEBREW`, if set, will search for libraries installed by Homebrew when it would normally not.
|
||||
* `PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA`, override the Homebrew OpenSSL formula to use.
|
||||
* `PYTHON_BUILD_TCLTK_FORMULA`, override the Homebrew Tcl/Tk formula to use.
|
||||
* `PYTHON_BUILD_SKIP_MACPORTS`, if set, will not search for libraries installed by MacPorts when it would normally will.
|
||||
* `PYTHON_BUILD_USE_MACPORTS`, if set, will search for libraries installed by MacPorts when it would normally not.
|
||||
* `PYTHON_BUILD_ROOT` overrides the default location from where build definitions
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# -g/--debug Build a debug version
|
||||
#
|
||||
|
||||
PYTHON_BUILD_VERSION="2.6.7"
|
||||
PYTHON_BUILD_VERSION="2.6.12"
|
||||
|
||||
OLDIFS="$IFS"
|
||||
|
||||
@@ -458,7 +458,14 @@ http_head_curl() {
|
||||
}
|
||||
|
||||
http_get_curl() {
|
||||
curl -q -o "${2:--}" -sSLf ${CURL_OPTS} "$1"
|
||||
local out;
|
||||
# Curl is also available as a snap. Snaps cannot read or write /tmp
|
||||
# (files cannot be found, any write result is silently discarded).
|
||||
local curl_is_snap;
|
||||
if [[ $(command -v curl) == "/snap/"* ]]; then curl_is_snap=1; fi
|
||||
if [[ -n $2 && -n $curl_is_snap ]]; then out="$HOME/$(basename "$2")"; else out="$2"; fi
|
||||
curl -q -o "${out:--}" -sSLf ${CURL_OPTS} "$1" || return $?
|
||||
if [[ -n $out && -n $curl_is_snap ]]; then mv "$out" "$2"; fi
|
||||
}
|
||||
|
||||
http_head_wget() {
|
||||
@@ -863,6 +870,8 @@ build_package_standard_build() {
|
||||
use_homebrew_readline || true
|
||||
use_homebrew_ncurses || true
|
||||
if is_mac -ge 1014; then
|
||||
# While XCode SDK is "always available",
|
||||
# still need a fallback in case we are using an alternate compiler
|
||||
use_xcode_sdk_zlib || use_homebrew_zlib || true
|
||||
else
|
||||
use_homebrew_zlib || true
|
||||
@@ -873,7 +882,9 @@ build_package_standard_build() {
|
||||
use_macports_readline || true
|
||||
use_macports_ncurses || true
|
||||
if is_mac -ge 1014; then
|
||||
use_xcode_sdk_zlib || use_macports_zlib || true
|
||||
# While XCode SDK is "always available",
|
||||
# still need a fallback in case we are using an alternate compiler
|
||||
use_xcode_sdk_zlib || use_homebrew_zlib || true
|
||||
else
|
||||
use_macports_zlib || true
|
||||
fi
|
||||
@@ -1497,7 +1508,9 @@ use_homebrew() {
|
||||
if command -v brew &>/dev/null; then
|
||||
local brew_prefix="$(brew --prefix 2>/dev/null || true)"
|
||||
# /usr/local/lib:/usr/lib is the default library search path
|
||||
if [[ -n $brew_prefix && $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ]]; then
|
||||
if [[ -n $brew_prefix && ( ( $brew_prefix != "/usr" && $brew_prefix != "/usr/local" )
|
||||
#when -isysroot is passed to Apple CLang, /usr/(local) are excluded from the default search path
|
||||
|| ( is_mac && osx_using_default_compiler && $CFLAGS =~ (^|\ )-isysroot\ ) ) ]]; then
|
||||
export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I${brew_prefix}/include"
|
||||
append_ldflags_libs "-L${brew_prefix}/lib -Wl,-rpath,${brew_prefix}/lib"
|
||||
lock_in homebrew
|
||||
@@ -1593,6 +1606,7 @@ has_broken_mac_readline() {
|
||||
if can_use_macports; then
|
||||
use_macports_readline && return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
use_homebrew_readline() {
|
||||
@@ -1682,6 +1696,7 @@ has_broken_mac_openssl() {
|
||||
use_macports_openssl && return 1
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
use_homebrew_openssl() {
|
||||
@@ -1820,30 +1835,37 @@ use_homebrew_zlib() {
|
||||
local brew_zlib="$(brew --prefix zlib 2>/dev/null || true)"
|
||||
if [ -d "$brew_zlib" ]; then
|
||||
echo "python-build: use zlib from homebrew"
|
||||
export CFLAGS="-I${brew_zlib} ${CFLAGS}"
|
||||
export CPPFLAGS="-I${brew_zlib}/include${CPPFLAGS:+ ${CPPFLAGS}}"
|
||||
export LDFLAGS="-L${brew_zlib}/lib${LDFLAGS:+ ${LDFLAGS}}"
|
||||
lock_in homebrew
|
||||
rc=0
|
||||
fi
|
||||
}
|
||||
|
||||
use_xcode_sdk_zlib() {
|
||||
local xcode_major;
|
||||
# If a custom compiler is used, including XCode SDK will likely break it
|
||||
[[ "${CC:-clang}" != "clang" || "$(command -v clang 2>/dev/null || true)" != "/usr/bin/clang" ]] && return 1
|
||||
# The flags set by this function break the build in XCode 16 due to unknown changes from XCode 15
|
||||
# For future-proofing, also disable it if we cannot determine the version
|
||||
[[ $(xcodebuild -version 2>/dev/null || true) =~ ^Xcode\ ([[:digit:]]+) ]] && xcode_major="${BASH_REMATCH[1]}"
|
||||
[[ -z $xcode_major || $xcode_major -ge 16 ]] && return 1
|
||||
local xc_sdk_path="$(xcrun --show-sdk-path 2>/dev/null || true)"
|
||||
if [ -d "$xc_sdk_path" ]; then
|
||||
echo "python-build: use zlib from xcode sdk"
|
||||
# Even though SDK's compiler uses the SDK dirs implicitly,
|
||||
# CPython's setup.py has to have nonstandard paths specified explicitly
|
||||
# to search for zlib.h in them
|
||||
export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I${xc_sdk_path}/usr/include"
|
||||
if is_mac -ge 1100; then
|
||||
export LDFLAGS="${LDFLAGS:+$LDFLAGS }-L${xc_sdk_path}/usr/lib"
|
||||
fi
|
||||
fi
|
||||
osx_using_default_compiler || return 1
|
||||
|
||||
local sdkroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null || true)"
|
||||
[[ -z ${sdkroot} || ! -d ${sdkroot} ]] && return 1
|
||||
|
||||
# Since Xcode 16 / macOS SDK 15, Apple tightened how the linker uses SDK content:
|
||||
# forcing -L "$SDK/usr/lib" now leads to odd link failures.
|
||||
echo "python-build: use zlib from xcode sdk"
|
||||
# Since 3.9.1 (bpo-41116), CPython's setup.py logic can search default SDK's sysroot itself
|
||||
# so we don't need to do anything
|
||||
# Since 2.7.12 and 3.5.2 (Issue #25136), distutils knows to look for Apple XCode 7+ stub libraries (.tbd)
|
||||
# when searching in the SDK
|
||||
# Since 2.7.4 and 3.2.1 (issue #7724), setup.py and distutils can search in the MacOS SDK when
|
||||
# it's explicitly specified with -isysroot
|
||||
|
||||
#distutils.unixcompiler and setup.py specifically search CFLAGS for "-isysroot"
|
||||
export CFLAGS="${CFLAGS:+$CFLAGS }-isysroot ${sdkroot}"
|
||||
return 0
|
||||
}
|
||||
|
||||
osx_using_default_compiler() {
|
||||
[[ "${CC:-clang}" == "clang" && "$(command -v clang 2>/dev/null || true)" == "/usr/bin/clang" ]]
|
||||
}
|
||||
|
||||
use_macports_zlib() {
|
||||
@@ -1858,28 +1880,41 @@ use_macports_zlib() {
|
||||
|
||||
use_homebrew_tcltk() {
|
||||
can_use_homebrew || return 1
|
||||
local tcltk_formula
|
||||
# Since https://github.com/Homebrew/homebrew-core/commit/f10e88617b41555193c22fdcba6109fe82155ee2 (10.11.2024),
|
||||
# tcl-tk is 9.0 which is not compatible with CPython as of this writing
|
||||
# but we'll keep it as backup for cases like non-updated Homebrew
|
||||
local tcltk
|
||||
for tcltk in "tcl-tk@8" "tcl-tk"; do
|
||||
local tcltk_libdir="$(brew --prefix "${tcltk}" 2>/dev/null || true)"
|
||||
if [ -d "$tcltk_libdir" ]; then
|
||||
echo "python-build: use tcl-tk from homebrew"
|
||||
if [[ -z "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then
|
||||
local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')"
|
||||
package_option python configure --with-tcltk-libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version"
|
||||
# In Homebrew Tcl/Tk 8.6.13, headers have been moved to the 'tcl-tk' subdir.
|
||||
# We're not using tclConfig.sh here 'cuz it produces the version-specific path to <brew prefix>/Cellar
|
||||
# and we'd rather have rpath set to <brew prefix>/opt/<...> to allow micro release upgrades without rebuilding
|
||||
# XXX: do use tclConfig.sh and translate the paths if more path shenanigans appear in later releases
|
||||
if [ -d "$tcltk_libdir/include/tcl-tk" ]; then
|
||||
package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include/tcl-tk"
|
||||
else
|
||||
package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include"
|
||||
fi
|
||||
# tcl-tk is 9.0. It's supported in CPython since 3.14.0a1 (gh-124111) but is not officially supported as of 3.14.0
|
||||
# so we prefer 8
|
||||
for tcltk_formula in ${PYTHON_BUILD_TCLTK_FORMULA:-tcl-tk@8 tcl-tk}; do
|
||||
local tcltk_prefix="$(brew --prefix "${tcltk_formula}" 2>/dev/null || true)"
|
||||
if [ -d "$tcltk_prefix" ]; then
|
||||
echo "python-build: use ${tcltk_formula} from homebrew"
|
||||
# In Homebrew Tcl/Tk 8.6.13, headers have been moved to the 'tcl-tk' subdir.
|
||||
local tcltk_includes="$(sh -c 'cd '"$tcltk_prefix"'/lib; . ./tclConfig.sh; . ./tkConfig.sh; echo "$TCL_INCLUDE_SPEC $TK_INCLUDE_SPEC"')"
|
||||
# Homebrew Tcl/Tk 9 is built with external libtommath. CPython's build as of 3.14.0 does not detect that and fails to link to tommath symbols
|
||||
local tcltk_cflags
|
||||
if sh -c '. '"$tcltk_prefix"'/lib/tclConfig.sh; echo "$TCL_DEFS"' | grep -qwFe '-DTCL_WITH_EXTERNAL_TOMMATH=1'; then
|
||||
tcltk_cflags="-DTCL_WITH_EXTERNAL_TOMMATH=1"
|
||||
fi
|
||||
export PKG_CONFIG_PATH="${tcltk_libdir}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
# For some reason, keg-only tcl-tk@8 successfully links with Tkinter without specifying rpath, with `/opt' rpath
|
||||
# so no need to translate /Cellar path to /opt path
|
||||
local tcltk_libs="$(sh -c 'cd '"$tcltk_prefix"'/lib; . ./tclConfig.sh; . ./tkConfig.sh; echo "$TCL_LIB_SPEC $TK_LIB_SPEC"')"
|
||||
# Since 2.7.6, 3.3.3, 3.4.0 (Issue #1584): --with-tcltk-includes + --with-tcltk-libs Configure options
|
||||
# Since 3.11.0 (bpo-45847): `pkg-config` call, TCLTK_CFLAGS + TCLTK_LIBS override
|
||||
if [[ -n "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then
|
||||
# pkg-config is not present out of the box in MacOS.
|
||||
# There's no way to provide a fallback only if it's is not present
|
||||
# and Configure's logic of detecting if it's present is complicated.
|
||||
# So we just override it always
|
||||
export TCLTK_CFLAGS="$tcltk_includes${tcltk_cflags:+ $tcltk_cflags}"
|
||||
export TCLTK_LIBS="$tcltk_libs"
|
||||
else
|
||||
package_option python configure --with-tcltk-includes="$tcltk_includes"
|
||||
package_option python configure --with-tcltk-libs="$tcltk_libs"
|
||||
[[ -n $tcltk_cflags ]] && export CFLAGS="${tcltk_cflags}${CFLAGS:+ $CFLAGS}"
|
||||
fi
|
||||
#set in either case as a failsafe
|
||||
export PKG_CONFIG_PATH="${tcltk_prefix}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
|
||||
lock_in homebrew
|
||||
return 0
|
||||
fi
|
||||
|
||||
@@ -11,13 +11,15 @@ logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO'))
|
||||
|
||||
MINIFORGE_REPO = 'conda-forge/miniforge'
|
||||
DISTRIBUTIONS = ['miniforge', 'mambaforge']
|
||||
DISTRIBUTIONS = ['miniforge']
|
||||
DISTRIBUTIONS_PRE25 = ['miniforge', 'mambaforge']
|
||||
|
||||
SKIPPED_RELEASES = [
|
||||
'4.13.0-0', #has no Mambaforge. We already generated scripts for Miniforge
|
||||
'22.11.1-0', #MacOS packages are broken (have broken dep tarballs, downloading them fails with 403)
|
||||
'22.11.1-1', #MacOS packages are broken (have broken dep tarballs, downloading them fails with 403)
|
||||
'22.11.1-2', #MacOS packages are broken (have broken dep tarballs, downloading them fails with 403)
|
||||
'25.3.0-0', #marked as prerelease, no Linux version
|
||||
]
|
||||
|
||||
install_script_fmt = """
|
||||
@@ -73,32 +75,36 @@ def create_spec(filename, sha, url):
|
||||
|
||||
return spec
|
||||
|
||||
def py_version(release):
|
||||
def version_tuple(version):
|
||||
return tuple(int(part) for part in version.split('-')[0].split("."))
|
||||
|
||||
def py_version(version):
|
||||
"""Suffix for `verify_pyXXX` to call in the generated build script"""
|
||||
release_line = tuple(int(part) for part in release.split(".")[:2])
|
||||
# current version: mentioned under https://github.com/conda-forge/miniforge?tab=readme-ov-file#miniforge3
|
||||
version_tuple_ = version_tuple(version)
|
||||
# current version: mentioned under https://github.com/conda-forge/miniforge?tab=readme-ov-file#requirements-and-installers
|
||||
# transition points:
|
||||
# https://github.com/conda-forge/miniforge/blame/main/Miniforge3/construct.yaml
|
||||
# look for "- python <version>" in non-pypy branch and which tag the commit is first in
|
||||
if release_line >= (24,5):
|
||||
if version_tuple_ >= (24,5):
|
||||
# yes, they jumped from 3.10 directly to 3.12
|
||||
# https://github.com/conda-forge/miniforge/commit/bddad0baf22b37cfe079e47fd1680fdfb2183590
|
||||
return "312"
|
||||
if release_line >= (4,14):
|
||||
if version_tuple_ >= (4,14):
|
||||
return "310"
|
||||
raise ValueError("Bundled Python version unknown for release `%s'"%release)
|
||||
raise ValueError("Bundled Python version unknown for release `%s'"%version)
|
||||
|
||||
def supported(filename):
|
||||
return ('pypy' not in filename) and ('Windows' not in filename)
|
||||
|
||||
def add_version(release):
|
||||
def add_version(release, distributions):
|
||||
tag_name = release['tag_name']
|
||||
download_urls = { f['name']: f['browser_download_url'] for f in release['assets'] }
|
||||
# can assume that sha files are named similar to release files so can also check supported(on their names)
|
||||
shas = dict([download_sha(url) for (name, url) in download_urls.items() if name.endswith('.sha256') and supported(os.path.basename(name)) and tag_name in name])
|
||||
specs = [create_spec(filename, sha, download_urls[filename]) for (filename, sha) in shas.items() if supported(filename)]
|
||||
|
||||
|
||||
for distribution in DISTRIBUTIONS:
|
||||
for distribution in distributions:
|
||||
distribution_specs = [spec for spec in specs if distribution in spec['flavor'].lower()]
|
||||
count = len(distribution_specs)
|
||||
|
||||
@@ -120,15 +126,17 @@ def add_version(release):
|
||||
for release in requests.get(f'https://api.github.com/repos/{MINIFORGE_REPO}/releases').json():
|
||||
version = release['tag_name']
|
||||
|
||||
logger.info('Looking for %(version)s in %(out_dir)s', locals())
|
||||
|
||||
# This release has no mambaforge artifacts which causes the next check to always trigger.
|
||||
# Build scripts for miniforge3-4.13.0-0 have already been generated.
|
||||
# Assuming this was a fluke, we don't yet need to implement proactively checking all releases for contents
|
||||
# or ignoring a release if _any_ of the flavors is already present in Pyenv.
|
||||
if version in SKIPPED_RELEASES:
|
||||
continue
|
||||
|
||||
if any(not list(out_dir.glob(f'{distribution}*-{version}')) for distribution in DISTRIBUTIONS):
|
||||
logger.info('Looking for %(version)s in %(out_dir)s', locals())
|
||||
|
||||
# mambaforge is retired https://github.com/conda-forge/miniforge/releases/tag/24.11.2-0
|
||||
if version_tuple(version) >= (24,11,2):
|
||||
distributions = DISTRIBUTIONS
|
||||
else:
|
||||
distributions = DISTRIBUTIONS_PRE25
|
||||
|
||||
if any(not list(out_dir.glob(f'{distribution}*-{version}')) for distribution in distributions):
|
||||
logger.info('Downloading %(version)s', locals())
|
||||
add_version(release)
|
||||
add_version(release, distributions)
|
||||
|
||||
9
plugins/python-build/share/python-build/3.10.19
Normal file
9
plugins/python-build/share/python-build/3.10.19
Normal file
@@ -0,0 +1,9 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-3.2.4" "https://github.com/openssl/openssl/releases/download/openssl-3.2.4/openssl-3.2.4.tar.gz#b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.10.19" "https://www.python.org/ftp/python/3.10.19/Python-3.10.19.tar.xz#c8f4a596572201d81dd7df91f70e177e19a70f1d489968b54b5fbbf29a97c076" standard verify_py310 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.10.19" "https://www.python.org/ftp/python/3.10.19/Python-3.10.19.tgz#a078fb2d7a216071ebbe2e34b5f5355dd6b6e9b0cd1bacc4a41c63990c5a0eec" standard verify_py310 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.11.14
Normal file
10
plugins/python-build/share/python-build/3.11.14
Normal file
@@ -0,0 +1,10 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.2.4" "https://github.com/openssl/openssl/releases/download/openssl-3.2.4/openssl-3.2.4.tar.gz#b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.11.14" "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tar.xz#8d3ed8ec5c88c1c95f5e558612a725450d2452813ddad5e58fdb1a53b1209b78" standard verify_py311 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.11.14" "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tgz#563d2a1b2a5ba5d5409b5ecd05a0e1bf9b028cf3e6a6f0c87a5dc8dc3f2d9182" standard verify_py311 copy_python_gdb ensurepip
|
||||
fi
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.1.2" "https://www.openssl.org/source/openssl-3.1.2.tar.gz#a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.1.2" "https://www.openssl.org/source/openssl-3.1.2.tar.gz#a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.3" "https://github.com/openssl/openssl/releases/download/openssl-3.3.3/openssl-3.3.3.tar.gz#712590fd20aaa60ec75d778fe5b810d6b829ca7fb1e530577917a131f9105539" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.14.0rc2" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc2.tar.xz#bc62854cf232345bd22c9091a68464e01e056c6473a3fffa84572c8a342da656" standard verify_py314 copy_python_gdb ensurepip
|
||||
install_package "Python-3.12.12" "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tar.xz#fb85a13414b028c49ba18bbd523c2d055a30b56b18b92ce454ea2c51edc656c4" standard verify_py312 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.14.0rc2" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc2.tgz#b336f5d76fcf2725b29108f253d4338fbe4cc6a17cd8baf059deebb5a343dd8f" standard verify_py314 copy_python_gdb ensurepip
|
||||
install_package "Python-3.12.12" "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz#487c908ddf4097a1b9ba859f25fe46d22ccaabfb335880faac305ac62bffb79b" standard verify_py312 copy_python_gdb ensurepip
|
||||
fi
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.2.1" "https://www.openssl.org/source/openssl-3.2.1.tar.gz#83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.2.1" "https://www.openssl.org/source/openssl-3.2.1.tar.gz#83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.2.2" "https://www.openssl.org/source/openssl-3.2.2.tar.gz#197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.1" "https://www.openssl.org/source/openssl-3.3.1.tar.gz#777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1
|
||||
install_package "openssl-3.5.1" "https://www.openssl.org/source/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.4.0" "https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz#e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.4.0" "https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz#e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.4.1" "https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz#002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.4.1" "https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz#002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
install_package "readline-8.3" "http://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.13.6" "https://www.python.org/ftp/python/3.13.6/Python-3.13.6.tar.xz#17ba5508819d8736a14fbfc47d36e184946a877851b2e9c4b6c43acb44a3b104" standard verify_py313 copy_python_gdb ensurepip
|
||||
else
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
install_package "readline-8.3" "http://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.13.7" "https://www.python.org/ftp/python/3.13.7/Python-3.13.7.tar.xz#5462f9099dfd30e238def83c71d91897d8caa5ff6ebc7a50f14d4802cdaaa79a" standard verify_py313 copy_python_gdb ensurepip
|
||||
else
|
||||
|
||||
10
plugins/python-build/share/python-build/3.13.8
Normal file
10
plugins/python-build/share/python-build/3.13.8
Normal file
@@ -0,0 +1,10 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "http://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.13.8" "https://www.python.org/ftp/python/3.13.8/Python-3.13.8.tar.xz#b9910730526b298299b46b35595ced9055722df60c06ad6301f6a4e2c728a252" standard verify_py313 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.13.8" "https://www.python.org/ftp/python/3.13.8/Python-3.13.8.tgz#06108fe96f4089b7d9e0096cb4ca9c81ddcd5135f779a7de94cf59abcaa4b53f" standard verify_py313 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.13.9
Normal file
10
plugins/python-build/share/python-build/3.13.9
Normal file
@@ -0,0 +1,10 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "http://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.13.9" "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tar.xz#ed5ef34cda36cfa2f3a340f07cac7e7814f91c7f3c411f6d3562323a866c5c66" standard verify_py313 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.13.9" "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tgz#c4c066af19c98fb7835d473bebd7e23be84f6e9874d47db9e39a68ee5d0ce35c" standard verify_py313 copy_python_gdb ensurepip
|
||||
fi
|
||||
2
plugins/python-build/share/python-build/3.13.9t
Normal file
2
plugins/python-build/share/python-build/3.13.9t
Normal file
@@ -0,0 +1,2 @@
|
||||
export PYTHON_BUILD_FREE_THREADING=1
|
||||
source "${BASH_SOURCE[0]%t}"
|
||||
@@ -1,6 +1,7 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1
|
||||
install_package "openssl-3.5.1" "https://www.openssl.org/source/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
|
||||
10
plugins/python-build/share/python-build/3.14.0
Normal file
10
plugins/python-build/share/python-build/3.14.0
Normal file
@@ -0,0 +1,10 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "http://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.14.0" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tar.xz#2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3e9" standard verify_py314 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.14.0" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz#88d2da4eed42fa9a5f42ff58a8bc8988881bd6c547e297e46682c2687638a851" standard verify_py314 copy_python_gdb ensurepip
|
||||
fi
|
||||
2
plugins/python-build/share/python-build/3.14.0t
Normal file
2
plugins/python-build/share/python-build/3.14.0t
Normal file
@@ -0,0 +1,2 @@
|
||||
export PYTHON_BUILD_FREE_THREADING=1
|
||||
source "${BASH_SOURCE[0]%t}"
|
||||
@@ -1,7 +1,8 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1
|
||||
install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
|
||||
install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
install_git "Python-3.15-dev" "https://github.com/python/cpython" main standard verify_py315 copy_python_gdb ensurepip
|
||||
|
||||
10
plugins/python-build/share/python-build/3.15.0a1
Normal file
10
plugins/python-build/share/python-build/3.15.0a1
Normal file
@@ -0,0 +1,10 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.15.0a1" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tar.xz#3194939d488eeaeefdcf990d35542d9ad1ce788789c4e2305a2060eb7058e5a4" standard verify_py314 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.15.0a1" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tgz#d70f3895c97db60d058bbdfa3a55fadd385bcb1c1269e686040858e3c109c993" standard verify_py314 copy_python_gdb ensurepip
|
||||
fi
|
||||
2
plugins/python-build/share/python-build/3.15.0a1t
Normal file
2
plugins/python-build/share/python-build/3.15.0a1t
Normal file
@@ -0,0 +1,2 @@
|
||||
export PYTHON_BUILD_FREE_THREADING=1
|
||||
source "${BASH_SOURCE[0]%t}"
|
||||
12
plugins/python-build/share/python-build/3.9.24
Normal file
12
plugins/python-build/share/python-build/3.9.24
Normal file
@@ -0,0 +1,12 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
# Avoid a compilation error when linking against OpenSSL built with SSLv3 support (fixed in 3.10.0) (#2181)
|
||||
export PYTHON_CFLAGS="-DOPENSSL_NO_SSL3${PYTHON_CFLAGS:+ $PYTHON_CFLAGS}"
|
||||
|
||||
install_package "openssl-3.0.16" "https://github.com/openssl/openssl/releases/download/openssl-3.0.16/openssl-3.0.16.tar.gz#57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.24" "https://www.python.org/ftp/python/3.9.24/Python-3.9.24.tar.xz#668391afabd5083faafa4543753d190f82f33ce6ba22d6e9ac728b43644b278a" standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.24" "https://www.python.org/ftp/python/3.9.24/Python-3.9.24.tgz#9a32cfc683aecaadbd9ed891ac2af9451ff37f48a00a2d8e1f4ecd9c2a1ffdcb" standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
12
plugins/python-build/share/python-build/3.9.25
Normal file
12
plugins/python-build/share/python-build/3.9.25
Normal file
@@ -0,0 +1,12 @@
|
||||
prefer_openssl3
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
# Avoid a compilation error when linking against OpenSSL built with SSLv3 support (fixed in 3.10.0) (#2181)
|
||||
export PYTHON_CFLAGS="-DOPENSSL_NO_SSL3${PYTHON_CFLAGS:+ $PYTHON_CFLAGS}"
|
||||
|
||||
install_package "openssl-3.0.16" "https://github.com/openssl/openssl/releases/download/openssl-3.0.16/openssl-3.0.16.tar.gz#57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.25" "https://www.python.org/ftp/python/3.9.25/Python-3.9.25.tar.xz#00e07d7c0f2f0cc002432d1ee84d2a40dae404a99303e3f97701c10966c91834" standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.25" "https://www.python.org/ftp/python/3.9.25/Python-3.9.25.tgz#a7438eabd3a48139f42d4e058096af8d880b0bb6e8fb8c78838892e4ce5583f2" standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
64
plugins/python-build/share/python-build/graalpy-25.0.0
Normal file
64
plugins/python-build/share/python-build/graalpy-25.0.0
Normal file
@@ -0,0 +1,64 @@
|
||||
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='25.0.0'
|
||||
BUILD=''
|
||||
|
||||
colorize 1 "GraalPy 23.1 and later installed by python-build use the faster Oracle GraalVM distribution" && echo
|
||||
colorize 1 "Oracle GraalVM uses the GFTC license, which is free for development and production use, see https://medium.com/graalvm/161527df3d76" && echo
|
||||
colorize 1 "The GraalVM Community Edition variant of GraalPy is also available, under the name graalpy-community-${VERSION}" && echo
|
||||
|
||||
|
||||
graalpy_arch="$(graalpy_architecture 2>/dev/null || true)"
|
||||
|
||||
case "$graalpy_arch" in
|
||||
"linux-amd64" )
|
||||
checksum="8ca62fc996b4dcad146ff37139d22a8478959bde73789bfdd1e396287cd09dff"
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
checksum="e0008c00e8e925268d592de808839d913609e9f29b0e0dd9b69c795aabb64e2a"
|
||||
;;
|
||||
"macos-amd64" )
|
||||
checksum="1709a02b2abc93cf698b95ddd6d8bbf43ddc7b268b09a9e5bced4e637d37369f"
|
||||
;;
|
||||
"macos-aarch64" )
|
||||
checksum="4dfff34a4cfeb2c11441ce807c455719945b7f580bdec47d36daba342925a413"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPy is available for $(uname -sm)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo "Oracle GraalPy currently doesn't provide snapshot builds. Use graalpy-community if you need snapshots."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}/graalpy-${VERSION}-${graalpy_arch}.tar.gz#${checksum}"
|
||||
|
||||
install_package "graalpy-${VERSION}" "${url}" "copy" ensurepip
|
||||
64
plugins/python-build/share/python-build/graalpy-25.0.1
Normal file
64
plugins/python-build/share/python-build/graalpy-25.0.1
Normal file
@@ -0,0 +1,64 @@
|
||||
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='25.0.1'
|
||||
BUILD=''
|
||||
|
||||
colorize 1 "GraalPy 23.1 and later installed by python-build use the faster Oracle GraalVM distribution" && echo
|
||||
colorize 1 "Oracle GraalVM uses the GFTC license, which is free for development and production use, see https://medium.com/graalvm/161527df3d76" && echo
|
||||
colorize 1 "The GraalVM Community Edition variant of GraalPy is also available, under the name graalpy-community-${VERSION}" && echo
|
||||
|
||||
|
||||
graalpy_arch="$(graalpy_architecture 2>/dev/null || true)"
|
||||
|
||||
case "$graalpy_arch" in
|
||||
"linux-amd64" )
|
||||
checksum="b5baff786753ebb774300fcf68a9bca4d14cbb8099f055637bee11786abb2d57"
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
checksum="f3315d1a3f13e7fcd785d0ca9b954d251da5f5d0dedae094c28a0566a239e4fd"
|
||||
;;
|
||||
"macos-amd64" )
|
||||
checksum="10b0721d52397f0cc85f038900318da2203711cbcfae7899e3faed49d3dc6221"
|
||||
;;
|
||||
"macos-aarch64" )
|
||||
checksum="389e0732f4d79e30335b70d41b6e8a2d769b435512fcb41675eb3dce4fc4d014"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPy is available for $(uname -sm)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo "Oracle GraalPy currently doesn't provide snapshot builds. Use graalpy-community if you need snapshots."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}/graalpy-${VERSION}-${graalpy_arch}.tar.gz#${checksum}"
|
||||
|
||||
install_package "graalpy-${VERSION}" "${url}" "copy" ensurepip
|
||||
@@ -0,0 +1,54 @@
|
||||
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='25.0.0'
|
||||
BUILD=''
|
||||
|
||||
graalpy_arch="$(graalpy_architecture 2>/dev/null || true)"
|
||||
|
||||
case "$graalpy_arch" in
|
||||
"linux-amd64" )
|
||||
checksum="628d5e2af40b2a3ca694bbea169388394dd30fe0727a3f1b4c92319d7bb788d5"
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
checksum="7065492dea48a31adb5894379cd35acfd479c5a4158f3496f1485adedacf9bbb"
|
||||
;;
|
||||
"macos-amd64" )
|
||||
checksum="1b866e651f0016cfdc8d5d4f8e64023cd26024755d4fe5bef86d02f1a9b701ec"
|
||||
;;
|
||||
"macos-aarch64" )
|
||||
checksum="cec1e964f75ca5e881830e8670acea9486d589c1db909adf2ba974f16650bb58"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPy is available for $(uname -sm)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
url="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-dev-${BUILD}/graalpy-community-dev-${graalpy_arch}.tar.gz"
|
||||
else
|
||||
url="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}/graalpy-community-${VERSION}-${graalpy_arch}.tar.gz#${checksum}"
|
||||
fi
|
||||
|
||||
install_package "graalpy-community-${VERSION}${BUILD}" "${url}" "copy" ensurepip
|
||||
@@ -0,0 +1,54 @@
|
||||
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='25.0.1'
|
||||
BUILD=''
|
||||
|
||||
graalpy_arch="$(graalpy_architecture 2>/dev/null || true)"
|
||||
|
||||
case "$graalpy_arch" in
|
||||
"linux-amd64" )
|
||||
checksum="5ac049e3e13a9b04eead81851e59dfc794278ffec1933ff429378c1a70c88d32"
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
checksum="2ea15f932e6e25b21edd0a2713b294ce91c1dca571414fcdff297028f1313de5"
|
||||
;;
|
||||
"macos-amd64" )
|
||||
checksum="f7834df0a7c5087de746ae0b0143eda8cfc456c34ddccdc64817491a10e5294b"
|
||||
;;
|
||||
"macos-aarch64" )
|
||||
checksum="f89b15b75f456240089dd50e06128aa7357371ee85098a04dc4a4cd34a65f0c9"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPy is available for $(uname -sm)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
url="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-dev-${BUILD}/graalpy-community-dev-${graalpy_arch}.tar.gz"
|
||||
else
|
||||
url="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}/graalpy-community-${VERSION}-${graalpy_arch}.tar.gz#${checksum}"
|
||||
fi
|
||||
|
||||
install_package "graalpy-community-${VERSION}${BUILD}" "${url}" "copy" ensurepip
|
||||
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py310_25.7.0-2-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.7.0-2-Linux-aarch64.sh#e13bd0e0b4f70841f78aea8a978eb35cd6afb0af3e2d2b8f85d24636bb56bc21" "miniconda" verify_py310
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py310_25.7.0-2-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.7.0-2-Linux-x86_64.sh#647b55a8da07136fa2543fbf6b9719d3a4c2369dec5dd31d2c4bda2b51107717" "miniconda" verify_py310
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py310_25.7.0-2-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.7.0-2-MacOSX-arm64.sh#623c2e81b87516753d902aee0003e7126ab34817f27d46c6fd2c097435cab470" "miniconda" verify_py310
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py310_25.7.0-2-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.7.0-2-MacOSX-x86_64.sh#cd6f9cd295cecab025884175c59a0d0bd2ff919ebf60abfa1bd5e5b36772876e" "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
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py310_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-Linux-aarch64.sh#28fc3db9c7ee63cedab38b0e6006409f1f448be7ffc57b270623efd4422b0608" "miniconda" verify_py310
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py310_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-Linux-x86_64.sh#04a8b03d8b0ec062d923e592201a6fd88b7247c309ef8848afb25c424c40ac39" "miniconda" verify_py310
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py310_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-MacOSX-arm64.sh#fb3fbef60259b36b0248c73fecdd974f8554d5fccfe0a7b8a45eb06dedbe8a85" "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
|
||||
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py311_25.7.0-2-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.7.0-2-Linux-aarch64.sh#28ca561ec2d9a1ae72fbf3f833b8918c747ce21f57d79e218e47bf7d4d2ce792" "miniconda" verify_py311
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py311_25.7.0-2-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.7.0-2-Linux-x86_64.sh#e072c062a7e017732c97963ef0d9a1cb474b92b7f25c8a032f9632cfe75add4f" "miniconda" verify_py311
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py311_25.7.0-2-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.7.0-2-MacOSX-arm64.sh#c5edc119ec1bf31d3be6e088ea7c66314561ed21ccffd72e3484586e27aa7719" "miniconda" verify_py311
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py311_25.7.0-2-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.7.0-2-MacOSX-x86_64.sh#c05bab0c09ed67ed536c827ae39600d16217d559dcdad8820a04f32473276963" "miniconda" verify_py311
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py311_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-Linux-aarch64.sh#4e0723b9d76aa491cf22511dac36f4fdec373e41d2a243ff875e19b8df39bf94" "miniconda" verify_py311
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py311_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-Linux-x86_64.sh#238abad23f8d4d8ba89dd05df0b0079e278909a36e06955f12bbef4aa94e6131" "miniconda" verify_py311
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py311_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-MacOSX-arm64.sh#5d5f58477f40d23e491394a7114a318724f1f9161e2b8bd08c5845c47b036b72" "miniconda" verify_py311
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py312_25.7.0-2-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.7.0-2-Linux-aarch64.sh#edc03373d75b3a06de594a7f819ad351bd2fa7602854f392107998e62468c783" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py312_25.7.0-2-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.7.0-2-Linux-x86_64.sh#188b5d94ab3acefdeaebd7cb470d2fb74a3280563c77075de6e3e1d58d84ab0a" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py312_25.7.0-2-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.7.0-2-MacOSX-arm64.sh#8d67e7824088d7aa3bde938a4fc4365bb39ba1f710104cfe7bd9cfb9a99bd8d2" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py312_25.7.0-2-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.7.0-2-MacOSX-x86_64.sh#e8f6aed58d708cc544ba6bacbebad86787cb8df56667ff4729ad2fe36af32846" "miniconda" verify_py312
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py312_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-Linux-aarch64.sh#11ab86931679e6d9b15112f2e866dad1fcbd89a039a6442c0bce7b86fd282f0a" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py312_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-Linux-x86_64.sh#a0def9c732d94b156529ef7db8edd6e1862cee784a27a4961870dca86e89fba4" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py312_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-MacOSX-arm64.sh#6bf3d8cac26587f6e53f05cd781f9201d2918c37dc3ef20677b383e250568100" "miniconda" verify_py312
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py313_25.7.0-2-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.7.0-2-Linux-aarch64.sh#350dc95067e0c87bcaa67367e60ea1caae01872adeb945c760bb4a67518d9673" "miniconda" verify_py313
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py313_25.7.0-2-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.7.0-2-Linux-x86_64.sh#dda3629462ba1cfa72eb74535214c2e315c77f1cfb0f02046537e99f1bf64abc" "miniconda" verify_py313
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py313_25.7.0-2-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.7.0-2-MacOSX-arm64.sh#5c0137ef38c153649da28ca31a420b9c12c94cf636319beb8c925396d797fe62" "miniconda" verify_py313
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py313_25.7.0-2-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.7.0-2-MacOSX-x86_64.sh#9c88674b1a839eeb4cff006df397a05ea7d896472318fd84b7070278f9653dc6" "miniconda" verify_py313
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py313_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-Linux-aarch64.sh#a0de4562c368a8b5ca4385843f405684c79bea7aa3b75d7513ff99c0c6435d51" "miniconda" verify_py313
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py313_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-Linux-x86_64.sh#6022714da22986097bbefa13dab3d957257fef04e1c37d1ebd3645b5b99bc9d4" "miniconda" verify_py313
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py313_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-MacOSX-arm64.sh#491f35ab841c99225e5680209d5455a2f5278551378781c0dfeaf2586d7ae3df" "miniconda" verify_py313
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py39_25.7.0-2-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.7.0-2-Linux-aarch64.sh#18befc78dbfca5bbdc2c8085f2bedd0345a5fbf7d0f1e189fddaf2d17f31d3af" "miniconda" verify_py39
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py39_25.7.0-2-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.7.0-2-Linux-x86_64.sh#790e8ea347cf49ba250fceacdc0b022237a9150717b9e4c17f2e70abc075c05d" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py39_25.7.0-2-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.7.0-2-MacOSX-arm64.sh#914254c199cf3584ac918259dda70410d6deba2a6f73b0ec8728010e6afb75b0" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py39_25.7.0-2-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.7.0-2-MacOSX-x86_64.sh#dab8685fca4398bc7471cc4fd3fb1afe7ee3b43767bba28d788f9aa9961a702d" "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
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniconda3-py39_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-Linux-aarch64.sh#983ef280dec1d0f965b6b6133c585ce902e07136105d4977aa5de3aa027cfa55" "miniconda" verify_py39
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py39_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-Linux-x86_64.sh#d8d13344b46a057659397b9ca1a948d184bf59f04efa8864df8c01f7557e2baa" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniconda3-py39_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-MacOSX-arm64.sh#857f09c2be8feaf3664064a2e324e96656104a9a45ab0a657a49c03754855b77" "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
|
||||
25
plugins/python-build/share/python-build/miniforge3-25.3.0-1
Normal file
25
plugins/python-build/share/python-build/miniforge3-25.3.0-1
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-25.3.0-1-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-aarch64.sh#e4459077f78a9a1fbaa0cd6812897623360ea8ba2e73094ed5df5b662cbb2491" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-25.3.0-1-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-ppc64le.sh#a5f77d8d45b530b6e583b6a9bd5aa33ea70b5b77bd7c61728e12bf11a8137a5c" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-25.3.0-1-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-x86_64.sh#defd7ea7e823257900d404dcf734762359e13bfff451f1bfc7cafa0f7c110247" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-25.3.0-1-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-MacOSX-arm64.sh#141da48a332295b34cd9207efeb7a0dbc7711c2de26bfaf2b9c3b7ac3ce36e73" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-25.3.0-1-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-MacOSX-x86_64.sh#18eac9db50d23d6e84767bd170092759430c03ae66a928b3adf48d5c60e1614c" "miniconda" verify_py312
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
25
plugins/python-build/share/python-build/miniforge3-25.3.0-2
Normal file
25
plugins/python-build/share/python-build/miniforge3-25.3.0-2
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-25.3.0-2-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-2/Miniforge3-25.3.0-2-Linux-aarch64.sh#79a8d3a5f8d3681855545d7f623443e30079e4d26732956ff2f07632e8d2a9ef" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-25.3.0-2-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-2/Miniforge3-25.3.0-2-Linux-ppc64le.sh#1ebc02ff29e346c4dc987cf2df52af6e9e57958c82df62c8839dfbdbf2366222" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-25.3.0-2-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-2/Miniforge3-25.3.0-2-Linux-x86_64.sh#40cbe16854f3a346cdc5ce6a4bcbbe25973172fa8117a5e6168038173890054b" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-25.3.0-2-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-2/Miniforge3-25.3.0-2-MacOSX-arm64.sh#e658f618ef81473ae71f056b19a83224d147e6b54cd2c6477bc130345d9385b3" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-25.3.0-2-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-2/Miniforge3-25.3.0-2-MacOSX-x86_64.sh#86c557f5c2517c9ade892c671e41df5cf3f3b8bb13bc4738dc6bee928d08597d" "miniconda" verify_py312
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
25
plugins/python-build/share/python-build/miniforge3-25.3.0-3
Normal file
25
plugins/python-build/share/python-build/miniforge3-25.3.0-3
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-25.3.0-3-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-aarch64.sh#ac89f17b0eec4e98d38a53d1ae688e0f22c77d8ea5b5f008c2455e90ef095339" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-25.3.0-3-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-ppc64le.sh#1ce4084983b899d2f895bd13085ba20ff787fbcc2f2c865c618bffc97dd877b8" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-25.3.0-3-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-x86_64.sh#1b57f8cb991982063f79b56176881093abb1dc76d73fda32102afde60585b5a1" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-25.3.0-3-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-arm64.sh#16205127ac2b5701881636229b7fe42e1f961007513b8673f8064da331e496a0" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-25.3.0-3-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-x86_64.sh#c562e11d8f9caca3dcfb9ba6d5043b9238975d271751e12c3fbfc2a472b4b8fb" "miniconda" verify_py312
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
25
plugins/python-build/share/python-build/miniforge3-25.3.1-0
Normal file
25
plugins/python-build/share/python-build/miniforge3-25.3.1-0
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-25.3.1-0-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-Linux-aarch64.sh#a57c9e3d6c0c449c0283fd07e0bfa30d95eb8d547a14e8dc06c606405d01a7f0" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-25.3.1-0-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-Linux-ppc64le.sh#87eb7d349a0ed3ba964c5263d90663e3dff93f252305b7bf24c12e714117bdfe" "miniconda" verify_py312
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-25.3.1-0-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-Linux-x86_64.sh#376b160ed8130820db0ab0f3826ac1fc85923647f75c1b8231166e3d559ab768" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-25.3.1-0-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-MacOSX-arm64.sh#d9eabd1868030589a1d74017b8723b01cf81b5fec1b9da8021b6fa44be7bbeae" "miniconda" verify_py312
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-25.3.1-0-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.3.1-0/Miniforge3-25.3.1-0-MacOSX-x86_64.sh#6c09a3550bb65bdb6d3db6f6c2b890b987b57189f3b71c67a5af49943d2522e8" "miniconda" verify_py312
|
||||
;;
|
||||
* )
|
||||
{ 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
|
||||
@@ -4,7 +4,7 @@ load test_helper
|
||||
|
||||
@test "not enough arguments for python-build" {
|
||||
# use empty inline definition so nothing gets built anyway
|
||||
local definition="${TMP}/build-definition"
|
||||
local definition="${BATS_TEST_TMPDIR}/build-definition"
|
||||
echo '' > "$definition"
|
||||
|
||||
run python-build "$definition"
|
||||
@@ -14,10 +14,10 @@ load test_helper
|
||||
|
||||
@test "extra arguments for python-build" {
|
||||
# use empty inline definition so nothing gets built anyway
|
||||
local definition="${TMP}/build-definition"
|
||||
local definition="${BATS_TEST_TMPDIR}/build-definition"
|
||||
echo '' > "$definition"
|
||||
|
||||
run python-build "$definition" "${TMP}/install" ""
|
||||
run python-build "$definition" "${BATS_TEST_TMPDIR}/install" ""
|
||||
assert_failure
|
||||
assert_output_contains 'Usage: python-build'
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export PYTHON_BUILD_CACHE_PATH="$TMP/cache"
|
||||
export MAKE=make
|
||||
export MAKE_OPTS="-j 2"
|
||||
export CC=cc
|
||||
export -n PYTHON_CONFIGURE_OPTS
|
||||
_setup() {
|
||||
export PYTHON_BUILD_CACHE_PATH="$BATS_TEST_TMPDIR/cache"
|
||||
export MAKE=make
|
||||
export MAKE_OPTS="-j 2"
|
||||
export CC=cc
|
||||
export -n PYTHON_CONFIGURE_OPTS
|
||||
|
||||
setup() {
|
||||
mkdir -p "$INSTALL_ROOT"
|
||||
stub md5 false
|
||||
stub curl false
|
||||
@@ -29,14 +29,24 @@ cached_tarball() {
|
||||
|
||||
tarball() {
|
||||
local name="$1"
|
||||
shift
|
||||
local path="$PWD/$name"
|
||||
local configure="$path/${2:-configure}"
|
||||
shift 1
|
||||
local configure="$1"
|
||||
if [[ ${configure:0:1} == "-" ]]; then configure=""; fi
|
||||
configure="$path/${configure:-configure}"
|
||||
shift || true
|
||||
local extra_vars var_name
|
||||
if [[ $# -gt 0 ]]; then
|
||||
for var_name in "$@"; do
|
||||
extra_vars="${extra_vars:+$extra_vars }$var_name=\$$var_name"
|
||||
done
|
||||
fi
|
||||
|
||||
executable "$configure" <<OUT
|
||||
#!$BASH
|
||||
echo "$name: CFLAGS=\\"\$CFLAGS\\" CPPFLAGS=\\"\$CPPFLAGS\\" LDFLAGS=\\"\$LDFLAGS\\" PKG_CONFIG_PATH=\\"\$PKG_CONFIG_PATH\\"" >> build.log
|
||||
echo "$name: \$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log
|
||||
echo "$name:" "\$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log
|
||||
${extra_vars:+echo $name: $extra_vars >>build.log}
|
||||
OUT
|
||||
|
||||
for file; do
|
||||
@@ -58,6 +68,20 @@ assert_build_log() {
|
||||
assert_output
|
||||
}
|
||||
|
||||
stub_tcltk() {
|
||||
local tcltk_prefix="${1:?}"
|
||||
mkdir -p "$tcltk_prefix/lib"
|
||||
cat >"$tcltk_prefix/lib/tclConfig.sh" <<!
|
||||
TCL_INCLUDE_SPEC='-I${tcltk_prefix}/include'
|
||||
TCL_LIB_SPEC='-L${tcltk_prefix}/lib -ltclX.Y'
|
||||
!
|
||||
cat >"$tcltk_prefix/lib/tkConfig.sh" <<!
|
||||
TK_INCLUDE_SPEC='-I${tcltk_prefix}/include'
|
||||
TK_LIB_SPEC='-L${tcltk_prefix}/lib -ltkX.Y'
|
||||
!
|
||||
|
||||
}
|
||||
|
||||
@test "yaml is installed for python" {
|
||||
cached_tarball "yaml-0.1.6"
|
||||
cached_tarball "Python-3.6.2"
|
||||
@@ -74,11 +98,11 @@ assert_build_log() {
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
yaml-0.1.6: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -117,11 +141,11 @@ OUT
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
yaml-0.1.6: CFLAGS="yaml_cflag1 yaml_cflag2" CPPFLAGS="-I${TMP}/install/include yaml_cppflag1 yaml_cppflag2" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib yaml_ldflag1 yaml_ldflag2" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: CFLAGS="yaml_cflag1 yaml_cflag2" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include yaml_cppflag1 yaml_cppflag2" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib yaml_ldflag1 yaml_ldflag2" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: --prefix=yaml_prefix_path configure_opt1 configure_opt2 yaml_configure_opt1 yaml_configure_opt2
|
||||
make make_opt1 make_opt2 yaml_make_opt1 yaml_make_opt2
|
||||
make install make_install_opt1 make_install_opt2
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib configure_opt1 configure_opt2
|
||||
make make_opt1 make_opt2
|
||||
make python_make_install_target make_install_opt1 make_install_opt2 python_make_install_opt1 python_make_install_opt2
|
||||
@@ -138,7 +162,7 @@ OUT
|
||||
stub_make_install
|
||||
stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log'
|
||||
|
||||
TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<""
|
||||
TMPDIR="$BATS_TEST_TMPDIR" install_fixture --patch definitions/needs-yaml <<<""
|
||||
assert_success
|
||||
|
||||
unstub uname
|
||||
@@ -146,12 +170,12 @@ OUT
|
||||
unstub patch
|
||||
|
||||
assert_build_log <<OUT
|
||||
yaml-0.1.6: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
patch -p0 --force -i $TMP/python-patch.XXX
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
patch -p0 --force -i $BATS_TEST_TMPDIR/python-patch.XXX
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -168,7 +192,7 @@ OUT
|
||||
stub_make_install
|
||||
stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log'
|
||||
|
||||
TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.py"
|
||||
TMPDIR="$BATS_TEST_TMPDIR" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.py"
|
||||
assert_success
|
||||
|
||||
unstub uname
|
||||
@@ -176,12 +200,12 @@ OUT
|
||||
unstub patch
|
||||
|
||||
assert_build_log <<OUT
|
||||
yaml-0.1.6: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
yaml-0.1.6: --prefix=$INSTALL_ROOT
|
||||
make -j 2
|
||||
make install
|
||||
patch -p1 --force -i $TMP/python-patch.XXX
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
patch -p1 --force -i $BATS_TEST_TMPDIR/python-patch.XXX
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -191,7 +215,7 @@ OUT
|
||||
@test "Homebrew and port are tried if both are present in PATH in MacOS" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
BREW_PREFIX="$TMP/homebrew-prefix"
|
||||
BREW_PREFIX="$BATS_TEST_TMPDIR/homebrew-prefix"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
@@ -213,7 +237,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -223,7 +247,7 @@ OUT
|
||||
@test "homebrew with uncommon prefix is added to search path" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
BREW_PREFIX="$TMP/homebrew-prefix"
|
||||
BREW_PREFIX="$BATS_TEST_TMPDIR/homebrew-prefix"
|
||||
mkdir -p "$BREW_PREFIX"
|
||||
export PYTHON_BUILD_SKIP_MACPORTS=1
|
||||
|
||||
@@ -244,7 +268,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -254,7 +278,7 @@ OUT
|
||||
@test "Macports are used in MacOS if Homebrew was not picked" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
BREW_PREFIX="$TMP/homebrew-prefix"
|
||||
BREW_PREFIX="$BATS_TEST_TMPDIR/homebrew-prefix"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
@@ -275,7 +299,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$PORT_PREFIX/include -I${TMP}/install/include" LDFLAGS="-L$PORT_PREFIX/lib -Wl,-rpath,$PORT_PREFIX/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/lib/pkgconfig"
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$PORT_PREFIX/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L$PORT_PREFIX/lib -Wl,-rpath,$PORT_PREFIX/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -285,7 +309,7 @@ OUT
|
||||
@test "yaml is linked from Homebrew" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
brew_libdir="$TMP/homebrew-yaml"
|
||||
brew_libdir="$BATS_TEST_TMPDIR/homebrew-yaml"
|
||||
mkdir -p "$brew_libdir"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
@@ -303,7 +327,7 @@ OUT
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$brew_libdir/include -I${TMP}/install/include" LDFLAGS="-L$brew_libdir/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$brew_libdir/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L$brew_libdir/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -313,7 +337,7 @@ OUT
|
||||
@test "readline is linked from Homebrew" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
readline_libdir="$TMP/homebrew-readline"
|
||||
readline_libdir="$BATS_TEST_TMPDIR/homebrew-readline"
|
||||
mkdir -p "$readline_libdir"
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
@@ -333,7 +357,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$readline_libdir/include -I${TMP}/install/include" LDFLAGS="-L$readline_libdir/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$readline_libdir/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L$readline_libdir/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -343,7 +367,7 @@ OUT
|
||||
@test "ncurses is linked from Homebrew" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
ncurses_libdir="$TMP/homebrew-ncurses"
|
||||
ncurses_libdir="$BATS_TEST_TMPDIR/homebrew-ncurses"
|
||||
mkdir -p "$ncurses_libdir"
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
@@ -363,7 +387,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$ncurses_libdir/include -I${TMP}/install/include" LDFLAGS="-L$ncurses_libdir/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I$ncurses_libdir/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L$ncurses_libdir/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -378,6 +402,9 @@ OUT
|
||||
stub port "-q installed libyaml : echo ' libyaml @0.2.5_0 (active)'"
|
||||
for i in {1..3}; do stub port false; done
|
||||
stub_make_install
|
||||
export PYTHON_BUILD_SKIP_HOMEBREW=1
|
||||
PORT_PREFIX="$(which port)"
|
||||
PORT_PREFIX="${PORT_PREFIX%/bin/port}"
|
||||
|
||||
install_fixture definitions/needs-yaml
|
||||
assert_success
|
||||
@@ -388,7 +415,7 @@ OUT
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/include -I${TMP}/install/include" LDFLAGS="-L${TMP}/lib -Wl,-rpath,${TMP}/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/lib/pkgconfig"
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -403,6 +430,9 @@ OUT
|
||||
stub port "-q installed readline : echo ' readline @8.2.013_0 (active)'"
|
||||
for i in {1..2}; do stub port false; done
|
||||
stub_make_install
|
||||
export PYTHON_BUILD_SKIP_HOMEBREW=1
|
||||
PORT_PREFIX="$(which port)"
|
||||
PORT_PREFIX="${PORT_PREFIX%/bin/port}"
|
||||
|
||||
run_inline_definition <<DEF
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
@@ -415,7 +445,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/include -I${TMP}/install/include" LDFLAGS="-L${TMP}/lib -Wl,-rpath,${TMP}/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/lib/pkgconfig"
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -431,6 +461,9 @@ OUT
|
||||
stub port "-q installed ncurses : echo '$ncurses_libdir'"
|
||||
stub port false
|
||||
stub_make_install
|
||||
export PYTHON_BUILD_SKIP_HOMEBREW=1
|
||||
PORT_PREFIX="$(which port)"
|
||||
PORT_PREFIX="${PORT_PREFIX%/bin/port}"
|
||||
|
||||
run_inline_definition <<DEF
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
@@ -443,7 +476,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/include -I${TMP}/install/include" LDFLAGS="-L${TMP}/lib -Wl,-rpath,${TMP}/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/lib/pkgconfig"
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -474,7 +507,7 @@ DEF
|
||||
unstub sysctl
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib --with-openssl=/usr/local
|
||||
make -j 1
|
||||
make install
|
||||
@@ -508,7 +541,7 @@ DEF
|
||||
unstub sysctl
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include -I/usr/local/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include -I/usr/local/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 1
|
||||
make install
|
||||
@@ -538,7 +571,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -565,7 +598,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -589,7 +622,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -617,7 +650,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/include -I${TMP}/install/include" LDFLAGS="-L${TMP}/lib -Wl,-rpath,${TMP}/lib -L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/lib/pkgconfig"
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/include -I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/lib -L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -627,7 +660,7 @@ OUT
|
||||
@test "homebrew is used in Linux if PYTHON_BUILD_USE_HOMEBREW is set" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
BREW_PREFIX="$TMP/homebrew-prefix"
|
||||
BREW_PREFIX="$BATS_TEST_TMPDIR/homebrew-prefix"
|
||||
mkdir -p "$BREW_PREFIX"
|
||||
|
||||
stub uname '-s : echo Linux'
|
||||
@@ -646,7 +679,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -676,7 +709,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include -I$BREW_PREFIX/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib -L$BREW_PREFIX/lib -Wl,-rpath,$BREW_PREFIX/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -686,7 +719,7 @@ OUT
|
||||
@test "homebrew is not used in Linux if Pyenv is not installed with Homebrew" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
BREW_PREFIX="$TMP/homebrew-prefix"
|
||||
BREW_PREFIX="$BATS_TEST_TMPDIR/homebrew-prefix"
|
||||
mkdir -p "$BREW_PREFIX"
|
||||
|
||||
stub uname '-s : echo Linux'
|
||||
@@ -703,7 +736,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -713,7 +746,7 @@ OUT
|
||||
@test "readline is not linked from Homebrew when explicitly defined" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
readline_libdir="$TMP/custom"
|
||||
readline_libdir="$BATS_TEST_TMPDIR/custom"
|
||||
mkdir -p "$readline_libdir/include/readline"
|
||||
touch "$readline_libdir/include/readline/rlconf.h"
|
||||
|
||||
@@ -735,19 +768,16 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "tcl-tk is linked from Homebrew" {
|
||||
@test "tcl-tk is linked from Homebrew via --with-tcl-*" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
tcl_tk_version=8.6
|
||||
tcl_tk_libdir="$TMP/homebrew-tcl-tk"
|
||||
mkdir -p "$tcl_tk_libdir/lib"
|
||||
echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh"
|
||||
stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
@@ -768,8 +798,139 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
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
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${BATS_TEST_TMPDIR}/install --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --with-tcltk-includes=-I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include -I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include --with-tcltk-libs=-L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltclX.Y -L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltkX.Y
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "tcl-tk with external libtommath is linked from Homebrew via --with-tcl-*" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}"
|
||||
cat >>"$tcl_tk_libdir/lib/tclConfig.sh" <<!
|
||||
TCL_DEFS='-DSMTH -DTCL_WITH_EXTERNAL_TOMMATH=1 -DSMTH_ELSE'
|
||||
!
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
|
||||
stub brew "--prefix tcl-tk@8 : echo '$tcl_tk_libdir'"
|
||||
for i in {1..4}; do stub brew false; done
|
||||
|
||||
stub_make_install
|
||||
|
||||
run_inline_definition <<DEF
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
unstub brew
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="-DTCL_WITH_EXTERNAL_TOMMATH=1" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${BATS_TEST_TMPDIR}/install --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --with-tcltk-includes=-I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include -I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include --with-tcltk-libs=-L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltclX.Y -L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltkX.Y
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "tcl-tk is linked from Homebrew with PYTHON_BUILD_TCLTK_FORMULA" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
|
||||
stub brew "--prefix tcl-tk-custom : echo '$tcl_tk_libdir'"
|
||||
for i in {1..4}; do stub brew false; done
|
||||
|
||||
stub_make_install
|
||||
|
||||
run_inline_definition <<DEF
|
||||
PYTHON_BUILD_TCLTK_FORMULA=tcl-tk-custom
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
unstub brew
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${BATS_TEST_TMPDIR}/install --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --with-tcltk-includes=-I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include -I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include --with-tcltk-libs=-L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltclX.Y -L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltkX.Y
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "tcl-tk is linked from Homebrew via pkg-config and override vars" {
|
||||
cached_tarball "Python-3.6.2" - TCLTK_CFLAGS TCLTK_LIBS
|
||||
stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}"
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
|
||||
stub brew "--prefix tcl-tk@8 : echo '$tcl_tk_libdir'"
|
||||
for i in {1..4}; do stub brew false; done
|
||||
|
||||
stub_make_install
|
||||
|
||||
run_inline_definition <<DEF
|
||||
PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
unstub brew
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${BATS_TEST_TMPDIR}/install --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib
|
||||
Python-3.6.2: TCLTK_CFLAGS=-I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include -I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include TCLTK_LIBS=-L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltclX.Y -L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltkX.Y
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "tcl-tk with external libtommath is linked from Homebrew via pkg-config and override vars" {
|
||||
cached_tarball "Python-3.6.2" - TCLTK_CFLAGS TCLTK_LIBS
|
||||
stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}"
|
||||
cat >>"$tcl_tk_libdir/lib/tclConfig.sh" <<!
|
||||
TCL_DEFS='-DSMTH -DTCL_WITH_EXTERNAL_TOMMATH=1 -DSMTH_ELSE'
|
||||
!
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
|
||||
stub brew "--prefix tcl-tk@8 : echo '$tcl_tk_libdir'"
|
||||
for i in {1..4}; do stub brew false; done
|
||||
|
||||
stub_make_install
|
||||
|
||||
run_inline_definition <<DEF
|
||||
PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
DEF
|
||||
assert_success
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
unstub brew
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${BATS_TEST_TMPDIR}/install --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib
|
||||
Python-3.6.2: TCLTK_CFLAGS=-I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include -I${BATS_TEST_TMPDIR}/homebrew-tcl-tk/include -DTCL_WITH_EXTERNAL_TOMMATH=1 TCLTK_LIBS=-L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltclX.Y -L${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib -ltkX.Y
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
@@ -788,7 +949,7 @@ OUT
|
||||
for i in {1..4}; do stub brew false; done
|
||||
stub_make_install
|
||||
|
||||
export PYTHON_CONFIGURE_OPTS="--with-tcltk-libs='-L${TMP}/custom-tcl-tk/lib -ltcl$tcl_tk_version -ltk$tcl_tk_version'"
|
||||
export PYTHON_CONFIGURE_OPTS="--with-tcltk-libs='-L${BATS_TEST_TMPDIR}/custom-tcl-tk/lib -ltcl$tcl_tk_version -ltk$tcl_tk_version'"
|
||||
run_inline_definition <<DEF
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
DEF
|
||||
@@ -800,8 +961,8 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" 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 --enable-shared --libdir=$INSTALL_ROOT/lib --with-tcltk-libs=-L${TMP}/custom-tcl-tk/lib -ltcl8.6 -ltk8.6
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib --with-tcltk-libs=-L${BATS_TEST_TMPDIR}/custom-tcl-tk/lib -ltcl8.6 -ltk8.6
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
@@ -813,7 +974,7 @@ OUT
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 1010'
|
||||
|
||||
tcl_tk_libdir="$TMP/homebrew-tcl-tk"
|
||||
tcl_tk_libdir="$BATS_TEST_TMPDIR/homebrew-tcl-tk"
|
||||
mkdir -p "$tcl_tk_libdir/lib"
|
||||
|
||||
stub brew "--prefix tcl-tk@8 : echo '${tcl_tk_libdir}'"
|
||||
@@ -833,8 +994,8 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH="${TMP}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${TMP}/install --enable-shared --libdir=${TMP}/install/lib
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH="${BATS_TEST_TMPDIR}/homebrew-tcl-tk/lib/pkgconfig"
|
||||
Python-3.6.2: --prefix=${BATS_TEST_TMPDIR}/install --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
@@ -845,6 +1006,7 @@ OUT
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 10.10'
|
||||
for i in {1..6}; do stub brew false; done
|
||||
|
||||
stub sysctl false
|
||||
stub_make_install
|
||||
@@ -857,10 +1019,11 @@ DEF
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
unstub brew
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -872,6 +1035,7 @@ OUT
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 10.10'
|
||||
for i in {1..6}; do stub brew false; done
|
||||
|
||||
stub sysctl '-n hw.ncpu : echo 4'
|
||||
stub_make_install
|
||||
@@ -884,11 +1048,12 @@ DEF
|
||||
|
||||
unstub uname
|
||||
unstub sw_vers
|
||||
unstub brew
|
||||
unstub sysctl
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 4
|
||||
make install
|
||||
@@ -916,7 +1081,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 1
|
||||
make install
|
||||
@@ -940,7 +1105,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install DOGE="such wow"
|
||||
@@ -964,7 +1129,7 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --disable-shared
|
||||
make -j 2
|
||||
make install
|
||||
@@ -991,8 +1156,8 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" 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 --enable-shared --libdir=${TMP}/install/lib --with-dsymutil
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --with-dsymutil
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
@@ -1014,8 +1179,8 @@ DEF
|
||||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CFLAGS="" 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 --enable-shared --libdir=${TMP}/install/lib
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
@@ -1024,7 +1189,7 @@ OUT
|
||||
@test "custom relative install destination" {
|
||||
export PYTHON_BUILD_CACHE_PATH="$FIXTURE_ROOT"
|
||||
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
install_fixture definitions/without-checksum ./here
|
||||
assert_success
|
||||
assert [ -x ./here/bin/package ]
|
||||
@@ -1076,7 +1241,7 @@ OUT
|
||||
@test "can use PYTHON_CONFIGURE to apply a patch" {
|
||||
cached_tarball "Python-3.6.2"
|
||||
|
||||
executable "${TMP}/custom-configure" <<CONF
|
||||
executable "${BATS_TEST_TMPDIR}/custom-configure" <<CONF
|
||||
#!$BASH
|
||||
apply -p1 -i /my/patch.diff
|
||||
exec ./configure "\$@"
|
||||
@@ -1086,7 +1251,7 @@ CONF
|
||||
stub apply 'echo apply "$@" >> build.log'
|
||||
stub_make_install
|
||||
|
||||
export PYTHON_CONFIGURE="${TMP}/custom-configure"
|
||||
export PYTHON_CONFIGURE="${BATS_TEST_TMPDIR}/custom-configure"
|
||||
run_inline_definition <<DEF
|
||||
install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2.tar.gz"
|
||||
DEF
|
||||
@@ -1098,7 +1263,7 @@ DEF
|
||||
|
||||
assert_build_log <<OUT
|
||||
apply -p1 -i /my/patch.diff
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: CFLAGS="" CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib" PKG_CONFIG_PATH=""
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -1119,22 +1284,22 @@ OUT
|
||||
assert_success "hello world"
|
||||
}
|
||||
|
||||
@test "non-writable TMPDIR aborts build" {
|
||||
export TMPDIR="${TMP}/build"
|
||||
@test "non-writable BATS_TEST_TMPDIRDIR aborts build" {
|
||||
export TMPDIR="${BATS_TEST_TMPDIR}/build"
|
||||
mkdir -p "$TMPDIR"
|
||||
chmod -w "$TMPDIR"
|
||||
|
||||
touch "${TMP}/build-definition"
|
||||
run python-build "${TMP}/build-definition" "$INSTALL_ROOT"
|
||||
touch "${BATS_TEST_TMPDIR}/build-definition"
|
||||
run python-build "${BATS_TEST_TMPDIR}/build-definition" "$INSTALL_ROOT"
|
||||
assert_failure "python-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
||||
}
|
||||
|
||||
@test "non-executable TMPDIR aborts build" {
|
||||
export TMPDIR="${TMP}/build"
|
||||
export TMPDIR="${BATS_TEST_TMPDIR}/build"
|
||||
mkdir -p "$TMPDIR"
|
||||
chmod -x "$TMPDIR"
|
||||
|
||||
touch "${TMP}/build-definition"
|
||||
run python-build "${TMP}/build-definition" "$INSTALL_ROOT"
|
||||
touch "${BATS_TEST_TMPDIR}/build-definition"
|
||||
run python-build "${BATS_TEST_TMPDIR}/build-definition" "$INSTALL_ROOT"
|
||||
assert_failure "python-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH="$TMP/cache"
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH="$BATS_TEST_TMPDIR/cache"
|
||||
mkdir "$PYTHON_BUILD_CACHE_PATH"
|
||||
}
|
||||
|
||||
@@ -77,7 +76,7 @@ setup() {
|
||||
@test "nonexistent cache directory is ignored" {
|
||||
stub curl "-q -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$3"
|
||||
|
||||
export PYTHON_BUILD_CACHE_PATH="${TMP}/nonexistent"
|
||||
export PYTHON_BUILD_CACHE_PATH="${BATS_TEST_TMPDIR}/nonexistent"
|
||||
|
||||
install_fixture definitions/without-checksum
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ export PYTHON_BUILD_CACHE_PATH=
|
||||
stub wget false
|
||||
|
||||
export -n PYTHON_BUILD_CACHE_PATH
|
||||
export PYTHON_BUILD_BUILD_PATH="${TMP}/build"
|
||||
export PYTHON_BUILD_BUILD_PATH="${BATS_TEST_TMPDIR}/build"
|
||||
|
||||
mkdir -p "$PYTHON_BUILD_BUILD_PATH"
|
||||
ln -s "${FIXTURE_ROOT}/package-1.0.0.tar.gz" "$PYTHON_BUILD_BUILD_PATH"
|
||||
@@ -128,7 +128,7 @@ DEF
|
||||
stub curl "-q -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$3"
|
||||
|
||||
export -n PYTHON_BUILD_CACHE_PATH
|
||||
export PYTHON_BUILD_BUILD_PATH="${TMP}/build"
|
||||
export PYTHON_BUILD_BUILD_PATH="${BATS_TEST_TMPDIR}/build"
|
||||
|
||||
mkdir -p "$PYTHON_BUILD_BUILD_PATH"
|
||||
touch "${PYTHON_BUILD_BUILD_PATH}/package-1.0.0.tar.gz"
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export MAKE=make
|
||||
export MAKE_OPTS='-j 2'
|
||||
export -n CFLAGS
|
||||
export -n CC
|
||||
export -n PYTHON_CONFIGURE_OPTS
|
||||
_setup() {
|
||||
export MAKE=make
|
||||
export MAKE_OPTS='-j 2'
|
||||
export -n CFLAGS
|
||||
export -n CC
|
||||
export -n PYTHON_CONFIGURE_OPTS
|
||||
}
|
||||
|
||||
@test "require_gcc on OS X 10.9" {
|
||||
|
||||
@@ -21,7 +23,7 @@ echo MACOSX_DEPLOYMENT_TARGET=\${MACOSX_DEPLOYMENT_TARGET-no}
|
||||
DEF
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
CC=${TMP}/bin/gcc
|
||||
CC=${BATS_TEST_TMPDIR}/bin/gcc
|
||||
MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
OUT
|
||||
|
||||
@@ -48,7 +50,7 @@ DEF
|
||||
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
CC=${TMP}/bin/gcc
|
||||
CC=${BATS_TEST_TMPDIR}/bin/gcc
|
||||
MACOSX_DEPLOYMENT_TARGET=10.10
|
||||
OUT
|
||||
}
|
||||
@@ -60,7 +62,7 @@ OUT
|
||||
require_gcc
|
||||
echo \$CC
|
||||
DEF
|
||||
assert_success "${TMP}/bin/gcc"
|
||||
assert_success "${BATS_TEST_TMPDIR}/bin/gcc"
|
||||
|
||||
unstub gcc
|
||||
}
|
||||
@@ -92,7 +94,7 @@ build_package_standard python
|
||||
DEF
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
./configure --prefix=$INSTALL_ROOT --enable-shared --libdir=${TMP}/install/lib
|
||||
./configure --prefix=$INSTALL_ROOT --enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib
|
||||
CC=clang
|
||||
CFLAGS=no
|
||||
make -j 2
|
||||
@@ -120,6 +122,6 @@ DEF
|
||||
|
||||
assert_success
|
||||
assert_output <<OUT
|
||||
CFLAGS_EXTRA=-DMICROPY_PY_SYS_PATH_DEFAULT='".frozen:${TMP}/install/lib/micropython"' -Wno-floating-conversion
|
||||
CFLAGS_EXTRA=-DMICROPY_PY_SYS_PATH_DEFAULT='".frozen:${BATS_TEST_TMPDIR}/install/lib/micropython"' -Wno-floating-conversion
|
||||
OUT
|
||||
}
|
||||
|
||||
@@ -12,14 +12,14 @@ NUM_DEFINITIONS="$(find "$BATS_TEST_DIRNAME"/../share/python-build -maxdepth 1 -
|
||||
}
|
||||
|
||||
@test "custom PYTHON_BUILD_ROOT: nonexistent" {
|
||||
export PYTHON_BUILD_ROOT="$TMP"
|
||||
export PYTHON_BUILD_ROOT="$BATS_TEST_TMPDIR"
|
||||
refute [ -e "${PYTHON_BUILD_ROOT}/share/python-build" ]
|
||||
run python-build --definitions
|
||||
assert_success ""
|
||||
}
|
||||
|
||||
@test "custom PYTHON_BUILD_ROOT: single definition" {
|
||||
export PYTHON_BUILD_ROOT="$TMP"
|
||||
export PYTHON_BUILD_ROOT="$BATS_TEST_TMPDIR"
|
||||
mkdir -p "${PYTHON_BUILD_ROOT}/share/python-build"
|
||||
touch "${PYTHON_BUILD_ROOT}/share/python-build/2.7.8-test"
|
||||
run python-build --definitions
|
||||
@@ -27,7 +27,7 @@ NUM_DEFINITIONS="$(find "$BATS_TEST_DIRNAME"/../share/python-build -maxdepth 1 -
|
||||
}
|
||||
|
||||
@test "one path via PYTHON_BUILD_DEFINITIONS" {
|
||||
export PYTHON_BUILD_DEFINITIONS="${TMP}/definitions"
|
||||
export PYTHON_BUILD_DEFINITIONS="${BATS_TEST_TMPDIR}/definitions"
|
||||
mkdir -p "$PYTHON_BUILD_DEFINITIONS"
|
||||
touch "${PYTHON_BUILD_DEFINITIONS}/2.7.8-test"
|
||||
run python-build --definitions
|
||||
@@ -37,11 +37,11 @@ NUM_DEFINITIONS="$(find "$BATS_TEST_DIRNAME"/../share/python-build -maxdepth 1 -
|
||||
}
|
||||
|
||||
@test "multiple paths via PYTHON_BUILD_DEFINITIONS" {
|
||||
export PYTHON_BUILD_DEFINITIONS="${TMP}/definitions:${TMP}/other"
|
||||
mkdir -p "${TMP}/definitions"
|
||||
touch "${TMP}/definitions/2.7.8-test"
|
||||
mkdir -p "${TMP}/other"
|
||||
touch "${TMP}/other/3.4.2-test"
|
||||
export PYTHON_BUILD_DEFINITIONS="${BATS_TEST_TMPDIR}/definitions:${BATS_TEST_TMPDIR}/other"
|
||||
mkdir -p "${BATS_TEST_TMPDIR}/definitions"
|
||||
touch "${BATS_TEST_TMPDIR}/definitions/2.7.8-test"
|
||||
mkdir -p "${BATS_TEST_TMPDIR}/other"
|
||||
touch "${BATS_TEST_TMPDIR}/other/3.4.2-test"
|
||||
run python-build --definitions
|
||||
assert_success
|
||||
assert_output_contains "2.7.8-test"
|
||||
@@ -50,23 +50,23 @@ NUM_DEFINITIONS="$(find "$BATS_TEST_DIRNAME"/../share/python-build -maxdepth 1 -
|
||||
}
|
||||
|
||||
@test "installing definition from PYTHON_BUILD_DEFINITIONS by priority" {
|
||||
export PYTHON_BUILD_DEFINITIONS="${TMP}/definitions:${TMP}/other"
|
||||
mkdir -p "${TMP}/definitions"
|
||||
echo true > "${TMP}/definitions/2.7.8-test"
|
||||
mkdir -p "${TMP}/other"
|
||||
echo false > "${TMP}/other/2.7.8-test"
|
||||
run python-build "2.7.8-test" "${TMP}/install"
|
||||
export PYTHON_BUILD_DEFINITIONS="${BATS_TEST_TMPDIR}/definitions:${BATS_TEST_TMPDIR}/other"
|
||||
mkdir -p "${BATS_TEST_TMPDIR}/definitions"
|
||||
echo true > "${BATS_TEST_TMPDIR}/definitions/2.7.8-test"
|
||||
mkdir -p "${BATS_TEST_TMPDIR}/other"
|
||||
echo false > "${BATS_TEST_TMPDIR}/other/2.7.8-test"
|
||||
run python-build "2.7.8-test" "${BATS_TEST_TMPDIR}/install"
|
||||
assert_success ""
|
||||
}
|
||||
|
||||
@test "installing nonexistent definition" {
|
||||
run python-build "nonexistent" "${TMP}/install"
|
||||
run python-build "nonexistent" "${BATS_TEST_TMPDIR}/install"
|
||||
assert [ "$status" -eq 2 ]
|
||||
assert_output "python-build: definition not found: nonexistent"
|
||||
}
|
||||
|
||||
@test "sorting Python versions" {
|
||||
export PYTHON_BUILD_ROOT="$TMP"
|
||||
export PYTHON_BUILD_ROOT="$BATS_TEST_TMPDIR"
|
||||
mkdir -p "${PYTHON_BUILD_ROOT}/share/python-build"
|
||||
expected="2.7-dev
|
||||
2.7
|
||||
@@ -87,15 +87,15 @@ jython-2.5.4-rc1
|
||||
jython-2.7-beta1
|
||||
jython-2.7-beta2
|
||||
jython-2.7-beta3"
|
||||
for ver in "$expected"; do
|
||||
while IFS=$'\n' read -r ver; do
|
||||
touch "${PYTHON_BUILD_ROOT}/share/python-build/$ver"
|
||||
done
|
||||
done <<<"$expected"
|
||||
run python-build --definitions
|
||||
assert_success "$expected"
|
||||
}
|
||||
|
||||
@test "removing duplicate Python versions" {
|
||||
export PYTHON_BUILD_ROOT="$TMP"
|
||||
export PYTHON_BUILD_ROOT="$BATS_TEST_TMPDIR"
|
||||
export PYTHON_BUILD_DEFINITIONS="${PYTHON_BUILD_ROOT}/share/python-build"
|
||||
mkdir -p "$PYTHON_BUILD_DEFINITIONS"
|
||||
touch "${PYTHON_BUILD_DEFINITIONS}/2.7.8"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
|
||||
setup() {
|
||||
export PYTHON_BUILD_BUILD_PATH="${TMP}/source"
|
||||
_setup() {
|
||||
export PYTHON_BUILD_SKIP_MIRROR=1
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
export PYTHON_BUILD_BUILD_PATH="${BATS_TEST_TMPDIR}/source"
|
||||
mkdir -p "${PYTHON_BUILD_BUILD_PATH}"
|
||||
}
|
||||
|
||||
@@ -29,7 +28,7 @@ setup() {
|
||||
Downloading package-1.0.0.tar.gz...
|
||||
-> http://example.com/packages/package-1.0.0.tar.gz
|
||||
Installing package-1.0.0...
|
||||
Installed package-1.0.0 to ${TMP}/install
|
||||
Installed package-1.0.0 to ${BATS_TEST_TMPDIR}/install
|
||||
OUT
|
||||
unstub aria2c
|
||||
}
|
||||
@@ -44,7 +43,7 @@ DEF
|
||||
assert_output <<OUT
|
||||
Cloning http://example.com/packages/package.git...
|
||||
Installing package-dev...
|
||||
Installed package-dev to ${TMP}/install
|
||||
Installed package-dev to ${BATS_TEST_TMPDIR}/install
|
||||
OUT
|
||||
unstub git
|
||||
}
|
||||
@@ -62,7 +61,7 @@ DEF
|
||||
assert_output <<OUT
|
||||
Cloning http://example.com/packages/package.git...
|
||||
Installing package-dev...
|
||||
Installed package-dev to ${TMP}/install
|
||||
Installed package-dev to ${BATS_TEST_TMPDIR}/install
|
||||
OUT
|
||||
unstub git
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
export PYENV_ROOT="${TMP}/pyenv"
|
||||
export HOOK_PATH="${TMP}/i has hooks"
|
||||
_setup() {
|
||||
export PYENV_ROOT="${BATS_TEST_TMPDIR}/pyenv"
|
||||
export HOOK_PATH="${BATS_TEST_TMPDIR}/i has hooks"
|
||||
mkdir -p "$HOOK_PATH"
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ OUT
|
||||
stub pyenv-hooks "install : echo '$HOOK_PATH'/install.bash"
|
||||
stub pyenv-rehash "echo rehashed"
|
||||
|
||||
definition="${TMP}/3.6.2"
|
||||
definition="${BATS_TEST_TMPDIR}/3.6.2"
|
||||
stub pyenv-latest "echo $definition"
|
||||
|
||||
cat > "$definition" <<<"echo python-build"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
load test_helper
|
||||
|
||||
@test "installs python-build into PREFIX" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
|
||||
assert_success ""
|
||||
|
||||
@@ -18,7 +18,7 @@ load test_helper
|
||||
}
|
||||
|
||||
@test "build definitions don't have the executable bit" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
|
||||
assert_success ""
|
||||
|
||||
@@ -30,7 +30,7 @@ OUT
|
||||
}
|
||||
|
||||
@test "overwrites old installation" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
mkdir -p bin share/python-build
|
||||
touch bin/python-build
|
||||
touch share/python-build/2.7.2
|
||||
@@ -44,7 +44,7 @@ OUT
|
||||
}
|
||||
|
||||
@test "unrelated files are untouched" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
mkdir -p bin share/bananas
|
||||
chmod g-w bin
|
||||
touch bin/bananas
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export PYTHON_BUILD_SKIP_MIRROR=
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
export PYTHON_BUILD_MIRROR_URL=http://mirror.example.com
|
||||
|
||||
_setup() {
|
||||
export PYTHON_BUILD_SKIP_MIRROR=
|
||||
export PYTHON_BUILD_CACHE_PATH=
|
||||
export PYTHON_BUILD_MIRROR_URL=http://mirror.example.com
|
||||
}
|
||||
|
||||
@test "package URL without checksum bypasses mirror" {
|
||||
stub shasum true
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export PYENV_ROOT="${TMP}/pyenv"
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
export PYENV_ROOT="${BATS_TEST_TMPDIR}/pyenv"
|
||||
stub pyenv-hooks 'install : true'
|
||||
stub pyenv-rehash true
|
||||
}
|
||||
@@ -39,8 +39,8 @@ stub_python_build() {
|
||||
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
|
||||
python-build 3.4.1 ${BATS_TEST_TMPDIR}/pyenv/versions/3.4.1
|
||||
python-build 3.4.2 ${BATS_TEST_TMPDIR}/pyenv/versions/3.4.2
|
||||
OUT
|
||||
|
||||
unstub python-build
|
||||
@@ -54,7 +54,7 @@ OUT
|
||||
run pyenv-install 3.4.1 3.4.2
|
||||
assert_failure
|
||||
assert_output <<OUT
|
||||
fail: python-build 3.4.1 ${TMP}/pyenv/versions/3.4.1
|
||||
fail: python-build 3.4.1 ${BATS_TEST_TMPDIR}/pyenv/versions/3.4.1
|
||||
OUT
|
||||
|
||||
unstub python-build
|
||||
@@ -293,10 +293,11 @@ OUT
|
||||
}
|
||||
|
||||
@test "invalid arguments for pyenv-uninstall" {
|
||||
bats_require_minimum_version 1.5.0
|
||||
mkdir -p "${PYENV_ROOT}/versions/3.10.3"
|
||||
mkdir -p "${PYENV_ROOT}/versions/3.10.4"
|
||||
|
||||
run pyenv-uninstall -f 3.10.3 --invalid-option 3.10.4
|
||||
run -127 pyenv-uninstall -f 3.10.3 --invalid-option 3.10.4
|
||||
assert_failure
|
||||
|
||||
assert [ -d "${PYENV_ROOT}/versions/3.10.3" ]
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
export PYTHON_BUILD_CACHE_PATH="$TMP/cache"
|
||||
export MAKE=make
|
||||
export MAKE_OPTS="-j 2"
|
||||
export CC=cc
|
||||
export PYTHON_BUILD_HTTP_CLIENT="curl"
|
||||
|
||||
export TMP_FIXTURES="$TMP/fixtures"
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
export PYTHON_BUILD_CACHE_PATH="$BATS_TEST_TMPDIR/cache"
|
||||
export MAKE=make
|
||||
export MAKE_OPTS="-j 2"
|
||||
export CC=cc
|
||||
export PYTHON_BUILD_HTTP_CLIENT="curl"
|
||||
export TMP_FIXTURES="$BATS_TEST_TMPDIR/fixtures"
|
||||
mkdir -p "$INSTALL_ROOT"
|
||||
stub md5 false
|
||||
stub curl false
|
||||
@@ -100,7 +99,7 @@ run_inline_definition_with_name() {
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
local definition="${TMP}/${definition_name}"
|
||||
local definition="${BATS_TEST_TMPDIR}/${definition_name}"
|
||||
cat > "$definition"
|
||||
run python-build "$definition" "${1:-$INSTALL_ROOT}"
|
||||
}
|
||||
@@ -118,12 +117,12 @@ run_inline_definition_with_name() {
|
||||
stub uname '-s : echo Linux'
|
||||
stub uname '-s : echo Linux'
|
||||
|
||||
TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
TMPDIR="$BATS_TEST_TMPDIR" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
patch -p0 --force -i $TMP/python-patch.XXX
|
||||
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
|
||||
patch -p0 --force -i $BATS_TEST_TMPDIR/python-patch.XXX
|
||||
Python-3.6.2: CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -146,14 +145,14 @@ OUT
|
||||
|
||||
stub uname '-s : echo Linux'
|
||||
|
||||
TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
TMPDIR="$BATS_TEST_TMPDIR" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
patch: bar
|
||||
patch: baz
|
||||
patch: foo
|
||||
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
|
||||
Python-3.6.2: CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
@@ -173,11 +172,11 @@ OUT
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
|
||||
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$BATS_TEST_TMPDIR" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
|
||||
Python-3.6.2: CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make altinstall
|
||||
@@ -194,7 +193,7 @@ echo "python \$@" >> "${INSTALL_ROOT}/build.log"
|
||||
OUT
|
||||
chmod +x "${INSTALL_ROOT}/bin/python"
|
||||
|
||||
PYTHON_MAKE_INSTALL_TARGET="" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
PYTHON_MAKE_INSTALL_TARGET="" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
build_package_ensurepip
|
||||
OUT
|
||||
assert_success
|
||||
@@ -212,7 +211,7 @@ echo "python \$@" >> "${INSTALL_ROOT}/build.log"
|
||||
OUT
|
||||
chmod +x "${INSTALL_ROOT}/bin/python"
|
||||
|
||||
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
PYTHON_MAKE_INSTALL_TARGET="altinstall" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
build_package_ensurepip
|
||||
OUT
|
||||
assert_success
|
||||
@@ -233,7 +232,7 @@ OUT
|
||||
touch "${INSTALL_ROOT}/bin/python3.4-config"
|
||||
chmod +x "${INSTALL_ROOT}/bin/python3.4-config"
|
||||
|
||||
TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
verify_python python3.4
|
||||
OUT
|
||||
assert_success
|
||||
@@ -256,7 +255,7 @@ OUT
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 10.10'
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
PYTHON_CONFIGURE_OPTS="--enable-framework" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
|
||||
echo "PYTHON_CONFIGURE_OPTS=(\${PYTHON_CONFIGURE_OPTS})"
|
||||
echo "CONFIGURE_OPTS=(\${CONFIGURE_OPTS})"
|
||||
@@ -264,7 +263,7 @@ verify_python python3.4
|
||||
OUT
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${TMP}/install/lib --enable-framework=${TMP}/install/Library/Frameworks)
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--libdir=${BATS_TEST_TMPDIR}/install/lib --enable-framework=${BATS_TEST_TMPDIR}/install/Library/Frameworks)
|
||||
PYTHON_CONFIGURE_OPTS=()
|
||||
CONFIGURE_OPTS=()
|
||||
EOS
|
||||
@@ -279,14 +278,14 @@ EOS
|
||||
stub sw_vers '-productVersion : echo 10.10'
|
||||
stub arch "echo x86_64"
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
|
||||
echo "PYTHON_CONFIGURE_OPTS=(\${PYTHON_CONFIGURE_OPTS})"
|
||||
echo "CONFIGURE_OPTS=(\${CONFIGURE_OPTS})"
|
||||
OUT
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${TMP}/install/lib --enable-universalsdk=/)
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --enable-universalsdk=/)
|
||||
PYTHON_CONFIGURE_OPTS=()
|
||||
CONFIGURE_OPTS=()
|
||||
EOS
|
||||
@@ -298,14 +297,14 @@ EOS
|
||||
stub sw_vers '-productVersion : echo 11.7'
|
||||
stub arch "echo arm64"
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
|
||||
echo "PYTHON_CONFIGURE_OPTS=(\${PYTHON_CONFIGURE_OPTS})"
|
||||
echo "CONFIGURE_OPTS=(\${CONFIGURE_OPTS})"
|
||||
OUT
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${TMP}/install/lib --enable-universalsdk=/ --with-universal-archs=universal2)
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --enable-universalsdk=/ --with-universal-archs=universal2)
|
||||
PYTHON_CONFIGURE_OPTS=()
|
||||
CONFIGURE_OPTS=()
|
||||
EOS
|
||||
@@ -316,12 +315,12 @@ EOS
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 11.7'
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk --with-universal-archs=foo" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
PYTHON_CONFIGURE_OPTS="--enable-universalsdk --with-universal-archs=foo" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
echo "PYTHON_CONFIGURE_OPTS_ARRAY=(\${PYTHON_CONFIGURE_OPTS_ARRAY[@]})"
|
||||
OUT
|
||||
assert_success
|
||||
assert_output <<EOS
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${TMP}/install/lib --enable-universalsdk=/)
|
||||
PYTHON_CONFIGURE_OPTS_ARRAY=(--enable-shared --libdir=${BATS_TEST_TMPDIR}/install/lib --enable-universalsdk=/)
|
||||
EOS
|
||||
}
|
||||
|
||||
@@ -334,11 +333,11 @@ EOS
|
||||
" : echo \"$MAKE \$@\" >> build.log" \
|
||||
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
|
||||
|
||||
PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs2" TMPDIR="$TMP" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs2" TMPDIR="$BATS_TEST_TMPDIR" install_tmp_fixture definitions/vanilla-python < /dev/null
|
||||
assert_success
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
|
||||
Python-3.6.2: CPPFLAGS="-I${BATS_TEST_TMPDIR}/install/include" LDFLAGS="-L${BATS_TEST_TMPDIR}/install/lib -Wl,-rpath,${BATS_TEST_TMPDIR}/install/lib"
|
||||
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs2
|
||||
make -j 2
|
||||
make install
|
||||
@@ -353,7 +352,7 @@ OUT
|
||||
stub uname '-s : echo Darwin'
|
||||
stub sw_vers '-productVersion : echo 10.10'
|
||||
|
||||
TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
echo "\${MACOSX_DEPLOYMENT_TARGET}"
|
||||
OUT
|
||||
assert_success
|
||||
@@ -366,7 +365,7 @@ OUT
|
||||
|
||||
stub uname '-s : echo Darwin'
|
||||
|
||||
MACOSX_DEPLOYMENT_TARGET="10.4" TMPDIR="$TMP" run_inline_definition <<OUT
|
||||
MACOSX_DEPLOYMENT_TARGET="10.4" TMPDIR="$BATS_TEST_TMPDIR" run_inline_definition <<OUT
|
||||
echo "\${MACOSX_DEPLOYMENT_TARGET}"
|
||||
OUT
|
||||
assert_success
|
||||
|
||||
@@ -4,7 +4,6 @@ set -e
|
||||
status=0
|
||||
program="${0##*/}"
|
||||
PROGRAM="$(echo "$program" | tr a-z- A-Z_)"
|
||||
[ -n "$TMPDIR" ] || TMPDIR="/tmp"
|
||||
|
||||
_STUB_PLAN="${PROGRAM}_STUB_PLAN"
|
||||
_STUB_RUN="${PROGRAM}_STUB_RUN"
|
||||
@@ -13,11 +12,11 @@ _STUB_RESULT="${PROGRAM}_STUB_RESULT"
|
||||
_STUB_END="${PROGRAM}_STUB_END"
|
||||
_STUB_LOG="${PROGRAM}_STUB_LOG"
|
||||
|
||||
[ -n "${!_STUB_LOG}" ] || eval "${_STUB_LOG}"="${TMPDIR}/${program}-stub-log"
|
||||
[ -n "${!_STUB_LOG}" ] || eval "${_STUB_LOG}"="${BATS_TEST_TMPDIR}/${program}-stub-log"
|
||||
if test -z "${!_STUB_END}"; then echo "$program" "$@" >>"${!_STUB_LOG}"; fi
|
||||
|
||||
[ -e "${!_STUB_PLAN}" ] || exit 1
|
||||
[ -n "${!_STUB_RUN}" ] || eval "${_STUB_RUN}"="${TMPDIR}/${program}-stub-run"
|
||||
[ -n "${!_STUB_RUN}" ] || eval "${_STUB_RUN}"="${BATS_TEST_TMPDIR}/${program}-stub-run"
|
||||
|
||||
|
||||
# Initialize or load the stub run information.
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
export TMP="$BATS_TEST_DIRNAME/tmp"
|
||||
export PYTHON_BUILD_CURL_OPTS=
|
||||
export PYTHON_BUILD_HTTP_CLIENT="curl"
|
||||
setup() {
|
||||
export PYTHON_BUILD_CURL_OPTS=
|
||||
export PYTHON_BUILD_HTTP_CLIENT="curl"
|
||||
|
||||
if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then
|
||||
export FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures"
|
||||
export INSTALL_ROOT="$TMP/install"
|
||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
if [ "FreeBSD" = "$(uname -s)" ]; then
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
fi
|
||||
PATH="$BATS_TEST_DIRNAME/../bin:$PATH"
|
||||
PATH="$TMP/bin:$PATH"
|
||||
export FIXTURE_ROOT="${BATS_TEST_DIRNAME}/fixtures"
|
||||
export INSTALL_ROOT="${BATS_TEST_TMPDIR}/install"
|
||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
PATH="${BATS_TEST_DIRNAME}/../bin:$PATH"
|
||||
PATH="${BATS_TEST_TMPDIR}/bin:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
|
||||
teardown() {
|
||||
rm -fr "${TMP:?}"/*
|
||||
# If test specific setup exist, run it
|
||||
if [[ $(type -t _setup) == function ]];then
|
||||
_setup
|
||||
fi
|
||||
}
|
||||
|
||||
stub() {
|
||||
@@ -23,22 +20,22 @@ stub() {
|
||||
local prefix="$(echo "$program" | tr a-z- A-Z_)"
|
||||
shift
|
||||
|
||||
export "${prefix}_STUB_PLAN"="${TMP}/${program}-stub-plan"
|
||||
export "${prefix}_STUB_RUN"="${TMP}/${program}-stub-run"
|
||||
export "${prefix}_STUB_LOG"="${TMP}/${program}-stub-log"
|
||||
export "${prefix}_STUB_PLAN"="${BATS_TEST_TMPDIR}/${program}-stub-plan"
|
||||
export "${prefix}_STUB_RUN"="${BATS_TEST_TMPDIR}/${program}-stub-run"
|
||||
export "${prefix}_STUB_LOG"="${BATS_TEST_TMPDIR}/${program}-stub-log"
|
||||
export "${prefix}_STUB_END"=
|
||||
|
||||
mkdir -p "${TMP}/bin"
|
||||
ln -sf "${BATS_TEST_DIRNAME}/stubs/stub" "${TMP}/bin/${program}"
|
||||
mkdir -p "${BATS_TEST_TMPDIR}/bin"
|
||||
cp "${BATS_TEST_DIRNAME}/stubs/stub" "${BATS_TEST_TMPDIR}/bin/${program}"
|
||||
|
||||
touch "${TMP}/${program}-stub-plan"
|
||||
for arg in "$@"; do printf "%s\n" "$arg" >> "${TMP}/${program}-stub-plan"; done
|
||||
touch "${BATS_TEST_TMPDIR}/${program}-stub-plan"
|
||||
for arg in "$@"; do printf "%s\n" "$arg" >> "${BATS_TEST_TMPDIR}/${program}-stub-plan"; done
|
||||
}
|
||||
|
||||
unstub() {
|
||||
local program="$1"
|
||||
local prefix="$(echo "$program" | tr a-z- A-Z_)"
|
||||
local path="${TMP}/bin/${program}"
|
||||
local path="${BATS_TEST_TMPDIR}/bin/${program}"
|
||||
|
||||
export "${prefix}_STUB_END"=1
|
||||
|
||||
@@ -46,12 +43,12 @@ unstub() {
|
||||
"$path" || STATUS="$?"
|
||||
|
||||
rm -f "$path"
|
||||
rm -f "${TMP}/${program}-stub-plan" "${TMP}/${program}-stub-run"
|
||||
rm -f "${BATS_TEST_TMPDIR}/${program}-stub-plan" "${BATS_TEST_TMPDIR}/${program}-stub-run"
|
||||
return "$STATUS"
|
||||
}
|
||||
|
||||
run_inline_definition() {
|
||||
local definition="${TMP}/build-definition"
|
||||
local definition="${BATS_TEST_TMPDIR}/build-definition"
|
||||
cat > "$definition"
|
||||
run python-build "$definition" "${1:-$INSTALL_ROOT}"
|
||||
}
|
||||
@@ -87,7 +84,7 @@ flunk() {
|
||||
{ if [ "$#" -eq 0 ]; then cat -
|
||||
else echo "$@"
|
||||
fi
|
||||
} | sed "s:${TMP}:\${TMP}:g" >&2
|
||||
} | sed "s:${BATS_TEST_TMPDIR}:\${BATS_TEST_TMPDIR}:g" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
bats_bin="${BATS_TEST_DIRNAME}/../bin/python-build"
|
||||
static_version="$(grep VERSION "$bats_bin" | head -n1 | cut -d'"' -f 2)"
|
||||
python_build_bin="${BATS_TEST_DIRNAME}/../bin/python-build"
|
||||
static_version="$(grep VERSION "$python_build_bin" | head -n1 | cut -d'"' -f 2)"
|
||||
|
||||
@test "python-build static version" {
|
||||
stub git 'echo "ASPLODE" >&2; exit 1'
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
PYENV_PIP_REHASH_ROOT="${BASH_SOURCE[0]%/*}/pip-rehash"
|
||||
PYENV_REHASH_COMMAND="${PYENV_COMMAND##*/}"
|
||||
|
||||
# Remove any version information, from e.g. "pip2" or "pip3.4".
|
||||
if [[ $PYENV_REHASH_COMMAND =~ ^(pip|easy_install)[23](\.\d)?$ ]]; then
|
||||
# Remove any version information, from e.g. "pip2" or "pip3.10".
|
||||
if [[ $PYENV_REHASH_COMMAND =~ ^(pip|easy_install)[23](\.[0-9]+)?$ ]]; then
|
||||
PYENV_REHASH_COMMAND="${BASH_REMATCH[1]}"
|
||||
# Check for ` -m pip ` in arguments
|
||||
elif [[ "$*" =~ [[:space:]]-m[[:space:]]pip[[:space:]] ]]; then
|
||||
PYENV_REHASH_COMMAND="pip"
|
||||
fi
|
||||
|
||||
if [ -x "${PYENV_PIP_REHASH_ROOT}/${PYENV_REHASH_COMMAND}" ]; then
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
export GIT_DIR="${PYENV_TEST_DIR}/.git"
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
export GIT_DIR="${PYENV_TEST_DIR}/.git"
|
||||
mkdir -p "$HOME"
|
||||
git config --global user.name "Tester"
|
||||
git config --global user.email "tester@test.local"
|
||||
|
||||
25
test/Dockerfile
Normal file
25
test/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
ARG BASH
|
||||
|
||||
FROM alpine/git:v2.30.0 as bats
|
||||
ARG BATS_VERSION
|
||||
RUN git clone https://github.com/bats-core/bats-core.git /root/bats-core \
|
||||
&& cd /root/bats-core \
|
||||
&& git checkout "${BATS_VERSION}"
|
||||
|
||||
FROM bash:$BASH
|
||||
# Gnu tools
|
||||
RUN if [[ "${GNU:-}" == True ]];then \
|
||||
apk add sed coreutils findutils \
|
||||
;fi
|
||||
# Bats
|
||||
RUN apk add --update parallel ncurses git \
|
||||
&& mkdir -p ~/.parallel \
|
||||
&& touch ~/.parallel/will-cite
|
||||
COPY --from=bats /root/bats-core /root/bats-core
|
||||
RUN /root/bats-core/install.sh "/usr/local"
|
||||
# Clean
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
# Setup
|
||||
RUN echo 'source /etc/profile' >> ~/.bashrc
|
||||
WORKDIR /code/
|
||||
CMD ["bash"]
|
||||
76
test/README.md
Normal file
76
test/README.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# TEST
|
||||
|
||||
---
|
||||
|
||||
## Running test suite
|
||||
|
||||
Test suite could be launch with `make` by providing the right target depending what you want to achieve.
|
||||
|
||||
Under the hood, `pyenv` test suites use `bats` as a test framework and are run on the host or docker depending of the target provided to make.
|
||||
|
||||
|
||||
|
||||
### Targets
|
||||
|
||||
- `test`
|
||||
- Run the whole test suite on the local host
|
||||
- `test-docker`
|
||||
- Run the whole test suite on docker
|
||||
- Some volumes are used in read-only mode
|
||||
- `test-unit`
|
||||
- Run the unit test
|
||||
- `test-plugin`
|
||||
- Run the plugin test
|
||||
- `test-unit-docker-[BASH_VERSION]`
|
||||
- Run the unit test under **official** bash docker container (alpine/busybox) with the specified bash version if present is in the `Makefile`
|
||||
- Some volumes are used in read-only mode
|
||||
- `test-unit-docker-gnu-[BASH_VERSION]`
|
||||
- Run the unit test under **official** bash docker container (alpine/busybox), completed by **GNU Tools**, with the specified bash version if present is in the `Makefile`
|
||||
- Some volumes are used in read-only mode
|
||||
- `test-plugin-docker-[BASH_VERSION]`
|
||||
- Run the plugin test under **official** bash docker container (alpine/busybox), completed by **GNU Tools**, with the specified bash version if present is in the `Makefile`
|
||||
- Some volumes are used in read-only mode
|
||||
- `test-plugin-docker-gnu-[BASH_VERSION]`
|
||||
- Run the plugin test under **official** bash docker container (alpine/busybox), completed by **GNU Tools**, with the specified bash version if present is in the `Makefile`
|
||||
- Some volumes are used in read-only mode
|
||||
|
||||
## Targeting specific test / test file
|
||||
|
||||
By setting some environment variables, it is possible to filtering which test and/or test file who will be tested with bats
|
||||
|
||||
- `BATS_FILE_FILTER`
|
||||
|
||||
- Run test only with the specified file
|
||||
|
||||
- `BATS_TEST_FILTER`
|
||||
- Run test only who corresponding to the filter provided
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
```bash
|
||||
$ BATS_TEST_FILTER=".*installed.*" BATS_FILE_FILTER="build.bats" make test-plugin-docker-gnu-3.2.57
|
||||
build.bats
|
||||
✓ yaml is installed for python
|
||||
✓ homebrew is used in Linux if Pyenv is installed with Homebrew
|
||||
✓ homebrew is not used in Linux if Pyenv is not installed with Homebrew
|
||||
|
||||
3 tests, 0 failures
|
||||
|
||||
$ BATS_TEST_FILTER=".*installed.*" BATS_FILE_FILTER="build.bats" make test-plugin
|
||||
build.bats
|
||||
✓ yaml is installed for python
|
||||
✓ homebrew is used in Linux if Pyenv is installed with Homebrew
|
||||
✓ homebrew is not used in Linux if Pyenv is not installed with Homebrew
|
||||
|
||||
3 tests, 0 failures
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Writing test
|
||||
|
||||
To be reproducible, each test use/should use its own `TMPDIR` .
|
||||
It's achieved by using the environment variable `BATS_TEST_TMPDIR` provided by bats that is automatically deleted at the end of each test. More info [here](https://bats-core.readthedocs.io/en/stable/writing-tests.html#special-variables)
|
||||
|
||||
Another variable who could be used to source some file who need to be tested is `BATS_TEST_DIRNAME` who point to the directory in which the bats test file is located.
|
||||
@@ -8,15 +8,16 @@ create_executable() {
|
||||
bin="${PYENV_ROOT}/versions/${PYENV_VERSION}/bin"
|
||||
mkdir -p "$bin"
|
||||
{ if [ $# -eq 0 ]; then cat -
|
||||
else echo "$@"
|
||||
else printf '%s\n' "$@"
|
||||
fi
|
||||
} | sed -Ee '1s/^ +//' > "${bin}/$name"
|
||||
chmod +x "${bin}/$name"
|
||||
}
|
||||
|
||||
@test "fails with invalid version" {
|
||||
bats_require_minimum_version 1.5.0
|
||||
export PYENV_VERSION="3.4"
|
||||
run pyenv-exec nonexistent
|
||||
run -127 pyenv-exec nonexistent
|
||||
assert_failure <<EOF
|
||||
pyenv: version \`3.4' is not installed (set by PYENV_VERSION environment variable)
|
||||
pyenv: nonexistent: command not found
|
||||
@@ -24,10 +25,11 @@ EOF
|
||||
}
|
||||
|
||||
@test "fails with invalid version set from file" {
|
||||
bats_require_minimum_version 1.5.0
|
||||
mkdir -p "$PYENV_TEST_DIR"
|
||||
cd "$PYENV_TEST_DIR"
|
||||
echo 2.7 > .python-version
|
||||
run pyenv-exec nonexistent
|
||||
run -127 pyenv-exec nonexistent
|
||||
assert_failure <<EOF
|
||||
pyenv: version \`2.7' is not installed (set by $PWD/.python-version)
|
||||
pyenv: nonexistent: command not found
|
||||
@@ -85,18 +87,25 @@ OUT
|
||||
}
|
||||
|
||||
@test "sys.executable with system version (#98)" {
|
||||
system_python="$(python3 -c 'import sys; print(sys.executable)')"
|
||||
export PATH="${PYENV_ROOT}/versions/bin:${PATH}"
|
||||
create_executable "python3" <<SH
|
||||
#!$BASH
|
||||
echo system
|
||||
SH
|
||||
system_python="$(python3)"
|
||||
assert_equal "${system_python}" "system"
|
||||
|
||||
PYENV_VERSION="custom"
|
||||
create_executable "python3" ""
|
||||
unset PYENV_VERSION
|
||||
export PYENV_VERSION="custom"
|
||||
create_executable "python3" "#!/bin/sh" "echo custom"
|
||||
|
||||
pyenv-rehash
|
||||
run pyenv-exec python3 -c 'import sys; print(sys.executable)'
|
||||
assert_success "${system_python}"
|
||||
|
||||
custom_python="$(pyenv-exec python3)"
|
||||
assert_equal "${custom_python}" "custom"
|
||||
}
|
||||
|
||||
@test 'PATH is not modified with system Python' {
|
||||
export PATH="${PYENV_TEST_DIR}:${PATH}"
|
||||
# Create a wrapper executable that verifies PATH.
|
||||
PYENV_VERSION="custom"
|
||||
create_executable "python3" '[[ "$PATH" == "${PYENV_TEST_DIR}/root/versions/custom/bin:"* ]] || { echo "unexpected:$PATH"; exit 2;}'
|
||||
@@ -104,7 +113,13 @@ OUT
|
||||
pyenv-rehash
|
||||
|
||||
# Path is not modified with system Python.
|
||||
run pyenv-exec python3 -c 'import os; print(os.getenv("PATH"))'
|
||||
cat > "${PYENV_TEST_DIR}/python3" <<SH
|
||||
#!$BASH
|
||||
echo \$PATH
|
||||
SH
|
||||
chmod +x "${PYENV_TEST_DIR}/python3"
|
||||
pyenv-rehash
|
||||
run pyenv-exec python3
|
||||
assert_success "$PATH"
|
||||
|
||||
# Path is modified with custom Python.
|
||||
@@ -116,6 +131,6 @@ OUT
|
||||
assert_success
|
||||
|
||||
# Path is not modified with system:custom Python.
|
||||
PYENV_VERSION=system:custom run pyenv-exec python3 -c 'import os; print(os.getenv("PATH"))'
|
||||
PYENV_VERSION=system:custom run pyenv-exec python3
|
||||
assert_success "$PATH"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
export PATH="${PYENV_TEST_DIR}/bin:$PATH"
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
export PATH="${PYENV_TEST_DIR}/bin:$PATH"
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
mkdir -p "${PYENV_TEST_DIR}/myproject"
|
||||
cd "${PYENV_TEST_DIR}/myproject"
|
||||
}
|
||||
|
||||
67
test/pip-rehash.bats
Executable file
67
test/pip-rehash.bats
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
|
||||
create_executable() {
|
||||
local bin="${PYENV_ROOT}/versions/${PYENV_VERSION}/bin"
|
||||
mkdir -p "$bin"
|
||||
echo "#!/bin/sh" > "${bin}/$1"
|
||||
chmod +x "${bin}/$1"
|
||||
}
|
||||
|
||||
copy_src_pyenvd() {
|
||||
mkdir -p "${PYENV_ROOT}"
|
||||
cp -r "${BATS_TEST_DIRNAME}/../pyenv.d" "${PYENV_ROOT}"
|
||||
}
|
||||
|
||||
@test "pip-rehash triggered when using 'pip'" {
|
||||
export PYENV_VERSION="3.7.14"
|
||||
create_executable "example"
|
||||
create_executable "pip"
|
||||
copy_src_pyenvd
|
||||
run command -v example 2> /dev/null
|
||||
assert_failure
|
||||
run pyenv-exec pip install example
|
||||
assert_success
|
||||
run command -v example 2> /dev/null
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "pip-rehash triggered when using 'pip3'" {
|
||||
export PYENV_VERSION="3.7.14"
|
||||
create_executable "example"
|
||||
create_executable "pip3"
|
||||
copy_src_pyenvd
|
||||
run command -v example 2> /dev/null
|
||||
assert_failure
|
||||
run pyenv-exec pip3 install example
|
||||
assert_success
|
||||
run command -v example 2> /dev/null
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "pip-rehash triggered when using 'pip3.x'" {
|
||||
export PYENV_VERSION="3.7.14"
|
||||
create_executable "example"
|
||||
create_executable "pip3.7"
|
||||
copy_src_pyenvd
|
||||
run command -v example 2> /dev/null
|
||||
assert_failure
|
||||
run pyenv-exec pip3.7 install example
|
||||
assert_success
|
||||
run command -v example 2> /dev/null
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "pip-rehash triggered when using 'python -m pip install'" {
|
||||
export PYENV_VERSION="3.7.14"
|
||||
create_executable "example"
|
||||
create_executable "python"
|
||||
copy_src_pyenvd
|
||||
run command -v example 2> /dev/null
|
||||
assert_failure
|
||||
run pyenv-exec python -m pip install example
|
||||
assert_success
|
||||
run command -v example 2> /dev/null
|
||||
assert_success
|
||||
}
|
||||
@@ -20,7 +20,7 @@ load test_helper
|
||||
mkdir -p "${PYENV_TEST_DIR}/bin"
|
||||
touch "${PYENV_TEST_DIR}/bin/python"
|
||||
chmod +x "${PYENV_TEST_DIR}/bin/python"
|
||||
PYENV_VERSION="system" run pyenv-prefix
|
||||
PATH="${PYENV_TEST_DIR}/libexec:$PATH" PYENV_VERSION="system" run pyenv-prefix
|
||||
assert_success "$PYENV_TEST_DIR"
|
||||
}
|
||||
|
||||
@@ -34,15 +34,15 @@ load test_helper
|
||||
}
|
||||
|
||||
@test "prefix for system in /" {
|
||||
mkdir -p "${BATS_TEST_DIRNAME}/libexec"
|
||||
cat >"${BATS_TEST_DIRNAME}/libexec/pyenv-which" <<OUT
|
||||
mkdir -p "${PYENV_TEST_DIR}/libexec"
|
||||
cat >"${PYENV_TEST_DIR}/libexec/pyenv-which" <<OUT
|
||||
#!/bin/sh
|
||||
echo /bin/python
|
||||
OUT
|
||||
chmod +x "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
PYENV_VERSION="system" run pyenv-prefix
|
||||
chmod +x "${PYENV_TEST_DIR}/libexec/pyenv-which"
|
||||
PATH="${PYENV_TEST_DIR}/libexec:$PATH" PYENV_VERSION="system" run pyenv-prefix
|
||||
assert_success "/"
|
||||
rm -f "${BATS_TEST_DIRNAME}/libexec/pyenv-which"
|
||||
rm -f "${PYENV_TEST_DIR}/libexec/pyenv-which"
|
||||
}
|
||||
|
||||
@test "prefix for invalid system" {
|
||||
|
||||
@@ -32,14 +32,14 @@ load test_helper
|
||||
}
|
||||
|
||||
@test "inherited PYENV_DIR" {
|
||||
dir="${BATS_TMPDIR}/myproject"
|
||||
dir="${BATS_TEST_TMPDIR}/myproject"
|
||||
mkdir -p "$dir"
|
||||
PYENV_DIR="$dir" run pyenv echo PYENV_DIR
|
||||
assert_output "$dir"
|
||||
}
|
||||
|
||||
@test "invalid PYENV_DIR" {
|
||||
dir="${BATS_TMPDIR}/does-not-exist"
|
||||
dir="${BATS_TEST_TMPDIR}/does-not-exist"
|
||||
assert [ ! -d "$dir" ]
|
||||
PYENV_DIR="$dir" run pyenv echo PYENV_DIR
|
||||
assert_failure
|
||||
|
||||
2
test/run
2
test/run
@@ -6,4 +6,4 @@ if [ -n "$PYENV_NATIVE_EXT" ]; then
|
||||
make -C src
|
||||
fi
|
||||
|
||||
exec bats ${CI:+--tap} test
|
||||
exec bats ${CI:+--tap} ${BATS_TEST_FILTER:+--filter "${BATS_TEST_FILTER}"} test/${BATS_FILE_FILTER}
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
unset PYENV_VERSION
|
||||
unset PYENV_DIR
|
||||
|
||||
# guard against executing this block twice due to bats internals
|
||||
if [ -z "$PYENV_TEST_DIR" ]; then
|
||||
PYENV_TEST_DIR="${BATS_TMPDIR}/pyenv"
|
||||
export PYENV_TEST_DIR="$(mktemp -d "${PYENV_TEST_DIR}.XXX" 2>/dev/null || echo "$PYENV_TEST_DIR")"
|
||||
|
||||
if enable -f "${BATS_TEST_DIRNAME}"/../libexec/pyenv-realpath.dylib realpath 2>/dev/null; then
|
||||
export PYENV_TEST_DIR="$(realpath "$PYENV_TEST_DIR")"
|
||||
else
|
||||
setup() {
|
||||
if ! enable -f "${BATS_TEST_DIRNAME}"/../libexec/pyenv-realpath.dylib realpath 2>/dev/null; then
|
||||
if [ -n "$PYENV_NATIVE_EXT" ]; then
|
||||
echo "pyenv: failed to load \`realpath' builtin" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
local bats_test_tmpdir="$(realpath "${BATS_TEST_TMPDIR}")"
|
||||
if [ -z "${bats_test_tmpdir}" ];then
|
||||
# Use readlink if running in a container instead of realpath lib
|
||||
bats_test_tmpdir="$(readlink -f "${BATS_TEST_TMPDIR}")"
|
||||
fi
|
||||
|
||||
# update BATS_TEST_TMPDIR discover by realpath/readlink to avoid "//"
|
||||
export BATS_TEST_TMPDIR="${bats_test_tmpdir}"
|
||||
export PYENV_TEST_DIR="${BATS_TEST_TMPDIR}/pyenv"
|
||||
export PYENV_ROOT="${PYENV_TEST_DIR}/root"
|
||||
export HOME="${PYENV_TEST_DIR}/home"
|
||||
export PYENV_HOOK_PATH="${PYENV_ROOT}/pyenv.d"
|
||||
@@ -28,10 +31,11 @@ if [ -z "$PYENV_TEST_DIR" ]; then
|
||||
|
||||
for xdg_var in `env 2>/dev/null | grep ^XDG_ | cut -d= -f1`; do unset "$xdg_var"; done
|
||||
unset xdg_var
|
||||
fi
|
||||
|
||||
teardown() {
|
||||
rm -rf "$PYENV_TEST_DIR"
|
||||
# If test specific setup exist, run it
|
||||
if [[ $(type -t _setup) == function ]];then
|
||||
_setup
|
||||
fi
|
||||
}
|
||||
|
||||
flunk() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
_setup() {
|
||||
mkdir -p "${PYENV_TEST_DIR}/myproject"
|
||||
cd "${PYENV_TEST_DIR}/myproject"
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
mkdir -p "$PYENV_TEST_DIR"
|
||||
_setup() {
|
||||
mkdir -p "${PYENV_TEST_DIR}"
|
||||
cd "$PYENV_TEST_DIR"
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
mkdir -p "$PYENV_TEST_DIR"
|
||||
_setup() {
|
||||
mkdir -p "${PYENV_TEST_DIR}"
|
||||
cd "$PYENV_TEST_DIR"
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ create_version() {
|
||||
mkdir -p "${PYENV_ROOT}/versions/$1"
|
||||
}
|
||||
|
||||
setup() {
|
||||
mkdir -p "$PYENV_TEST_DIR"
|
||||
_setup() {
|
||||
mkdir -p "${PYENV_TEST_DIR}"
|
||||
cd "$PYENV_TEST_DIR"
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user