From dfeb65fbd76ab5b3a7245c0271bd887ea07c7b40 Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Tue, 29 Oct 2019 17:53:39 +0100 Subject: [PATCH] "make" things easier --- Makefile | 10 ++++++++++ README.rst | 17 ++++++++++++++--- tox.ini | 11 ----------- 3 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 Makefile delete mode 100644 tox.ini diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9033955 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +ext: + python setup.py build_ext --inplace + +test: + python -m pytest + +clean: + python setup.py clean --all + find pyModeS/c_decoder -type f -name '*.c' -delete + find pyModeS/c_decoder -type f -name '*.so' -delete diff --git a/README.rst b/README.rst index 1470c56..51a2bed 100644 --- a/README.rst +++ b/README.rst @@ -321,8 +321,19 @@ Here is an example: Unit test --------- -To perform unit tests. First, install ``tox`` through pip. Then, run the following commands: +To perform unit tests, ``pytest`` must be install first. -.. code:: bash +Build Cython extensions +:: - $ tox + $ make ext + +Run unit tests +:: + + $ make test + +Clean build files +:: + + $ make clean diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 9a0ca74..0000000 --- a/tox.ini +++ /dev/null @@ -1,11 +0,0 @@ -[tox] -toxworkdir = /tmp/tox -envlist = py2,py3 - -[testenv] -deps = - pytest - numpy - pyzmq - pyrtlsdr -commands = py.test