Lines Matching +full:install +full:- +full:headers
1 """distutils.command.install
3 Implements the Distutils 'install' command."""
28 SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')
30 # The following code provides backward-compatible INSTALL_SCHEMES
45 if key == "headers" and key not in sys_scheme:
46 # On POSIX-y platforms, Python will:
47 # - Build from .h files in 'headers' (only there when
49 # - Install .h files to 'include'
50 # When 'headers' is missing, fall back to 'include'
61 if key == "headers":
64 # platlibdir is available since 3.9: bpo-1294959
75 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name',
83 'headers':
90 class install(Command): class
92 description = "install everything from build directory"
98 ('exec-prefix=', None,
99 "(Unix only) prefix for platform-specific files"),
101 "(Unix only) home directory to install under"),
104 ('install-base=', None,
105 "base installation directory (instead of --prefix or --home)"),
106 ('install-platbase=', None,
107 "base installation directory for platform-specific files " +
108 "(instead of --exec-prefix or --home)"),
110 "install everything relative to this alternate root directory"),
113 ('install-purelib=', None,
115 ('install-platlib=', None,
116 "installation directory for non-pure module distributions"),
117 ('install-lib=', None,
119 "(overrides --install-purelib and --install-platlib)"),
121 ('install-headers=', None,
122 "installation directory for C/C++ headers"),
123 ('install-scripts=', None,
125 ('install-data=', None,
128 # Byte-compilation options -- see install_lib.py for details, as
132 ('no-compile', None, "don't compile .py files"),
134 "also compile with optimization: -O1 for \"python -O\", "
135 "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
140 ('skip-build', None,
143 # Where to install documentation (eventually!)
144 #('doc-format=', None, "format of documentation to generate"),
145 #('install-man=', None, "directory for Unix man pages"),
146 #('install-html=', None, "directory for HTML documentation"),
147 #('install-info=', None, "directory for GNU info files"),
153 boolean_options = ['compile', 'force', 'skip-build']
157 "install in user site-package '%s'" % USER_SITE))
160 negative_opt = {'no-compile' : 'compile'}
165 # High-level options: these select both an installation base
174 # the --install-{platlib,purelib,scripts,data} options).
181 # scheme implied by prefix/exec-prefix/home and the contents of
184 self.install_platlib = None # non-pure (dists w/ extensions)
185 self.install_headers = None # for C/C++ headers
197 # These two are for putting non-packagized distributions into their
200 # be turned off if it makes no sense to install a .pth file. (But
201 # better to install it uselessly than to guess wrong and not
202 # install it when it's necessary and would be used!) Currently,
209 # out-of-date. 'skip_build' skips running the "build" command,
221 # are not user options, because if the user told the install
236 # -- Option finalizing methods -------------------------------------
238 # because this is where the policy for installing third-
247 # anything else we care to install from a Python module
249 # statement about how third-party stuff is added to a Python
261 "must supply either prefix/exec-prefix/home or " +
262 "install-base/install-platbase -- not both")
266 "must supply either home or prefix/exec-prefix -- not both")
276 self.warn("exec-prefix option ignored on this platform")
279 # Now the interesting logic -- so interesting that we farm it out
283 # install_platbase, user-supplied versions of
287 self.dump_dirs("pre-finalize_{unix,other}")
294 self.dump_dirs("post-finalize_{unix,other}()")
297 # and self.install_platbase -- that way, we can use $base or
331 self.dump_dirs("post-expand_basedirs()")
347 self.dump_dirs("post-expand_dirs()")
353 # Pick the actual directory to install all modules to: either
358 if self.distribution.ext_modules: # has extensions: non-pure
364 # Convert directories from Unix /-separated syntax to the local
367 'scripts', 'data', 'headers')
374 # non-packagized module distributions (hello, Numerical Python!) to
384 'scripts', 'data', 'headers')
388 # Find out the build directories, ie. where to install from.
393 # Punt on doc directories for now -- after all, we're punting on
404 if opt_name[-1] == "=":
405 opt_name = opt_name[0:-1]
425 "install-base or install-platbase supplied, but "
442 "must not supply exec-prefix without prefix")
456 """Finalizes options for non-posix platforms"""
475 "I don't know how to install stuff on '%s'" % os.name)
478 """Sets the install directories by applying the install schemes."""
501 """Calls `os.path.expanduser` on install dirs."""
532 "comma-separated string with 1 or 2 elements")
547 """Change the install directories pointed by name using root."""
562 # -- Command execution methods -------------------------------------
566 # Obviously have to build before we can install
569 # If we built for any other platform, we can't install.
571 # check warn_dir - it is a clue that the 'install' is happening
575 raise DistutilsPlatformError("Can't install when "
576 "cross-compiling")
578 # Run all sub-commands (at least those that need to be run)
604 "Python's module search path (sys.path) -- "
620 # -- Reporting methods ---------------------------------------------
623 """Assembles the outputs of all the sub-commands."""
640 """Returns the inputs of all the sub-commands"""
641 # XXX gee, this looks familiar ;-(
649 # -- Predicates for sub-command list -------------------------------
653 modules to install."""
658 """Returns true if the current distribution has any headers to
659 install."""
664 install."""
669 install."""