summaryrefslogtreecommitdiffstats
path: root/generic/tclDecls.h
Commit message (Expand)AuthorAgeFilesLines
* TIP#237 IMPLEMENTATIONdgp2005-10-081-19/+31
* * generic/tcl.h: Explicitly standardized on the use of stdarg.hdgp2005-09-131-11/+11
* TIP#219 IMPLEMENTATIONandreas_kupries2005-08-241-1/+45
* make genstubsdgp2005-06-071-1/+23
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+44
* * doc/DString.3: Eliminated use of identifier "string" in Tcl'sdgp2005-05-031-71/+74
* * generic/tcl.decls:dgp2005-05-021-3/+3
* TIP#218 IMPLEMENTATIONandreas_kupries2005-01-271-1/+12
* * generic/tclStubInit.c: Regenerated the stubs support code fromandreas_kupries2005-01-211-1/+27
* regendkf2005-01-191-1/+142
* TIP #221 IMPLEMENTATIONdgp2004-11-131-1/+56
* * generic/tcl.h: Moved the preprocessor logicdavygrvy2004-11-031-1/+15
* Re-commit after a `make genstubs` on a unix system, to restore unix line endingsdgp2004-06-071-6079/+6079
* * generic/tcl.h: Corrected Tcl_WideInt declarations so that the mingw Kevin B Kenny2004-06-051-6079/+6079
* Regendkf2004-05-131-1/+168
* Removed support for Mac OS Classic platform [Patch 918142]das2004-03-171-37/+19
* filesystem optimisation -- Three main issues accomplished: (1) cleaned up var...vincentdarley2004-01-211-19/+18
* Regendkf2003-09-291-1/+11
* * doc/FileSystem.3: Implementation ofdgp2003-09-051-1/+13
* Regendkf2003-08-251-1/+1558
* Regendkf2003-08-251-1/+104
* * generic/tcl.decls: Ported the changes from theandreas_kupries2003-06-091-1/+11
* fix for [Bug 732477]Joe Mistachkin2003-05-131-3/+3
* Regen.dkf2003-04-051-1/+98
* * generic/tcl.decls: Restored Tcl_Concat to return (char *). Likedgp2002-08-051-3/+3
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-125/+133
* removed load-related clientData, made filesystem staticvincentdarley2002-07-221-3/+3
* Resynch...dkf2002-06-221-3/+3
* vfs, winfs testsuitevincentdarley2002-06-131-3/+3
* fs clarification and windows fixesvincentdarley2002-06-121-3/+3
* TIP#91 implementation; makes old style channels binary compatible withdkf2002-05-241-1/+9
* * Updated interfaces of generic/tclVar.c accordingdgp2002-03-201-19/+19
* * doc/GetIndex.3:dgp2002-02-281-3/+3
* * generic/tcl.decls (Tcl_RegExpRange,Tcl_GetIndexFromObjStruct):dgp2002-02-201-6/+6
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-20/+75
* Added Tcl_CreateObjTrace, Tcl_GetCommandInfoFromToken andKevin B Kenny2002-02-101-3/+32
* * Partial TIP 27 rollback. Following routinesdgp2002-02-081-19/+19
* * For each interface identified in thedgp2002-01-311-21/+21
* * [Patch 505630] Updated interfaces of generic/tclBasic.cc (TIP 27).dgp2002-01-251-7/+8
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-45/+49
* * Updated socket interfaces according to TIP 27. Updated callers.dgp2002-01-231-11/+11
* * Updated APIs in generic/tclCmdMZ.c according to the guidelinesdgp2002-01-211-7/+7
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-13/+13
* * Updated APIs in generic/tclUtf.c and generic/tclRegexp.c accordingdgp2002-01-171-23/+24
* * Updated APIs in generic/tclParse.c according to the guidelinesdgp2002-01-171-3/+3
* * Updated APIs in generic/tclHistory.c according to the guidelinesdgp2002-01-161-19/+20
* * Updated APIs in generic/tclIOUtil.c and generic/tclPosixStr.cdgp2002-01-151-18/+18
* * Updated APIs in the file generic/tclIO.c according to the guidelinesdgp2002-01-151-26/+28
* * Updated APIs in the file generic/tclIndexObj.cdgp2002-01-141-9/+9
* Updated APIs in the files */tcl*Load*.c according to the guidelinesKevin B Kenny2002-01-091-3/+3
print(" %s: %s" % (opt_name, val)) def finalize_unix(self): if self.install_base is not None or self.install_platbase is not None: if ((self.install_lib is None and self.install_purelib is None and self.install_platlib is None) or self.install_headers is None or self.install_scripts is None or self.install_data is None): raise DistutilsOptionError( "install-base or install-platbase supplied, but " "installation scheme is incomplete") return if self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") else: if self.prefix is None: if self.exec_prefix is not None: raise DistutilsOptionError( "must not supply exec-prefix without prefix") self.prefix = os.path.normpath(sys.prefix) self.exec_prefix = os.path.normpath(sys.exec_prefix) else: if self.exec_prefix is None: self.exec_prefix = self.prefix self.install_base = self.prefix self.install_platbase = self.exec_prefix self.select_scheme("unix_prefix") def finalize_other(self): # Windows and Mac OS for now if self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") else: if self.prefix is None: self.prefix = os.path.normpath(sys.prefix) self.install_base = self.install_platbase = self.prefix try: self.select_scheme(os.name) except KeyError: raise DistutilsPlatformError( "I don't know how to install stuff on '%s'" % os.name) def select_scheme(self, name): # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] for key in SCHEME_KEYS: attrname = 'install_' + key if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: if os.name == 'posix': val = os.path.expanduser(val) val = subst_vars(val, self.config_vars) setattr(self, attr, val) def expand_basedirs(self): self._expand_attrs(['install_base', 'install_platbase', 'root']) def expand_dirs(self): self._expand_attrs(['install_purelib', 'install_platlib', 'install_lib', 'install_headers', 'install_scripts', 'install_data',]) def convert_paths(self, *names): for name in names: attr = "install_" + name setattr(self, attr, convert_path(getattr(self, attr))) def handle_extra_path(self): if self.extra_path is None: self.extra_path = self.distribution.extra_path if self.extra_path is not None: if isinstance(self.extra_path, str): self.extra_path = self.extra_path.split(',') if len(self.extra_path) == 1: path_file = extra_dirs = self.extra_path[0] elif len(self.extra_path) == 2: (path_file, extra_dirs) = self.extra_path else: raise DistutilsOptionError( "'extra_path' option must be a list, tuple, or " "comma-separated string with 1 or 2 elements") # convert to local form in case Unix notation used (as it # should be in setup scripts) extra_dirs = convert_path(extra_dirs) else: path_file = None extra_dirs = '' # XXX should we warn if path_file and not extra_dirs? (in which # case the path file would be harmless but pointless) self.path_file = path_file self.extra_dirs = extra_dirs def change_roots(self, *names): for name in names: attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) # -- Command execution methods ------------------------------------- def run(self): # Obviously have to build before we can install if not self.skip_build: self.run_command('build') # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) if self.path_file: self.create_path_file() # write list of installed files, if requested. if self.record: outputs = self.get_outputs() if self.root: # strip any package prefix root_len = len(self.root) for counter in range(len(outputs)): outputs[counter] = outputs[counter][root_len:] self.execute(write_file, (self.record, outputs), "writing list of installed files to '%s'" % self.record) sys_path = map(os.path.normpath, sys.path) sys_path = map(os.path.normcase, sys_path) install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and not (self.path_file and self.install_path_file) and install_lib not in sys_path): log.debug(("modules installed to '%s', which is not in " "Python's module search path (sys.path) -- " "you'll have to change the search path yourself"), self.install_lib) def create_path_file(self): filename = os.path.join(self.install_libbase, self.path_file + ".pth") if self.install_path_file: self.execute(write_file, (filename, [self.extra_dirs]), "creating %s" % filename) else: self.warn("path file '%s' not created" % filename) # -- Reporting methods --------------------------------------------- def get_outputs(self): # Assemble the outputs of all the sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) # Add the contents of cmd.get_outputs(), ensuring # that outputs doesn't contain duplicate entries for filename in cmd.get_outputs(): if filename not in outputs: outputs.append(filename) if self.path_file and self.install_path_file: outputs.append(os.path.join(self.install_libbase, self.path_file + ".pth")) return outputs def get_inputs(self): # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) inputs.extend(cmd.get_inputs()) return inputs # -- Predicates for sub-command list ------------------------------- def has_lib(self): """Return true if the current distribution has any Python modules to install.""" return (self.distribution.has_pure_modules() or self.distribution.has_ext_modules()) def has_headers(self): return self.distribution.has_headers() def has_scripts(self): return self.distribution.has_scripts() def has_data(self): return self.distribution.has_data_files() # 'sub_commands': a list of commands this command might have to run to # get its work done. See cmd.py for more info. sub_commands = [('install_lib', has_lib), ('install_headers', has_headers), ('install_scripts', has_scripts), ('install_data', has_data), ('install_egg_info', lambda self:True), ]