Source code for libka.gbp_plugins
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# pylint: disable=line-too-long
# kate: space-indent on; indent-width 4; replace-tabs on; indent-mode python; remove-trailing-space modified;
# vim: expandtab ts=4
# pylint: enable=line-too-long
############################################################################
# Copyright © 2017-2019 José Manuel Santamaría Lema <panfaust@gmail.com> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
############################################################################
"""
This module just provides the `get_gbp_plugins_path` function which provides the
gbp-plugins/ directory full path.
"""
import os
[docs]
def get_gbp_plugins_path():
#pylint: disable=anomalous-backslash-in-string
r"""
This function gives the gbp-plugins/ directory path. This path may be different
depending if you installed Kubuntu Automation from git or from the \*.deb package,
hence why we need this function.
"""
#pylint: enable=anomalous-backslash-in-string
cwd = os.path.dirname(os.path.realpath(__file__))
gbp_plugins_path = os.path.join(cwd, 'gbp-plugins')
return gbp_plugins_path