summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/vici/python/Makefile.am
blob: 20a6f436d903997c1abe7f88f7bb2c50057d0a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
EXTRA_DIST = LICENSE README.rst MANIFEST.in \
	setup.py.in \
	vici/test/__init__.py \
	vici/test/test_protocol.py \
	vici/__init__.py \
	vici/compat.py \
	vici/exception.py \
	vici/protocol.py \
	vici/session.py

$(srcdir)/setup.py: $(srcdir)/setup.py.in
	$(AM_V_GEN) sed \
	-e "s:@EGG_VERSION@:$(PYTHON_PACKAGE_VERSION):" \
	$(srcdir)/setup.py.in > $@

all-local: dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg

dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg: $(EXTRA_DIST) $(srcdir)/setup.py
	(cd $(srcdir); $(PYTHON) setup.py bdist_egg \
		-b $(shell readlink -f $(builddir))/build \
		-d $(shell readlink -f $(builddir))/dist)

package: $(EXTRA_DIST) $(srcdir)/setup.py
	(cd $(srcdir); $(PYTHON) setup.py sdist \
		-d $(shell readlink -f $(builddir))/dist \
		bdist_wheel --universal \
		-d $(shell readlink -f $(builddir))/dist)

clean-local:
	(cd $(srcdir); [ ! -f setup.py ] || $(PYTHON) setup.py clean -a)
	rm -rf $(srcdir)/setup.py $(srcdir)/vici.egg-info $(builddir)/dist

if PYTHON_EGGS_INSTALL
install-exec-local: dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
	$(EASY_INSTALL) $(PYTHONEGGINSTALLDIR) \
		dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
endif

if USE_PY_TEST
  TESTS = $(PY_TEST)
endif

.PHONY: package