X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fsetup.py.in;fp=bindings%2Fpython%2Fbt2%2Fsetup.py.in;h=0000000000000000000000000000000000000000;hp=aeeac8f7f00dd18ef58d5156c0c01e6c671b6f80;hb=578e048b5debf169e286e5b5cc747b5d6c16886d;hpb=68b66a256a54d32992dfefeaad11eea88b7df234 diff --git a/bindings/python/bt2/setup.py.in b/bindings/python/bt2/setup.py.in deleted file mode 100644 index aeeac8f7..00000000 --- a/bindings/python/bt2/setup.py.in +++ /dev/null @@ -1,86 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (C) 2017 - Francis Deslauriers -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -import sys - -from distutils.core import setup, Extension - -PY_PATH_WARN_MSG = """ --------------------------------------WARNING------------------------------------ -The install directory used:\n ({})\nis not included in your PYTHONPATH. - -To add this directory to your Python search path permanently you can add the -following command to your .bashrc/.zshrc: - export PYTHONPATH="${{PYTHONPATH}}:{}" --------------------------------------------------------------------------------- -""" - -def main(): - babeltrace_ext = Extension('bt2._native_bt', - sources=['bt2/native_bt.i', 'bt2/logging.c'], - libraries=['babeltrace2', 'glib-2.0'], - extra_objects=['@top_builddir@/logging/.libs/libbabeltrace2-logging.a', - '@top_builddir@/common/.libs/libbabeltrace2-common.a'],) - - dist = setup(name='bt2', - version='@PACKAGE_VERSION@', - description='Babeltrace 2 Python Bindings', - packages=['bt2'], - package_dir={'bt2': 'bt2'}, - options={'build': - { - 'build_base': 'build', - 'build_lib': 'build/build_lib' - }, - 'build_ext': - { - 'build_lib': 'build/build_lib' - } - }, - url='http://diamon.org/babeltrace', - ext_modules=[babeltrace_ext], - license='MIT', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: The MIT License', - 'Programming Language :: Python :: 3' - 'Topic :: System :: Logging', - ]) - -# After the installation, we check that the install directory is included in -# the Python search path and we print a warning message when it's not. -# We need to do this because Python search path differs depending on the distro -# and some distros don't include any /usr/local/ in the search path. This is -# also useful for out-of-tree installs and tests. -# It's only relevant to make this check on the `install` command. - - if 'install' in dist.command_obj: - install_dir = dist.command_obj['install'].install_libbase - if install_dir not in sys.path: - # We can't consider this an error because if affects every - # distro differently. We only warn the user that some - # extra configuration is needed to use the bindings - print(PY_PATH_WARN_MSG.format(install_dir, install_dir)) - -if __name__ == "__main__": - main()