"make" things easier

This commit is contained in:
Junzi Sun 2019-10-29 17:53:39 +01:00
parent 13b283666a
commit dfeb65fbd7
3 changed files with 24 additions and 14 deletions

10
Makefile Normal file
View File

@ -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

View File

@ -321,8 +321,19 @@ Here is an example:
Unit test 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

11
tox.ini
View File

@ -1,11 +0,0 @@
[tox]
toxworkdir = /tmp/tox
envlist = py2,py3
[testenv]
deps =
pytest
numpy
pyzmq
pyrtlsdr
commands = py.test