diff options
author | Eric Leblond <eric@regit.org> | 2018-06-19 23:46:53 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-20 13:51:41 +0200 |
commit | bf9653667a39e32973466a202fdf9edcf881075a (patch) | |
tree | c8723359c0128230b8ced5fcdb7bbb8a2aa6f645 /py/Makefile.am | |
parent | cafd5168ba1e234e8ed446bb0eeaf7eb253a66c2 (diff) |
python: installation of binding via make install
setup.py is used to build and install the python binding. Call
to setup.py are done in Makefile to proceed to build and
installation.
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'py/Makefile.am')
-rw-r--r-- | py/Makefile.am | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/py/Makefile.am b/py/Makefile.am new file mode 100644 index 00000000..0963535d --- /dev/null +++ b/py/Makefile.am @@ -0,0 +1,31 @@ +EXTRA_DIST = setup.py __init__.py nftables.py + +if HAVE_PYTHON + +all-local: + cd $(srcdir) && \ + $(PYTHON_BIN) setup.py build --build-base $(abs_builddir) + +install-exec-local: + cd $(srcdir) && \ + $(PYTHON_BIN) setup.py build --build-base $(abs_builddir) \ + install --prefix $(DESTDIR)$(prefix) + +uninstall-local: + rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables + rm -rf $(DESTDIR)$(prefix)/lib*/python*/dist-packages/nftables + rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables-[0-9]*.egg-info + rm -rf $(DESTDIR)$(prefix)/lib*/python*/dist-packages/nftables-[0-9]*.egg-info + rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables-[0-9]*.egg + rm -rf $(DESTDIR)$(prefix)/lib*/python*/dist-packages/nftables-[0-9]*.egg + +clean-local: + cd $(srcdir) && \ + $(PYTHON_BIN) setup.py clean \ + --build-base $(abs_builddir) + rm -rf scripts-* lib* build dist bdist.* nftables.egg-info + find . -name \*.pyc -print0 | xargs -0 rm -f + +distclean-local: + rm -f version +endif |