vici: Add tox.ini to run tests with tox
[strongswan.git] / src / libcharon / plugins / vici / python / Makefile.am
1 EXTRA_DIST = LICENSE README.rst MANIFEST.in \
2         setup.py.in \
3         tox.ini \
4         vici/test/__init__.py \
5         vici/test/test_protocol.py \
6         vici/__init__.py \
7         vici/command_wrappers.py \
8         vici/compat.py \
9         vici/exception.py \
10         vici/protocol.py \
11         vici/session.py
12
13 $(srcdir)/setup.py: $(srcdir)/setup.py.in $(top_builddir)/config.status
14         $(AM_V_GEN) sed \
15         -e "s:@EGG_VERSION@:$(PYTHON_PACKAGE_VERSION):" \
16         $(srcdir)/setup.py.in > $@
17
18 all-local: dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
19
20 dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg: $(EXTRA_DIST) $(srcdir)/setup.py
21         (cd $(srcdir); $(PYTHON) setup.py bdist_egg \
22                 -b $(shell readlink -f $(builddir))/build \
23                 -d $(shell readlink -f $(builddir))/dist)
24
25 package: $(EXTRA_DIST) $(srcdir)/setup.py
26         (cd $(srcdir); $(PYTHON) setup.py sdist \
27                 -d $(shell readlink -f $(builddir))/dist \
28                 bdist_wheel --universal \
29                 -d $(shell readlink -f $(builddir))/dist)
30
31 clean-local:
32         (cd $(srcdir); [ ! -f setup.py ] || $(PYTHON) setup.py clean -a)
33         rm -rf $(srcdir)/setup.py $(srcdir)/vici.egg-info $(builddir)/dist
34
35 if PYTHON_EGGS_INSTALL
36 install-exec-local: dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
37         $(EASY_INSTALL) $(PYTHONEGGINSTALLDIR) \
38                 dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
39 endif
40
41 if USE_PY_TEST
42   TESTS = $(PY_TEST)
43 endif
44
45 .PHONY: package