bumpver/Makefile

80 lines
2 KiB
Makefile
Raw Normal View History

2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
PACKAGE_NAME := pycalver
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
# This is the python version that is used for:
# - `make fmt`
# - `make ipy`
# - `make lint`
# - `make devtest`
2020-08-26 22:26:30 +00:00
DEVELOPMENT_PYTHON_VERSION := python=3.8
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
# These must be valid (space separated) conda package names.
# A separate conda environment will be created for each of these.
#
# Some valid options are:
# - python=2.7
# - python=3.5
# - python=3.6
# - python=3.7
# - pypy2.7
# - pypy3.5
2020-08-26 22:26:30 +00:00
SUPPORTED_PYTHON_VERSIONS := python=2.7 python=3.5 python=3.6 python=3.8 pypy2.7 pypy3.5
2018-11-04 21:34:53 +01:00
2020-10-04 17:13:58 +00:00
include Makefile.bootstrapit.make
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
## -- Extra/Custom/Project Specific Tasks --
2018-12-05 09:42:26 +01:00
2020-05-25 07:39:01 +00:00
## Start the development http server in debug mode
## This is just to illustrate how to add your
## extra targets outside of the main makefile.
.PHONY: serve
serve:
echo "Not Implemented"
2018-12-05 09:42:26 +01:00
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
COMPAT_TEST_FILES = $(shell ls -1 test/*.py 2>/dev/null | awk '{ printf " compat_"$$0 }')
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
compat_test/%.py: test/%.py
@mkdir -p compat_test/;
$(DEV_ENV)/bin/lib3to6 $< > $@.tmp;
mv $@.tmp $@;
2018-11-04 21:34:53 +01:00
2018-12-05 09:42:26 +01:00
2020-05-25 07:39:01 +00:00
## Run pytest integration tests
.PHONY: test_compat
test_compat: $(COMPAT_TEST_FILES)
rm -rf compat_test/fixtures;
mkdir -p compat_test/fixtures;
cp -R test/fixtures compat_test/
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
# install the package and run the test suite against it.
rm -rf build/test_wheel;
mkdir -p build/test_wheel;
$(DEV_ENV_PY) setup.py bdist_wheel --dist-dir build/test_wheel;
2018-11-04 21:34:53 +01:00
2020-05-25 07:39:01 +00:00
IFS=' ' read -r -a env_pys <<< "$(CONDA_ENV_BIN_PYTHON_PATHS)"; \
for i in $${!env_pys[@]}; do \
env_py=$${env_pys[i]}; \
$${env_py} -m pip install --upgrade build/test_wheel/*.whl; \
ENABLE_BACKTRACE=0 PYTHONPATH="" ENV=$${ENV-dev} \
$${env_py} -m pytest --verbose compat_test/; \
done;
2020-09-06 20:20:36 +00:00
rm -rf compat_test/
2020-09-24 19:22:18 +00:00
2020-10-04 17:13:41 +00:00
pycalver_deps.svg:
2020-09-24 19:22:18 +00:00
pydeps src/pycalver \
--no-show --noise-level 3 \
--reverse --include-missing \
-x 'click.*' 'toml.*' 'pretty_traceback.*' \
-o pycalver_deps.svg
2020-10-09 22:11:55 +00:00
## Update cli reference in README.md
README.md: src/pycalver/__main__.py scripts/update_readme_examples.py Makefile
@git add README.md
2020-10-09 22:11:55 +00:00
@$(DEV_ENV)/bin/python scripts/update_readme_examples.py