mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
e394cb898d
* Pin bats to the latest release (1.2.0) This fixes the following error when running `make test` with bats installed from its master branch: /src/bats/libexec/bats-core/bats-exec-file: line 192: bats-exec-test: command not found The Makefile currently runs bats from its master branch. This can lead to errors when bats is broken between releases, as is currently the case with bats at the following commit: bats-core/bats-core@b615ed8f75 Instead, use the latest release of bats, which is 1.2.0 (2020-04-25). * Pin bats to latest release on Travis CI
25 lines
852 B
Makefile
25 lines
852 B
Makefile
.PHONY: test test-build
|
|
|
|
# Do not pass in user flags to build tests.
|
|
unexport PYTHON_CFLAGS
|
|
unexport PYTHON_CONFIGURE_OPTS
|
|
|
|
test: bats
|
|
PATH="./bats/bin:$$PATH" test/run
|
|
cd plugins/python-build && $(PWD)/bats/bin/bats $${CI:+--tap} test
|
|
|
|
PYTHON_BUILD_ROOT := $(CURDIR)/plugins/python-build
|
|
PYTHON_BUILD_OPTS ?= --verbose
|
|
PYTHON_BUILD_VERSION ?= 3.8-dev
|
|
PYTHON_BUILD_TEST_PREFIX ?= $(PYTHON_BUILD_ROOT)/test/build/tmp/dist
|
|
|
|
test-build:
|
|
$(RM) -r $(PYTHON_BUILD_TEST_PREFIX)
|
|
$(PYTHON_BUILD_ROOT)/bin/python-build $(PYTHON_BUILD_OPTS) $(PYTHON_BUILD_VERSION) $(PYTHON_BUILD_TEST_PREFIX)
|
|
[ -e $(PYTHON_BUILD_TEST_PREFIX)/bin/python ]
|
|
$(PYTHON_BUILD_TEST_PREFIX)/bin/python -V
|
|
[ -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
|