2015-12-11 18:44:23 +00:00
|
|
|
# Compatibility for us old-timers.
|
|
|
|
|
|
|
|
# Note: This makefile include remake-style target comments.
|
|
|
|
# These comments before the targets start with #:
|
|
|
|
# remake --tasks to shows the targets and the comments
|
|
|
|
|
|
|
|
GIT2CL ?= git2cl
|
|
|
|
PYTHON ?= python
|
|
|
|
PYTHON3 ?= python3
|
|
|
|
RM ?= rm
|
|
|
|
LINT = flake8
|
|
|
|
|
|
|
|
#EXTRA_DIST=ipython/ipy_trepan.py trepan
|
2021-11-23 21:38:30 +00:00
|
|
|
PHONY=all check check-2.7 check-3.4 \
|
|
|
|
clean distcheck pytest check-long check-short \
|
|
|
|
dist distclean lint flake8 test rmChangeLog clean_pyc \
|
|
|
|
2.6 5.0 5.3 5.6 5.8 7.2 7.3 check-short
|
2015-12-20 17:07:49 +00:00
|
|
|
|
|
|
|
TEST_TYPES=check-long check-short check-2.7 check-3.4
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Default target - same as "check"
|
|
|
|
all: check
|
|
|
|
|
2015-12-26 15:19:26 +00:00
|
|
|
# Run all tests
|
|
|
|
check:
|
|
|
|
@PYTHON_VERSION=`$(PYTHON) -V 2>&1 | cut -d ' ' -f 2 | cut -d'.' -f1,2`; \
|
|
|
|
$(MAKE) check-$$PYTHON_VERSION
|
|
|
|
|
2016-05-17 08:00:54 +00:00
|
|
|
# Run all quick tests
|
|
|
|
check-short: pytest
|
|
|
|
$(MAKE) -C test check-short
|
|
|
|
|
2018-04-03 15:08:22 +00:00
|
|
|
# Note for 2.6 use <=3.0.1 see requirements-dev.txt
|
2016-05-16 17:48:00 +00:00
|
|
|
#: Tests for Python 2.7, 3.3 and 3.4
|
2018-04-05 02:43:19 +00:00
|
|
|
check-2.6 check-2.7 check-3.3 check-3.4 check-3.5: pytest
|
2015-12-31 16:19:46 +00:00
|
|
|
$(MAKE) -C test $@
|
|
|
|
|
2016-05-16 17:48:00 +00:00
|
|
|
#: Tests for Python 3.2 and 3.5 - pytest doesn't work here
|
|
|
|
# Or rather 3.5 doesn't work not on Travis
|
2018-04-05 02:43:19 +00:00
|
|
|
check-3.0 check-3.1 check-3.2 check-3.6:
|
2015-12-26 15:19:26 +00:00
|
|
|
$(MAKE) -C test $@
|
|
|
|
|
2017-08-16 01:52:43 +00:00
|
|
|
check-3.7: pytest
|
2018-04-20 15:15:52 +00:00
|
|
|
$(MAKE) -C test check
|
2017-08-16 01:52:43 +00:00
|
|
|
|
2019-04-10 15:26:58 +00:00
|
|
|
check-3.8:
|
|
|
|
$(MAKE) -C test check
|
|
|
|
|
2017-10-25 02:56:23 +00:00
|
|
|
#:PyPy 2.6.1 PyPy 5.0.1, or PyPy 5.8.0-beta0
|
2016-07-24 22:54:51 +00:00
|
|
|
# Skip for now
|
2017-11-06 16:54:01 +00:00
|
|
|
2.6 5.0 5.3 5.6 5.8:
|
2016-07-25 18:41:27 +00:00
|
|
|
|
2019-11-13 04:33:36 +00:00
|
|
|
#:PyPy pypy3-2.4.0 Python 3.6.1:
|
2019-10-30 23:36:42 +00:00
|
|
|
7.1 pypy-3.2 2.4:
|
2016-07-25 18:41:27 +00:00
|
|
|
$(MAKE) -C test $@
|
2016-07-24 22:54:51 +00:00
|
|
|
|
2021-11-23 21:38:30 +00:00
|
|
|
#:PyPy versions
|
|
|
|
7.2 7.3:
|
2019-11-13 04:33:36 +00:00
|
|
|
$(MAKE) -C test $@
|
|
|
|
|
2022-04-17 14:52:56 +00:00
|
|
|
#:pyston versions
|
|
|
|
2.3:
|
|
|
|
$(MAKE) -C test $@
|
|
|
|
|
2015-12-20 17:07:49 +00:00
|
|
|
#: Run py.test tests
|
2015-12-15 22:55:57 +00:00
|
|
|
pytest:
|
|
|
|
$(MAKE) -C pytest check
|
|
|
|
|
2015-12-11 18:44:23 +00:00
|
|
|
#: Clean up temporary files and .pyc files
|
|
|
|
clean: clean_pyc
|
|
|
|
$(PYTHON) ./setup.py $@
|
2015-12-13 05:25:34 +00:00
|
|
|
(cd test && $(MAKE) clean)
|
2015-12-11 18:44:23 +00:00
|
|
|
|
2016-05-14 03:35:31 +00:00
|
|
|
#: Create source (tarball) and wheel distribution
|
2017-10-12 10:48:49 +00:00
|
|
|
dist: distcheck
|
2016-05-14 03:35:31 +00:00
|
|
|
$(PYTHON) ./setup.py sdist bdist_wheel
|
2015-12-11 18:44:23 +00:00
|
|
|
|
2017-10-12 10:48:49 +00:00
|
|
|
# perform some checks on the package via setup.py
|
|
|
|
distcheck:
|
|
|
|
$(PYTHON) ./setup.py check
|
|
|
|
|
2015-12-11 18:44:23 +00:00
|
|
|
#: Remove .pyc files
|
|
|
|
clean_pyc:
|
2015-12-13 05:25:34 +00:00
|
|
|
( cd uncompyle6 && $(RM) -f *.pyc */*.pyc )
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Create source tarball
|
|
|
|
sdist:
|
|
|
|
$(PYTHON) ./setup.py sdist
|
|
|
|
|
|
|
|
|
|
|
|
#: Style check. Set env var LINT to pyflakes, flake, or flake8
|
2015-12-14 13:48:59 +00:00
|
|
|
lint: flake8
|
|
|
|
|
2016-01-02 20:52:22 +00:00
|
|
|
# Check StructuredText long description formatting
|
|
|
|
check-rst:
|
|
|
|
$(PYTHON) setup.py --long-description | rst2html.py > python3-trepan.html
|
|
|
|
|
|
|
|
#: Lint program
|
2015-12-14 13:48:59 +00:00
|
|
|
flake8:
|
2015-12-11 23:49:12 +00:00
|
|
|
$(LINT) uncompyle6
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Create binary egg distribution
|
|
|
|
bdist_egg:
|
|
|
|
$(PYTHON) ./setup.py bdist_egg
|
|
|
|
|
|
|
|
|
2016-05-14 03:35:31 +00:00
|
|
|
#: Create binary wheel distribution
|
2017-10-11 11:56:52 +00:00
|
|
|
wheel:
|
2016-05-14 03:35:31 +00:00
|
|
|
$(PYTHON) ./setup.py bdist_wheel
|
|
|
|
|
|
|
|
|
2015-12-11 18:44:23 +00:00
|
|
|
# It is too much work to figure out how to add a new command to distutils
|
|
|
|
# to do the following. I'm sure distutils will someday get there.
|
|
|
|
DISTCLEAN_FILES = build dist *.pyc
|
|
|
|
|
|
|
|
#: Remove ALL derived files
|
|
|
|
distclean: clean
|
2015-12-15 03:01:58 +00:00
|
|
|
-rm -fvr $(DISTCLEAN_FILES) || true
|
2015-12-11 18:44:23 +00:00
|
|
|
-find . -name \*.pyc -exec rm -v {} \;
|
|
|
|
-find . -name \*.egg-info -exec rm -vr {} \;
|
|
|
|
|
|
|
|
#: Install package locally
|
|
|
|
verbose-install:
|
|
|
|
$(PYTHON) ./setup.py install
|
|
|
|
|
|
|
|
#: Install package locally without the verbiage
|
|
|
|
install:
|
|
|
|
$(PYTHON) ./setup.py install >/dev/null
|
|
|
|
|
|
|
|
rmChangeLog:
|
|
|
|
rm ChangeLog || true
|
|
|
|
|
|
|
|
#: Create a ChangeLog from git via git log and git2cl
|
|
|
|
ChangeLog: rmChangeLog
|
|
|
|
git log --pretty --numstat --summary | $(GIT2CL) >$@
|
|
|
|
|
|
|
|
.PHONY: $(PHONY)
|