%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/modules/ |
Current File : //usr/lib/python2.7/site-packages/salt/modules/composer.pyo |
� ���^c @@ sN d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z e j e � Z i d d 6Z d � Z d � Z d � Z d d d d d d d d d d e d d d d � Z d d d d d d d d d e d d d � Z d d d d d d d d d e d d d � Z d d d e d d � Z d S( u: Use composer to install PHP dependencies for a directory i ( t absolute_importt print_functiont unicode_literalsN( t CommandExecutionErrort CommandNotFoundErrort SaltInvocationErroru listu list_c C@ s t S( u Always load ( t True( ( ( s9 /usr/lib/python2.7/site-packages/salt/modules/composer.pyt __virtual__ s c C@ s t j j j | � r t St S( u5 Validate the composer file is indeed there. ( t saltt utilst patht whichR t False( t composer( ( s9 /usr/lib/python2.7/site-packages/salt/modules/composer.pyt _valid_composer# s c C@ s) d j | � } t j j | � r% t St S( u� Test to see if the vendor directory exists in this directory dir Directory location of the composer.json file CLI Example: .. code-block:: bash salt '*' composer.did_composer_install /var/www/application u {0}/vendor( t formatt osR t existsR R ( t dirt lockFile( ( s9 /usr/lib/python2.7/site-packages/salt/modules/composer.pyt did_composer_install, s u /rootc C@ so | d k r$ | d k r* d } q* n d } t | � sQ t d j | | � � � n | d k rl t d � � n | d k r� | d k r� t d j | � � � n | | d d g } | d k r� | j t j j j | � � n | d k r� | g | } n | d k r| j d | g � n | t k r3| j d � n | t k rO| j d � n | t k rk| j d � n | t k r�| j d � n | t k r�| j d � n | t k r�| j d � n | t k r�| j d � n | d k r t j j j | � } | | d <n i | d 6} t d | d | d | d t �} | d d k r[t | d � � n | t k rkt S| S( u Run PHP's composer with a specific action. If composer has not been installed globally making it available in the system PATH & making it executable, the ``composer`` and ``php`` parameters will need to be set to the location of the executables. action The action to pass to composer ('install', 'update', 'selfupdate', etc). directory Directory location of the composer.json file. Required except when action='selfupdate' composer Location of the composer.phar file. If not set composer will just execute "composer" as if it is installed globally. (i.e. /path/to/composer.phar) php Location of the php executable to use with composer. (i.e. /usr/bin/php) runas Which system user to run composer as. prefer_source --prefer-source option of composer. prefer_dist --prefer-dist option of composer. no_scripts --no-scripts option of composer. no_plugins --no-plugins option of composer. optimize --optimize-autoloader option of composer. Recommended for production. no_dev --no-dev option for composer. Recommended for production. quiet --quiet option for composer. Whether or not to return output from composer. composer_home $COMPOSER_HOME environment variable extra_flags None, or a string containing extra flags to pass to composer. env A list of environment variables to be set prior to execution. u phpu composeru5 'composer.{0}' is not available. Couldn't find '{1}'.u! The 'action' argument is requiredu selfupdateu5 The 'directory' argument is required for composer.{0}u --no-interactionu --no-ansiu --working-diru --quietu --no-devu --prefer-sourceu --prefer-distu --no-scriptsu --no-pluginsu --optimize-autoloaderu COMPOSER_HOMEu cmd.run_allt runast envt python_shellu retcodei u stderrN( t NoneR R R R t extendR R t argst shlex_splitR t appendt datat repack_dictlistt __salt__R R ( t actiont directoryR t phpR t prefer_sourcet prefer_distt no_scriptst no_pluginst optimizet no_devt quiett composer_homet extra_flagsR t cmdt result( ( s9 /usr/lib/python2.7/site-packages/salt/modules/composer.pyt _run_composer? s^ G c C@ s^ t d d | d | d | d | d | d | d | d | d | d | d | d | d | � } | S( u� Install composer dependencies for a directory. If composer has not been installed globally making it available in the system PATH & making it executable, the ``composer`` and ``php`` parameters will need to be set to the location of the executables. directory Directory location of the composer.json file. composer Location of the composer.phar file. If not set composer will just execute "composer" as if it is installed globally. (i.e. /path/to/composer.phar) php Location of the php executable to use with composer. (i.e. /usr/bin/php) runas Which system user to run composer as. prefer_source --prefer-source option of composer. prefer_dist --prefer-dist option of composer. no_scripts --no-scripts option of composer. no_plugins --no-plugins option of composer. optimize --optimize-autoloader option of composer. Recommended for production. no_dev --no-dev option for composer. Recommended for production. quiet --quiet option for composer. Whether or not to return output from composer. composer_home $COMPOSER_HOME environment variable env A list of environment variables to be set prior to execution. CLI Example: .. code-block:: bash salt '*' composer.install /var/www/application salt '*' composer.install /var/www/application no_dev=True optimize=True u installR! R R"