$99 GRAYBYTE WORDPRESS FILE MANAGER $85

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/numpy/distutils/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/numpy/distutils//unixccompiler.py
"""
unixccompiler - can handle very long argument lists for ar.

"""
from __future__ import division, absolute_import, print_function

import os

from distutils.errors import DistutilsExecError, CompileError
from distutils.unixccompiler import *
from numpy.distutils.ccompiler import replace_method
from numpy.distutils.compat import get_exception
from numpy.distutils.misc_util import _commandline_dep_string

if sys.version_info[0] < 3:
    from . import log
else:
    from numpy.distutils import log

# Note that UnixCCompiler._compile appeared in Python 2.3
def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
    """Compile a single source files with a Unix-style compiler."""
    # HP ad-hoc fix, see ticket 1383
    ccomp = self.compiler_so
    if ccomp[0] == 'aCC':
        # remove flags that will trigger ANSI-C mode for aCC
        if '-Ae' in ccomp:
            ccomp.remove('-Ae')
        if '-Aa' in ccomp:
            ccomp.remove('-Aa')
        # add flags for (almost) sane C++ handling
        ccomp += ['-AA']
        self.compiler_so = ccomp
    # ensure OPT environment variable is read
    if 'OPT' in os.environ:
        from distutils.sysconfig import get_config_vars
        opt = " ".join(os.environ['OPT'].split())
        gcv_opt = " ".join(get_config_vars('OPT')[0].split())
        ccomp_s = " ".join(self.compiler_so)
        if opt not in ccomp_s:
            ccomp_s = ccomp_s.replace(gcv_opt, opt)
            self.compiler_so = ccomp_s.split()
        llink_s = " ".join(self.linker_so)
        if opt not in llink_s:
            self.linker_so = llink_s.split() + opt.split()

    display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)

    # gcc style automatic dependencies, outputs a makefile (-MF) that lists
    # all headers needed by a c file as a side effect of compilation (-MMD)
    if getattr(self, '_auto_depends', False):
        deps = ['-MMD', '-MF', obj + '.d']
    else:
        deps = []

    try:
        self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps +
                   extra_postargs, display = display)
    except DistutilsExecError:
        msg = str(get_exception())
        raise CompileError(msg)

    # add commandline flags to dependency file
    with open(obj + '.d', 'a') as f:
        f.write(_commandline_dep_string(cc_args, extra_postargs, pp_opts))

replace_method(UnixCCompiler, '_compile', UnixCCompiler__compile)


def UnixCCompiler_create_static_lib(self, objects, output_libname,
                                    output_dir=None, debug=0, target_lang=None):
    """
    Build a static library in a separate sub-process.

    Parameters
    ----------
    objects : list or tuple of str
        List of paths to object files used to build the static library.
    output_libname : str
        The library name as an absolute or relative (if `output_dir` is used)
        path.
    output_dir : str, optional
        The path to the output directory. Default is None, in which case
        the ``output_dir`` attribute of the UnixCCompiler instance.
    debug : bool, optional
        This parameter is not used.
    target_lang : str, optional
        This parameter is not used.

    Returns
    -------
    None

    """
    objects, output_dir = self._fix_object_args(objects, output_dir)

    output_filename = \
                    self.library_filename(output_libname, output_dir=output_dir)

    if self._need_link(objects, output_filename):
        try:
            # previous .a may be screwed up; best to remove it first
            # and recreate.
            # Also, ar on OS X doesn't handle updating universal archives
            os.unlink(output_filename)
        except (IOError, OSError):
            pass
        self.mkpath(os.path.dirname(output_filename))
        tmp_objects = objects + self.objects
        while tmp_objects:
            objects = tmp_objects[:50]
            tmp_objects = tmp_objects[50:]
            display = '%s: adding %d object files to %s' % (
                           os.path.basename(self.archiver[0]),
                           len(objects), output_filename)
            self.spawn(self.archiver + [output_filename] + objects,
                       display = display)

        # Not many Unices required ranlib anymore -- SunOS 4.x is, I
        # think the only major Unix that does.  Maybe we need some
        # platform intelligence here to skip ranlib if it's not
        # needed -- or maybe Python's configure script took care of
        # it for us, hence the check for leading colon.
        if self.ranlib:
            display = '%s:@ %s' % (os.path.basename(self.ranlib[0]),
                                   output_filename)
            try:
                self.spawn(self.ranlib + [output_filename],
                           display = display)
            except DistutilsExecError:
                msg = str(get_exception())
                raise LibError(msg)
    else:
        log.debug("skipping %s (up-to-date)", output_filename)
    return

replace_method(UnixCCompiler, 'create_static_lib',
               UnixCCompiler_create_static_lib)

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 3.40 AM
root / root
0755
__pycache__
--
31 Aug 2024 3.40 AM
root / root
0755
command
--
31 Aug 2024 3.40 AM
root / root
0755
fcompiler
--
31 Aug 2024 3.40 AM
root / root
0755
mingw
--
31 Aug 2024 3.40 AM
root / root
0755
tests
--
31 Aug 2024 3.40 AM
root / root
0755
__config__.py
1.14 KB
25 Apr 2023 2.38 AM
root / root
0644
__init__.py
0.729 KB
25 Apr 2023 2.30 AM
root / root
0644
__version__.py
0.147 KB
25 Apr 2023 2.30 AM
root / root
0644
ccompiler.py
27.868 KB
25 Apr 2023 2.30 AM
root / root
0644
compat.py
0.213 KB
25 Apr 2023 2.30 AM
root / root
0644
conv_template.py
9.46 KB
25 Apr 2023 2.30 AM
root / root
0644
core.py
7.991 KB
25 Apr 2023 2.30 AM
root / root
0644
cpuinfo.py
22.429 KB
25 Apr 2023 2.30 AM
root / root
0644
environment.py
2.291 KB
25 Apr 2023 2.30 AM
root / root
0644
exec_command.py
8.46 KB
25 Apr 2023 2.30 AM
root / root
0644
extension.py
2.897 KB
25 Apr 2023 2.30 AM
root / root
0644
from_template.py
7.625 KB
25 Apr 2023 2.30 AM
root / root
0644
info.py
0.153 KB
25 Apr 2023 2.30 AM
root / root
0644
intelccompiler.py
4.19 KB
25 Apr 2023 2.30 AM
root / root
0644
lib2def.py
3.43 KB
25 Apr 2023 2.30 AM
root / root
0644
line_endings.py
2.005 KB
25 Apr 2023 2.30 AM
root / root
0644
log.py
2.681 KB
25 Apr 2023 2.30 AM
root / root
0644
mingw32ccompiler.py
24.558 KB
25 Apr 2023 2.30 AM
root / root
0644
misc_util.py
80.051 KB
25 Apr 2023 2.30 AM
root / root
0644
msvc9compiler.py
2.205 KB
25 Apr 2023 2.30 AM
root / root
0644
msvccompiler.py
1.944 KB
25 Apr 2023 2.30 AM
root / root
0644
npy_pkg_config.py
12.933 KB
25 Apr 2023 2.30 AM
root / root
0644
numpy_distribution.py
0.684 KB
25 Apr 2023 2.30 AM
root / root
0644
pathccompiler.py
0.761 KB
25 Apr 2023 2.30 AM
root / root
0644
setup.py
0.575 KB
25 Apr 2023 2.30 AM
root / root
0644
site.cfg
0.17 KB
25 Apr 2023 2.30 AM
root / root
0644
system_info.py
83.284 KB
25 Apr 2023 2.30 AM
root / root
0644
unixccompiler.py
5.035 KB
25 Apr 2023 2.30 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF