1 # -*- coding: utf-8 -*-
3 # SPDX-License-Identifier: LGPL-2.1-only
5 # Copyright (C) 2015 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
10 if sys
.version_info
< (3, 12):
11 from distutils
.core
import setup
, Extension
13 from setuptools
import setup
, Extension
15 PY_PATH_WARN_MSG
= """
16 -------------------------------------WARNING------------------------------------
17 The install directory used:\n ({0})\nis not included in your PYTHONPATH.
19 To add this directory to your Python search path permanently you can add the
20 following command to your .bashrc/.zshrc:
21 export PYTHONPATH="${{PYTHONPATH}}:{0}"
22 --------------------------------------------------------------------------------
26 dist
= setup(name
='lttngust',
27 version
='@PACKAGE_VERSION@',
28 description
='LTTng-UST Python agent',
29 packages
=['lttngust'],
30 package_dir
={'lttngust': 'lttngust'},
31 options
={'build': {'build_base': 'build'}},
32 url
='http://lttng.org',
35 'Development Status :: 5 - Production/Stable',
36 'Intended Audience :: Developers',
37 'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
38 'Programming Language :: Python :: 2.7',
39 'Programming Language :: Python :: 3'
40 'Topic :: System :: Logging',
43 # After the installation, we check that the install directory is included in
44 # the Python search path and we print a warning message when it's not. We need
45 # to do this because Python search path differs depending on the distro and
46 # some distros don't include any `/usr/local/` (the default install prefix) in
47 # the search path. This is also useful for out-of-tree installs and tests. It's
48 # only relevant to make this check on the `install` command.
50 if 'install' in dist
.command_obj
:
51 install_dir
= dist
.command_obj
['install'].install_libbase
52 if install_dir
not in sys
.path
:
53 # We can't consider this an error because if affects every
54 # distro differently. We only warn the user that some
55 # extra configuration is needed to use the agent
56 abs_install_dir
= os
.path
.abspath(install_dir
)
57 print(PY_PATH_WARN_MSG
.format(abs_install_dir
))
59 if __name__
== '__main__':
This page took 0.043853 seconds and 4 git commands to generate.