liblttng-ust-java-agent/java/liblttng-ust-jul.jar
# Python agent
-liblttng-ust-python-agent/__init__.py
+liblttng-ust-python-agent/lttngust/__init__.py
liblttng-ust-python-agent/**/*.pyc
+liblttng-ust-python-agent/build
+liblttng-ust-python-agent/install_files.txt
+liblttng-ust-python-agent/setup.py
liblttng-ust-libc-wrapper/Makefile
liblttng-ust-cyg-profile/Makefile
liblttng-ust-python-agent/Makefile
+ liblttng-ust-python-agent/setup.py
+ liblttng-ust-python-agent/lttngust/__init__.py
tools/Makefile
tests/Makefile
tests/hello/Makefile
lttng-ust.pc
])
+# Create link for python agent for the VPATH guru.
+AC_CONFIG_LINKS([
+ liblttng-ust-python-agent/lttngust/agent.py:liblttng-ust-python-agent/lttngust/agent.py
+ liblttng-ust-python-agent/lttngust/cmd.py:liblttng-ust-python-agent/lttngust/cmd.py
+ liblttng-ust-python-agent/lttngust/debug.py:liblttng-ust-python-agent/lttngust/debug.py
+ liblttng-ust-python-agent/lttngust/loghandler.py:liblttng-ust-python-agent/lttngust/loghandler.py
+])
+
AC_OUTPUT
AS_ECHO()
-# inputs/outputs
-LTTNGUST_PY_PACKAGE_DIR = $(srcdir)/lttngust
-LTTNGUST_PY_PACKAGE_FILES = agent.py cmd.py debug.py loghandler.py
-LTTNGUST_PY_PACKAGE_SRC = \
- $(addprefix $(LTTNGUST_PY_PACKAGE_DIR)/,$(LTTNGUST_PY_PACKAGE_FILES))
-INIT_PY_IN = $(srcdir)/__init__.py.in
-INIT_PY = __init__.py
-
-# dist files
-EXTRA_DIST = $(INIT_PY_IN) $(LTTNGUST_PY_PACKAGE_SRC)
-
-# __init__.py with proper version string
-all-local: $(INIT_PY)
-
-$(INIT_PY): $(INIT_PY_IN)
- $(SED) "s/@LTTNG_UST_VERSION@/$(PACKAGE_VERSION)/g" < $< > $@
-
-# Python package
-nodist_lttngust_PYTHON = $(LTTNGUST_PY_PACKAGE_SRC) $(INIT_PY)
-lttngustdir = $(pythondir)/lttngust
-
# tracepoint provider
AM_CPPFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/ \
-I$(top_builddir)/include/
liblttng_ust_python_agent_la_LIBADD = -lc -llttng-ust \
-L$(top_builddir)/liblttng-ust/.libs
-CLEANFILES = $(INIT_PY)
+# Use setup.py for the installation instead of Autoconf.
+# This ease the installation process and assure a *pythonic*
+# installation.
+agent_path=lttngust
+all-local:
+ $(PYTHON) setup.py build --verbose
+
+install-exec-local:
+ if [ "$(DESTDIR)" = "" ]; then \
+ $(PYTHON) setup.py install --prefix=$(prefix) --record install_files.txt --verbose --no-compile $(DISTSETUPOPTS); \
+ else \
+ $(PYTHON) setup.py install --root=$(DESTDIR) --verbose install_files.txt --prefix=$(prefix) --no-compile $(DISTSETUPOPTS); \
+ fi
+clean-local:
+ rm -rf build
+
+uninstall-local:
+ cat install_files.txt | xargs rm -rf
+ rm -rf $(DESTDIR)$(pkgpythondir)
+
+EXTRA_DIST=$(agent_path)
+
+# Remove automake generated file before dist
+dist-hook:
+ rm -rf $(distdir)/$(agent_path)/__init__.py
+++ /dev/null
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2015 - Philippe Proulx <pproulx@efficios.com>
-#
-# This library is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Lesser General Public License as published by the Free
-# Software Foundation; version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-from __future__ import unicode_literals
-
-# this creates the daemon threads and registers the application
-import lttngust.agent
-
-
-__version__ = '@LTTNG_UST_VERSION@'
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2015 - Philippe Proulx <pproulx@efficios.com>
+#
+# This library is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation; version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+from __future__ import unicode_literals
+
+# this creates the daemon threads and registers the application
+import lttngust.agent
+
+
+__version__ = '@PACKAGE_VERSION@'
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2015 - Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+#
+# This library is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation; version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+from distutils.core import setup, Extension
+
+setup(name='lttngust',
+ version='@PACKAGE_VERSION@',
+ description='Lttng ust agent',
+ packages=['lttngust'],
+ package_dir={'lttngust': 'lttngust'},
+ options={'build': {'build_base': 'build'}})