PNG  IHDR  8] PLTE S =tRNS   PNG  IHDR  8] PLTE S =tRNS   REDROOM
PHP 7.4.33
Preview: build.py Size: 5.33 KB
/opt/alt/python27/lib64/python2.7/distutils/command/build.py

"""distutils.command.build

Implements the Distutils 'build' command."""

__revision__ = "$Id$"

import sys, os

from distutils.util import get_platform
from distutils.core import Command
from distutils.errors import DistutilsOptionError

def show_compilers():
    from distutils.ccompiler import show_compilers
    show_compilers()

class build(Command):

    description = "build everything needed to install"

    user_options = [
        ('build-base=', 'b',
         "base directory for build library"),
        ('build-purelib=', None,
         "build directory for platform-neutral distributions"),
        ('build-platlib=', None,
         "build directory for platform-specific distributions"),
        ('build-lib=', None,
         "build directory for all distribution (defaults to either " +
         "build-purelib or build-platlib"),
        ('build-scripts=', None,
         "build directory for scripts"),
        ('build-temp=', 't',
         "temporary build directory"),
        ('plat-name=', 'p',
         "platform name to build for, if supported "
         "(default: %s)" % get_platform()),
        ('compiler=', 'c',
         "specify the compiler type"),
        ('debug', 'g',
         "compile extensions and libraries with debugging information"),
        ('force', 'f',
         "forcibly build everything (ignore file timestamps)"),
        ('executable=', 'e',
         "specify final destination interpreter path (build.py)"),
        ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None,
         "list available compilers", show_compilers),
        ]

    def initialize_options(self):
        self.build_base = 'build'
        # these are decided only after 'build_base' has its final value
        # (unless overridden by the user or client)
        self.build_purelib = None
        self.build_platlib = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.compiler = None
        self.plat_name = None
        self.debug = None
        self.force = 0
        self.executable = None

    def finalize_options(self):
        if self.plat_name is None:
            self.plat_name = get_platform()
        else:
            # plat-name only supported for windows (other platforms are
            # supported via ./configure flags, if at all).  Avoid misleading
            # other platforms.
            if os.name != 'nt':
                raise DistutilsOptionError(
                            "--plat-name only supported on Windows (try "
                            "using './configure --help' on your platform)")

        plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])

        # Make it so Python 2.x and Python 2.x with --with-pydebug don't
        # share the same build directories. Doing so confuses the build
        # process for C modules
        if hasattr(sys, 'gettotalrefcount'):
            plat_specifier += '-pydebug'

        # 'build_purelib' and 'build_platlib' just default to 'lib' and
        # 'lib.<plat>' under the base build directory.  We only use one of
        # them for a given distribution, though --
        if self.build_purelib is None:
            self.build_purelib = os.path.join(self.build_base, 'lib')
        if self.build_platlib is None:
            self.build_platlib = os.path.join(self.build_base,
                                              'lib' + plat_specifier)

        # 'build_lib' is the actual directory that we will use for this
        # particular module distribution -- if user didn't supply it, pick
        # one of 'build_purelib' or 'build_platlib'.
        if self.build_lib is None:
            if self.distribution.ext_modules:
                self.build_lib = self.build_platlib
            else:
                self.build_lib = self.build_purelib

        # 'build_temp' -- temporary directory for compiler turds,
        # "build/temp.<plat>"
        if self.build_temp is None:
            self.build_temp = os.path.join(self.build_base,
                                           'temp' + plat_specifier)
        if self.build_scripts is None:
            self.build_scripts = os.path.join(self.build_base,
                                              'scripts-' + sys.version[0:3])

        if self.executable is None and sys.executable:
            self.executable = os.path.normpath(sys.executable)

    def run(self):
        # Run all relevant sub-commands.  This will be some subset of:
        #  - build_py      - pure Python modules
        #  - build_clib    - standalone C libraries
        #  - build_ext     - Python extensions
        #  - build_scripts - (Python) scripts
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

    # -- Predicates for the sub-command list ---------------------------

    def has_pure_modules (self):
        return self.distribution.has_pure_modules()

    def has_c_libraries (self):
        return self.distribution.has_c_libraries()

    def has_ext_modules (self):
        return self.distribution.has_ext_modules()

    def has_scripts (self):
        return self.distribution.has_scripts()

    sub_commands = [('build_py',      has_pure_modules),
                    ('build_clib',    has_c_libraries),
                    ('build_ext',     has_ext_modules),
                    ('build_scripts', has_scripts),
                   ]

Directory Contents

Dirs: 0 × Files: 76

Name Size Perms Modified Actions
5.46 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
5.12 KB lrw-r--r-- 2025-12-02 12:55:37
Edit Download
5.12 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
5.07 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
4.93 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
4.93 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
34.37 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
23.62 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
23.51 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
20.56 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
17.31 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
17.23 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
14.65 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
10.60 KB lrw-r--r-- 2025-12-02 12:55:38
Edit Download
10.52 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
5.33 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
5.15 KB lrw-r--r-- 2025-12-02 12:55:12
Edit Download
5.15 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
7.94 KB lrw-r--r-- 2025-01-08 10:54:00
Edit Download
6.33 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.33 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
31.74 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
31.51 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
19.13 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
19.13 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
15.96 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
11.49 KB lrw-r--r-- 2025-12-02 12:55:37
Edit Download
11.42 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
4.49 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
4.46 KB lrw-r--r-- 2025-12-02 12:55:37
Edit Download
4.46 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
5.54 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.27 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.27 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.75 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
3.06 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
3.06 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
719 B lrw-r--r-- 2025-01-08 10:54:01
Edit Download
12.82 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
12.64 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
12.64 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
25.65 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
16.73 KB lrw-r--r-- 2025-12-02 12:55:12
Edit Download
16.73 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.78 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
3.13 KB lrw-r--r-- 2025-12-02 12:55:38
Edit Download
3.13 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.53 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
3.77 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
3.77 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
1.31 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.29 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.29 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
8.14 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.68 KB lrw-r--r-- 2025-12-02 12:55:38
Edit Download
6.68 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.02 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
2.95 KB lrw-r--r-- 2025-12-02 12:55:37
Edit Download
2.95 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
11.56 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
10.13 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
10.13 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
18.12 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
16.53 KB lrw-r--r-- 2025-12-02 12:55:37
Edit Download
16.53 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.84 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.24 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
6.24 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
60.00 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
64.00 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
60.00 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
218.50 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
191.50 KB lrw-r--r-- 2025-01-08 10:54:01
Edit Download
822 B lrw-r--r-- 2025-01-08 10:54:01
Edit Download
678 B lrw-r--r-- 2025-12-02 12:55:12
Edit Download
678 B lrw-r--r-- 2025-01-08 10:54:01
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`