opennel-pymanager/Makefile

68 lines
1.8 KiB
Makefile
Raw Permalink Normal View History

PYTHON=`which python3`
PYTHONCOVERAGE=`which python3-coverage`
DESTDIR=/
BUILDIR=$(CURDIR)/debian/pymanager
PROJECT=pymanager
2018-10-13 13:09:59 +00:00
VERSION=1.2.0
2018-02-05 22:08:45 +00:00
#OMIT_COVERGAGE=--omit=/usr/lib/python3/*,tests/*
all:
@echo "make sdist - Create source package"
@echo "make bdist - Create package"
2018-02-05 22:08:45 +00:00
@echo "make bdist_wheel - Create package wheel"
@echo "make test - Test"
@echo "make coverage - coverage"
@echo "make htmldoc - generate html doc (out : doc/build)"
@echo "make install - Install on local system"
@echo "make builddeb - Generate a deb package"
@echo "make clean - Get rid of scratch and byte files"
sdist:
$(PYTHON) setup.py sdist $(COMPILE)
bdist:
$(PYTHON) setup.py bdist $(COMPILE)
2018-02-05 22:08:45 +00:00
bdist_wheel:
$(PYTHON) setup.py bdist_wheel $(COMPILE)
test:
$(PYTHON) setup.py test
coverage:
$(PYTHONCOVERAGE) erase
2018-02-13 19:43:02 +00:00
$(PYTHONCOVERAGE) run -a --concurrency=multiprocessing tests/test_client_manager.py
2018-02-05 22:08:45 +00:00
$(PYTHONCOVERAGE) run -a tests/test_certificate.py
$(PYTHONCOVERAGE) run -a tests/test_manager.py
$(PYTHONCOVERAGE) run -a tests/test_client.py
$(PYTHONCOVERAGE) run -a tests/test_password.py
$(PYTHONCOVERAGE) combine
$(PYTHONCOVERAGE) report
$(PYTHONCOVERAGE) html
$(PYTHONCOVERAGE) xml
htmldoc:
sphinx-build -b html docs/source docs/build
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
builddeb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
rename -v -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
dpkg-buildpackage -i -I -rfakeroot
clean:
$(PYTHON) setup.py clean
$(MAKE) -f $(CURDIR)/debian/rules clean
rm -rf build/ MANIFEST
rm -rf docs/build/
rm -rf dist/
rm -rf .coverage
rm -rf htmlcov
rm -rf pymanager/__pycache__
find . -name '*.pyc' -delete