PNG  IHDR  8] PLTE S =tRNS   PNG  IHDR  8] PLTE S =tRNS   REDROOM
PHP 7.4.33
Preview: install.py Size: 4.59 KB
/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/install.py

from distutils.errors import DistutilsArgError
import inspect
import glob
import warnings
import platform
import distutils.command.install as orig

import setuptools

# Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for
# now. See https://github.com/pypa/setuptools/issues/199/
_install = orig.install


class install(orig.install):
    """Use easy_install to install the package, w/dependencies"""

    user_options = orig.install.user_options + [
        ('old-and-unmanageable', None, "Try not to use this!"),
        ('single-version-externally-managed', None,
         "used by system package builders to create 'flat' eggs"),
    ]
    boolean_options = orig.install.boolean_options + [
        'old-and-unmanageable', 'single-version-externally-managed',
    ]
    new_commands = [
        ('install_egg_info', lambda self: True),
        ('install_scripts', lambda self: True),
    ]
    _nc = dict(new_commands)

    def initialize_options(self):
        orig.install.initialize_options(self)
        self.old_and_unmanageable = None
        self.single_version_externally_managed = None

    def finalize_options(self):
        orig.install.finalize_options(self)
        if self.root:
            self.single_version_externally_managed = True
        elif self.single_version_externally_managed:
            if not self.root and not self.record:
                raise DistutilsArgError(
                    "You must specify --record or --root when building system"
                    " packages"
                )

    def handle_extra_path(self):
        if self.root or self.single_version_externally_managed:
            # explicit backward-compatibility mode, allow extra_path to work
            return orig.install.handle_extra_path(self)

        # Ignore extra_path when installing an egg (or being run by another
        # command without --root or --single-version-externally-managed
        self.path_file = None
        self.extra_dirs = ''

    def run(self):
        # Explicit request for old-style install?  Just do it
        if self.old_and_unmanageable or self.single_version_externally_managed:
            return orig.install.run(self)

        if not self._called_from_setup(inspect.currentframe()):
            # Run in backward-compatibility mode to support bdist_* commands.
            orig.install.run(self)
        else:
            self.do_egg_install()

    @staticmethod
    def _called_from_setup(run_frame):
        """
        Attempt to detect whether run() was called from setup() or by another
        command.  If called by setup(), the parent caller will be the
        'run_command' method in 'distutils.dist', and *its* caller will be
        the 'run_commands' method.  If called any other way, the
        immediate caller *might* be 'run_command', but it won't have been
        called by 'run_commands'. Return True in that case or if a call stack
        is unavailable. Return False otherwise.
        """
        if run_frame is None:
            msg = "Call stack not available. bdist_* commands may fail."
            warnings.warn(msg)
            if platform.python_implementation() == 'IronPython':
                msg = "For best results, pass -X:Frames to enable call stack."
                warnings.warn(msg)
            return True
        res = inspect.getouterframes(run_frame)[2]
        caller, = res[:1]
        info = inspect.getframeinfo(caller)
        caller_module = caller.f_globals.get('__name__', '')
        return (
            caller_module == 'distutils.dist'
            and info.function == 'run_commands'
        )

    def do_egg_install(self):

        easy_install = self.distribution.get_command_class('easy_install')

        cmd = easy_install(
            self.distribution, args="x", root=self.root, record=self.record,
        )
        cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
        cmd.always_copy_from = '.'  # make sure local-dir eggs get installed

        # pick up setup-dir .egg files only: no .egg-info
        cmd.package_index.scan(glob.glob('*.egg'))

        self.run_command('bdist_egg')
        args = [self.distribution.get_command_obj('bdist_egg').egg_output]

        if setuptools.bootstrap_install_from:
            # Bootstrap self-installation of setuptools
            args.insert(0, setuptools.bootstrap_install_from)

        cmd.args = args
        cmd.run(show_deprecation=False)
        setuptools.bootstrap_install_from = None


# XXX Python 3.1 doesn't see _nc if this is inside the class
install.sub_commands = (
    [cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc] +
    install.new_commands
)

Directory Contents

Dirs: 0 × Files: 51

