%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/cabal.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlm	Z	ej
e�Zidd6Z
d�Zddd�Zdddedd	�Zddedd
�Zddd�ZdS(u^
Manage and query Cabal packages
===============================

.. versionadded:: 2015.8.0

i(tabsolute_importtprint_functiontunicode_literalsN(tCommandExecutionErrorulistulist_cC@s4tjjjd�dk	o3tjjjd�dk	S(u4
    Only work when cabal-install is installed.
    ucabalughc-pkgN(tsalttutilstpathtwhichtNone(((s6/usr/lib/python2.7/site-packages/salt/modules/cabal.pyt__virtual__scC@stddd|d|�S(ua
    Updates list of known packages.

    user
        The user to run cabal update with

    env
        Environment variables to set when invoking cabal. Uses the
        same ``env`` format as the :py:func:`cmd.run
        <salt.modules.cmdmod.run>` execution function.

    CLI Example:

    .. code-block:: bash

        salt '*' cabal.update

    ucmd.run_allucabal updatetrunastenv(t__salt__(tuserR((s6/usr/lib/python2.7/site-packages/salt/modules/cabal.pytupdate scC@s�dg}|r|jd�n|r>|jdj|��n(|rf|jdjdj|���ntddj|�d|d|�}|d	d
kr�t|d��n|S(u�
    Install a cabal package.

    pkg
        A package name in format accepted by cabal-install. See:
        https://wiki.haskell.org/Cabal-Install

    pkgs
        A list of packages names in same format as ``pkg``

    user
        The user to run cabal install with

    install_global
        Install package globally instead of locally

    env
        Environment variables to set when invoking cabal. Uses the
        same ``env`` format as the :py:func:`cmd.run
        <salt.modules.cmdmod.run>` execution function

    CLI Example:

    .. code-block:: bash

        salt '*' cabal.install shellcheck
        salt '*' cabal.install shellcheck-0.3.5
    u
cabal installu--globalu"{0}"u" "ucmd.run_allu R
Ruretcodeiustderr(tappendtformattjoinRR(tpkgtpkgsR
tinstall_globalRtcmdtresult((s6/usr/lib/python2.7/site-packages/salt/modules/cabal.pytinstall6s"	"%cC@s�dg}|r|jd�n|r>|jdj|��ntddj|�d|d|�}i}xB|dj�D]0}|j�}|d	}	|d
}
|
||	<qzW|S(u
    List packages matching a search string.

    pkg
        Search string for matching package names
    user
        The user to run cabal list with
    installed
        If True, only return installed packages.
    env
        Environment variables to set when invoking cabal. Uses the
        same ``env`` format as the :py:func:`cmd.run
        <salt.modules.cmdmod.run>` execution function

    CLI example:

    .. code-block:: bash

        salt '*' cabal.list
        salt '*' cabal.list ShellCheck
    ucabal list --simple-outputu--installedu"{0}"ucmd.run_allu R
Rustdoutii(RRRRt
splitlinestsplit(RR
t	installedRRRtpackagestlinetdatatpackage_nametpackage_version((s6/usr/lib/python2.7/site-packages/salt/modules/cabal.pytlist_js	%

cC@skdg}|jdj|��tddj|�d|d|�}|ddkrgt|d	��n|S(
u�
    Uninstall a cabal package.

    pkg
        The package to uninstall
    user
        The user to run ghc-pkg unregister with
    env
        Environment variables to set when invoking cabal. Uses the
        same ``env`` format as the :py:func:`cmd.run
        <salt.modules.cmdmod.run>` execution function

    CLI Example:

    .. code-block:: bash

        salt '*' cabal.uninstall ShellCheck

    ughc-pkg unregisteru"{0}"ucmd.run_allu R
Ruretcodeiustderr(RRRRR(RR
RRR((s6/usr/lib/python2.7/site-packages/salt/modules/cabal.pyt	uninstall�s	%(t__doc__t
__future__RRRtloggingtsalt.utils.pathRtsalt.exceptionsRt	getLoggert__name__tloggert__func_alias__R	RRtFalseRR R!(((s6/usr/lib/python2.7/site-packages/salt/modules/cabal.pyt<module>s(
	1+

Zerion Mini Shell 1.0