Lines Matching +full:log +full:- +full:windows
18 from distutils import log
22 # An extension name is just a dot-separated list of Python NAMEs (ie.
23 # the same as a fully-qualified module name).
25 (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')
37 # XXX thoughts on how to deal with complex command-line options like
40 # lists of tuples of what-have-you.
41 # - each command needs a callback to process its command-line options
42 # - Command.__init__() needs access to its share of the whole
45 # - it then calls the current command class' option-parsing
46 # callback to deal with weird options like -D, which have to
49 # - that data structure (in this case, a list of 2-tuples)
52 # takes care of both command-line and client options
57 ('build-lib=', 'b',
59 ('build-temp=', 't',
60 "directory for temporary files (build by-products)"),
61 ('plat-name=', 'p',
62 "platform name to cross-compile for, if supported "
65 "ignore build-lib and put compiled extensions into the source " +
67 ('include-dirs=', 'I',
75 ('library-dirs=', 'L',
79 ('link-objects=', 'O',
89 ('swig-cpp', None,
91 ('swig-opts=', None,
99 boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user']
102 ('help-compiler', None,
186 # for extensions under windows use different directories
190 # the 'libs' directory is for binary installs - we assume that
192 # cross-compiling via a binary install anyway, so we let it go.
202 # this allows distutils on windows to work in the source tree
212 # win-amd64
243 # it has to be a list of 2-tuples. All the preprocessor symbols
290 # differently named. We convert these 2-tuples to Extension
311 # If we are cross-compiling, init the compiler now (if we are not
312 # cross-compiling, init would not hurt, but people may rely on
317 # And make sure that any compile/link-related options (which might
318 # come from the command-line or from the setup script) are set in
319 # that CCompiler object -- that way, they automatically apply to
345 Extension objects. We also support the old-style list of 2-tuples,
358 continue # OK! (assume type-checking done
364 "Extension instance or 2-tuple")
368 log.warn("old-style (ext_name, build_info) tuple found in "
370 "-- please convert to Extension instance", ext_name)
383 # OK, the (ext_name, build_info) dict is type-safe: convert it
387 # Easy stuff: one-to-one mapping from dict elements to
396 # Medium-easy stuff: same syntax/semantics, different names.
399 log.warn("'def_file' element of build info dict "
402 # Non-trivial stuff: 'macros' split into 'define_macros'
412 "must be 1- or 2-tuple")
430 # Sanity check the 'extensions' list -- can't assume this is being
444 # First, sanity-check the 'extensions' list
499 log.debug("skipping '%s' extension (up-to-date)", ext.name)
502 log.info("building '%s' extension", ext.name)
511 # XXX not honouring 'define_macros' or 'undef_macros' -- the
516 # - 'extra_compile_args' in Extension object
517 # - CFLAGS environment variable (not particularly
537 # XXX outdated variable, kept here in case third-part code
541 # Now link the object files together into a "shared object" --
574 # source -- but there should be an option to put SWIG output in
578 log.warn("--swig-cpp is deprecated - use --swig-opts=-c++")
580 if self.swig_cpp or ('-c++' in self.swig_opts) or \
581 ('-c++' in extension.swig_opts):
591 swig_targets[source] = new_sources[-1]
599 swig_cmd = [swig, "-python"]
602 swig_cmd.append("-c++")
611 log.info("swigging %s to %s", source, target)
612 self.spawn(swig_cmd + ["-o", target, source])
618 just "swig" -- it should be in the PATH. Tries a bit harder on
619 Windows.
625 # Windows (or so I presume!). If we find it there, great;
638 # -- Name generators -----------------------------------------------
648 filename = self.get_ext_filename(modpath[-1])
654 filename = os.path.join(*modpath[:-1]+[filename])
659 package = '.'.join(modpath[0:-1])
689 provided, "PyInit_" + module_name. Only relevant on Windows, where
692 suffix = '_' + ext.name.split('.')[-1]
694 # Unicode module name support as defined in PEP-489
695 # https://peps.python.org/pep-0489/#export-hook-name
698 suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii')
708 on Windows, we add the Python library (eg. python20.dll).
710 # The python library is always needed on Windows. For MSVC, this
712 # pyconfig.h that MSVC groks. The other Windows compilers all seem
731 # bpo-21536).
732 # On Cygwin (and if required, other POSIX-like platforms based on
733 # Windows like MinGW) it is simply necessary that all symbols in
744 # We are cross-compiling for one of the relevant platforms