Name Size Perms Modified Actions
2.37 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
3.11 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
17.76 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
18.29 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1.47 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1.92 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
637 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1.21 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
4.38 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
2.82 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
12.72 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
12.10 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
9.37 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
10.72 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
8.00 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
7.96 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
960 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1.82 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
85.50 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
80.73 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
24.97 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
26.83 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
4.59 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
5.00 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
2.15 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
3.21 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
3.77 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
4.93 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
2.38 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
2.89 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
628 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
4.87 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
5.57 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
468 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1.01 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
2.11 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
3.03 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
658 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1.14 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
7.90 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
9.97 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
4.97 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
6.04 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
9.38 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
10.84 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
462 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
1012 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
7.14 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
7.80 KB lrw-r--r-- 2024-10-10 13:18:22
Edit Download
568 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download
863 B lrw-r--r-- 2024-10-10 13:18:22
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
 !"#$%&'(()*+,-./00123456789 t\ wIDATx ]ys  47Y ƒ -  "  Rv  < f{Ɛ $k l L > L  ~h^ 1  [  r G t& h  l F z3O Y ! p A(_g̷ E8 )S 8 c  Kb"z ~ 5 J xAL WU <  *  5 m;W a pB h ~P J 2 3 6 ҙ .Ƹ P i  4g F R L P ΪK/D  M v (a3 k J Œ4N5* SH ` SdJ z  O J Xՠ V>u ߱ BE&L b2 ?2` tX+  c CB A$ i b C ĀMB E : /  # Dx &l =q Ty  0 \p I ( L Ǎ { e 4k ;`u^ヲ eP!( d {  )T A 8 O;Ě n >;s6 !  :Nx `[S D HU ~ q›J F} a g*D 49 / pn k h (t 8NxƐF _!r չ7 ZR R׷ q/5") Ӎ NY 0 x sZ!   o  fu  ,  K"$ ? pg  㕣=  1» {h " fh7    y  } € +7  $ y " X —ą - G P u 4 m >J 5 L =V ' ^@I p ?MS xЌ XV P ! h "C NS9B8̢ ]!K  e   zA , ӏkbY  !< XQ ٿyS| *" f { w  4@[S <  # 0 ! js [m  =,~ o "ݎ DHf Wo $ g ! Vԅ t mB /y Wf V4񺍸 c+@x?  B ~u " xUN e 0 BĂ) ~J pz! 7y6]l Ԥ@ P a< O /DHC `≻  N m"$  0ObB }{ x AO FCG D R ^ "B  { WDH  UR l@ T #  +"d T ; 0 i  D}. 7 ` ' ] w rE &S i ƕiTD EL P _ u h $ Ա FG wVD G L R Zf ' .!] J /ZR oGЍs Mr Ĥ ʬ 3 Q [3 cL ` ^ p + ( F;# B 5 '  2Y f [  ϶R0e }  E 7 6M aۮ H <& n % L] E}Up x紉, Uw' Q  Ǯշo k ވۙ 0N94 VX5 xEDE l D #֤ } C o )W :  ^ s 9  bRf iX5u ཱི 4 :[  T 1. | [E 2ؽ Iy\ : o x K G 5 ylP ' uK E ftb/i[3 .g _  [3M n G, #NwQ5~  ؚ) | n =Ц"x qg gB ` 듘 ~ x w ? ? R~  _ u. &VQ K˻   H C ( TN˄+ `C dA nB׭ D 3"Z G ê ^k H_ /- ~ " R_  .8 Z_ 6@ o  xg  uP ? 3լ @7AM!  E7^ - =V L  x  g-D0  CtmW 7  O  G _ WD0 g C  w1 r d w : a | \  *" f nֳ ^ H# f L ` Z ۽hV  }S F r0Ù Bć5r] @! NL iQ]{s^=4 d  WD  "  "   M; t" 8 5 e dL| "-*st" ) SWD ?R[S e ooF  20.D ? bo =) A i o d ģ ZҰaO @E =) i D a &ܟa CϞ y6 ,<%{^x%{f8? `iw^ ?/ M * IEND B`