From hinsen@cnrs-orleans.fr Mon Apr 2 11:44:00 2001 From: hinsen@cnrs-orleans.fr (Konrad Hinsen) Date: Mon Apr 2 10:44:00 2001 Subject: [Distutils] Including an empty directory Message-ID: <200104021444.QAA20842@chinon.cnrs-orleans.fr> How can I tell Distutils to include an empty directory in the source code distribution? Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- From akuchlin@mems-exchange.org Mon Apr 2 12:05:01 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Mon Apr 2 11:05:01 2001 Subject: [Distutils] Including an empty directory In-Reply-To: <200104021444.QAA20842@chinon.cnrs-orleans.fr>; from hinsen@cnrs-orleans.fr on Mon, Apr 02, 2001 at 04:44:07PM +0200 References: <200104021444.QAA20842@chinon.cnrs-orleans.fr> Message-ID: <20010402110411.C491@ute.cnri.reston.va.us> On Mon, Apr 02, 2001 at 04:44:07PM +0200, Konrad Hinsen wrote: >How can I tell Distutils to include an empty directory in the source >code distribution? Hmm... looks like you can't. If a file fails an os.path.isfile() check, sdist.py skips it and prints a warning. That's probably worth loosening. Creating directories makes sense, but I don't think we need to support symlinks or more exotic file types such as pipes. --amk From hinsen@cnrs-orleans.fr Mon Apr 2 12:20:03 2001 From: hinsen@cnrs-orleans.fr (Konrad Hinsen) Date: Mon Apr 2 11:20:03 2001 Subject: [Distutils] Compiler options Message-ID: <200104021520.RAA21077@chinon.cnrs-orleans.fr> Judging from a quick glance at the relevant modules, there seems to be no provision in Distutils to change the compiler options (specifically optimization and debug options) from the values used during Python installation. Is this true and if so, is this a temporary implementation restriction or an intentional design decision? Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- From mal@lemburg.com Mon Apr 2 13:15:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Apr 2 12:15:01 2001 Subject: [Distutils] Compiler options References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> Message-ID: <3AC8A535.54830205@lemburg.com> Konrad Hinsen wrote: > > Judging from a quick glance at the relevant modules, there seems to be > no provision in Distutils to change the compiler options (specifically > optimization and debug options) from the values used during Python > installation. Is this true and if so, is this a temporary > implementation restriction or an intentional design decision? Funny, I stumbled into the same problem just a few days ago when I wrapped the 2.0.1 release of mxODBC. I found that the MS VC default options did not turn on optimization and that some important flags were missing. After looking at the distutils code, I found that there is no way to subclass the compiler class *and* hvae distutils use it, so I eventually ended up with a hack: # # mx MSVC Compiler extension # # We want some extra options for the MSVCCompiler, so we add them # here. This is an awful hack, but there seems to be no other way to # subclass a standard distutils C compiler class... from distutils.msvccompiler import MSVCCompiler # remember old __init__ old_MSVCCompiler__init__ = MSVCCompiler.__init__ def mx_msvccompiler__init__(self, *args, **kws): apply(old_MSVCCompiler__init__, (self,) + args, kws) self.compile_options.extend(['/O2','/Gf','/GB','/GD']) # "install" new __init__ MSVCCompiler.__init__ = mx_msvccompiler__init__ I think it would be worthwhile thinking about a more generic way to implement such compiler specific option changes... -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From hinsen@cnrs-orleans.fr Mon Apr 2 13:31:01 2001 From: hinsen@cnrs-orleans.fr (Konrad Hinsen) Date: Mon Apr 2 12:31:01 2001 Subject: [Distutils] Compiler options In-Reply-To: <3AC8A535.54830205@lemburg.com> (mal@lemburg.com) References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> <3AC8A535.54830205@lemburg.com> Message-ID: <200104021630.SAA21307@chinon.cnrs-orleans.fr> > I think it would be worthwhile thinking about a more generic > way to implement such compiler specific option changes... Indeed. But that would still not solve my problem: I want to tell Distutils to compile some module with highest optimization level, lowest optimization level, or default optimization level, and perhaps also whether debugging info should be included. And this should of course work with any compiler. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- From hinsen@cnrs-orleans.fr Mon Apr 2 13:34:01 2001 From: hinsen@cnrs-orleans.fr (Konrad Hinsen) Date: Mon Apr 2 12:34:01 2001 Subject: [Distutils] Excluding files Message-ID: <200104021634.SAA21320@chinon.cnrs-orleans.fr> With the "prune" command in MANIFEST.in, I can exclude certain directories from a recursive search. But how can I exclude a single file from an include? I need this to keep modules under development out of the public releases. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- From akuchlin@mems-exchange.org Mon Apr 2 13:51:01 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Mon Apr 2 12:51:01 2001 Subject: [Distutils] Excluding files In-Reply-To: <200104021634.SAA21320@chinon.cnrs-orleans.fr>; from hinsen@cnrs-orleans.fr on Mon, Apr 02, 2001 at 06:34:28PM +0200 References: <200104021634.SAA21320@chinon.cnrs-orleans.fr> Message-ID: <20010402125008.F491@ute.cnri.reston.va.us> On Mon, Apr 02, 2001 at 06:34:28PM +0200, Konrad Hinsen wrote: >With the "prune" command in MANIFEST.in, I can exclude certain >directories from a recursive search. But how can I exclude a single >file from an include? I need this to keep modules under development >out of the public releases. Does 'exclude' do what you want? ('exclude dodgymodule.*', for example...) --amk From thomas.heller@ion-tof.com Mon Apr 2 15:49:02 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 2 14:49:02 2001 Subject: [Distutils] Compiler options References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> <3AC8A535.54830205@lemburg.com> Message-ID: <008401c0bba5$834096a0$e000a8c0@thomasnotebook> > Konrad Hinsen wrote: > > > > Judging from a quick glance at the relevant modules, there seems to be > > no provision in Distutils to change the compiler options (specifically > > optimization and debug options) from the values used during Python > > installation. Is this true and if so, is this a temporary > > implementation restriction or an intentional design decision? I vaguely remember some code which is intended to pickup a CFLAGS environment var. Marc-Andre: > > Funny, I stumbled into the same problem just a few days ago when > I wrapped the 2.0.1 release of mxODBC. I found that the MS VC > default options did not turn on optimization and that some > important flags were missing. [...] > > apply(old_MSVCCompiler__init__, (self,) + args, kws) > self.compile_options.extend(['/O2','/Gf','/GB','/GD']) > Optimization is definitely turned on (distutils uses /Ox /MD /W3 /GX): /Ox - This option combines optimizing options to produce the fastest possible program. /GD is marked as 'for future use'. /GB favors the Pentium Processor (imo this makes sense). /Gf eliminates duplicate strings (imo also makes sense). Thomas From mal@lemburg.com Mon Apr 2 16:03:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Apr 2 15:03:01 2001 Subject: [Distutils] Compiler options References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> <3AC8A535.54830205@lemburg.com> <008401c0bba5$834096a0$e000a8c0@thomasnotebook> Message-ID: <3AC8CC9C.38FA35C@lemburg.com> Thomas Heller wrote: > > > Konrad Hinsen wrote: > > > > > > Judging from a quick glance at the relevant modules, there seems to be > > > no provision in Distutils to change the compiler options (specifically > > > optimization and debug options) from the values used during Python > > > installation. Is this true and if so, is this a temporary > > > implementation restriction or an intentional design decision? > I vaguely remember some code which is intended to pickup a CFLAGS > environment var. It's in there, but it really only makes sense on Unix platforms where this method is in common use. Still, I'd like to keep all distutils setup techniques in Python if possible. > Marc-Andre: > > > > Funny, I stumbled into the same problem just a few days ago when > > I wrapped the 2.0.1 release of mxODBC. I found that the MS VC > > default options did not turn on optimization and that some > > important flags were missing. > [...] > > > > apply(old_MSVCCompiler__init__, (self,) + args, kws) > > self.compile_options.extend(['/O2','/Gf','/GB','/GD']) > > > Optimization is definitely turned on (distutils uses /Ox /MD /W3 /GX): > > /Ox - This option combines optimizing options to produce the fastest > possible program. Oh, I didn't know that... anyway, the code generated with the few extra options does run noticably faster on my machine. > /GD is marked as 'for future use'. Running cl /? gives this explanation: /GD Optimieren fuer Windows-DLL (optimize for Windows DLL) IMO, makes sense too, since PYD files are really Windows DLLs. > /GB favors the Pentium Processor (imo this makes sense). > /Gf eliminates duplicate strings (imo also makes sense). BTW, I did see /Ob2 somewhere but can't find any docs for it (also it seems to be only available in the VC pro edition). /V might also be useful... -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From thomas.heller@ion-tof.com Mon Apr 2 16:13:00 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 2 15:13:00 2001 Subject: [Distutils] Compiler options References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> <3AC8A535.54830205@lemburg.com> <008401c0bba5$834096a0$e000a8c0@thomasnotebook> <3AC8CC9C.38FA35C@lemburg.com> Message-ID: <00ab01c0bba8$c932e6b0$e000a8c0@thomasnotebook> > > I vaguely remember some code which is intended to pickup a CFLAGS > > environment var. > > It's in there, but it really only makes sense on Unix platforms > where this method is in common use. Still, I'd like to keep all > distutils setup techniques in Python if possible. Yes. We need compiler and platform independent compiler flags. > > Optimization is definitely turned on (distutils uses /Ox /MD /W3 /GX): > > > > /Ox - This option combines optimizing options to produce the fastest > > possible program. > > Oh, I didn't know that... anyway, the code generated with the > few extra options does run noticably faster on my machine. Maybe there are differences in the pro and 'not pro' compilers, maybe also between VC5 and VC6? > > > /GD is marked as 'for future use'. > > Running cl /? gives this explanation: > > /GD Optimieren fuer Windows-DLL (optimize for Windows DLL) My compiler (VC6 prof) gives the same info, 'future use' is mentioned in the MSDN docs. Maybe MS simply forgot to remove this flag and the corresponding /GA flag which generated different code in their 16-bit compiler? (Note that on win32, dlls and exes are very, very similar) > BTW, I did see /Ob2 somewhere but can't find any docs for it > (also it seems to be only available in the VC pro edition). The /Ob flags specify how to inline functions. > > /V might also be useful... ??? Thomas From thomas.heller@ion-tof.com Mon Apr 2 16:22:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 2 15:22:01 2001 Subject: [Distutils] Compiler options References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> <3AC8A535.54830205@lemburg.com> <008401c0bba5$834096a0$e000a8c0@thomasnotebook> <3AC8CC9C.38FA35C@lemburg.com> Message-ID: <00e101c0bbaa$20a3e420$e000a8c0@thomasnotebook> Just for the record: The vc6 project file distributed with python2.1 uses the following flags to build the release version: '/MD /W3 /GX /Zi /O2' Thomas From akuchlin@mems-exchange.org Mon Apr 2 18:13:06 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Mon Apr 2 17:13:06 2001 Subject: [Distutils] Compiler options In-Reply-To: <200104021630.SAA21307@chinon.cnrs-orleans.fr>; from hinsen@cnrs-orleans.fr on Mon, Apr 02, 2001 at 06:30:41PM +0200 References: <200104021520.RAA21077@chinon.cnrs-orleans.fr> <3AC8A535.54830205@lemburg.com> <200104021630.SAA21307@chinon.cnrs-orleans.fr> Message-ID: <20010402171239.A3763@ute.cnri.reston.va.us> On Mon, Apr 02, 2001 at 06:30:41PM +0200, Konrad Hinsen wrote: >Indeed. But that would still not solve my problem: I want to tell >Distutils to compile some module with highest optimization level, >lowest optimization level, or default optimization level, and perhaps >also whether debugging info should be included. And this should of >course work with any compiler. One subtlety is that some compiler arguments are required, such as the -n32 switches on SGI, and can't be changed at the risk of error. Other arguments such as -g and -O can be varied safely, of course, but I don't know if Python distinguishes between the two types of switches on all platforms. For example, the SGI-related options are separated out as $(SGI_ABI), but is that true of all possible switches on all platforms? --amk From pete@visionart.com Mon Apr 2 19:42:01 2001 From: pete@visionart.com (Pete Shinners) Date: Mon Apr 2 18:42:01 2001 Subject: [Distutils] wininst.exe source Message-ID: <001801c0bbc5$dacec7f0$f43f93cd@visionart.com> where is the source for the WININST.EXE stub executable that is used for bdist_winist? i looked around but did not see it. is it created from some other 'installation tool', or is it simply a compiled program. i was thinking of trying to hack together something with py2exe and a slightly different wininst so i could create compiled/installable executables in one swift step. From thomas.heller@ion-tof.com Tue Apr 3 04:01:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Tue Apr 3 03:01:01 2001 Subject: [Distutils] wininst.exe source References: <001801c0bbc5$dacec7f0$f43f93cd@visionart.com> Message-ID: <021c01c0bc0b$b387d6a0$e000a8c0@thomasnotebook> > where is the source for the WININST.EXE stub executable > that is used for bdist_winist? i looked around but did > not see it. is it created from some other 'installation > tool', or is it simply a compiled program. It's available via CVS, start here: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=python Unfortunately, it is not yet built with distutils (what a shame). Thomas From thomas.heller@ion-tof.com Tue Apr 3 04:19:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Tue Apr 3 03:19:01 2001 Subject: [Distutils] wininst.exe source References: <001801c0bbc5$dacec7f0$f43f93cd@visionart.com> <021c01c0bc0b$b387d6a0$e000a8c0@thomasnotebook> Message-ID: <032701c0bc0e$380b69d0$e000a8c0@thomasnotebook> > > where is the source for the WININST.EXE stub executable > > that is used for bdist_winist? i looked around but did > > not see it. is it created from some other 'installation > > tool', or is it simply a compiled program. > It's available via CVS, start here: > http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=python > Maybe this was a little bit unfair ;-): it is in the distutils/misc subdirectory. Thomas From hinsen@cnrs-orleans.fr Tue Apr 3 10:10:00 2001 From: hinsen@cnrs-orleans.fr (Konrad Hinsen) Date: Tue Apr 3 09:10:00 2001 Subject: [Distutils] Re: Excluding files Message-ID: <200104031310.PAA22562@chinon.cnrs-orleans.fr> > >directories from a recursive search. But how can I exclude a single > >file from an include? I need this to keep modules under development > >out of the public releases. > > Does 'exclude' do what you want? ('exclude dodgymodule.*', for example...) Ehhh.... Yes, it does. It would be nice if this were mentioned in the manual... Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- From hinsen@cnrs-orleans.fr Tue Apr 3 10:14:01 2001 From: hinsen@cnrs-orleans.fr (Konrad Hinsen) Date: Tue Apr 3 09:14:01 2001 Subject: [Distutils] Re: Including an empty directory Message-ID: <200104031314.PAA22569@chinon.cnrs-orleans.fr> > Hmm... looks like you can't. If a file fails an os.path.isfile() > check, sdist.py skips it and prints a warning. That's probably worth > loosening. Creating directories makes sense, but I don't think we > need to support symlinks or more exotic file types such as pipes. Here are the necessary patches from my setup.py: from distutils.core import setup, Extension from distutils.command.sdist import sdist from distutils import dir_util from distutils.filelist import FileList, translate_pattern class ModifiedFileList(FileList): def findall(self, dir=os.curdir): from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK list = [] stack = [dir] pop = stack.pop push = stack.append while stack: dir = pop() names = os.listdir(dir) for name in names: if dir != os.curdir: # avoid the dreaded "./" syndrome fullname = os.path.join(dir, name) else: fullname = name stat = os.stat(fullname) mode = stat[ST_MODE] if S_ISREG(mode): list.append(fullname) elif S_ISDIR(mode) and not S_ISLNK(mode): list.append(fullname) push(fullname) self.allfiles = list class modified_sdist(sdist): def run (self): self.filelist = ModifiedFileList() self.check_metadata() self.get_file_list() if self.manifest_only: return self.make_distribution() def make_release_tree (self, base_dir, files): self.mkpath(base_dir) dir_util.create_tree(base_dir, files, verbose=self.verbose, dry_run=self.dry_run) if hasattr(os, 'link'): # can make hard links on this system link = 'hard' msg = "making hard links in %s..." % base_dir else: # nope, have to copy link = None msg = "copying files to %s..." % base_dir if not files: self.warn("no files to distribute -- empty manifest?") else: self.announce(msg) for file in files: if os.path.isfile(file): dest = os.path.join(base_dir, file) self.copy_file(file, dest, link=link) elif os.path.isdir(file): dir_util.mkpath(os.path.join(base_dir, file)) else: self.warn("'%s' not a regular file or directory -- skipping" % file) setup(... cmdclass = {'sdist': modified_sdist}) I am not too happy with this kind of patching, as I rely quite a bit on undocumented internals of Distutils, which might change in future versions. But for the moment I seem to have no other choice. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- From R.Liebscher@gmx.de Wed Apr 4 05:00:00 2001 From: R.Liebscher@gmx.de (Rene Liebscher) Date: Wed Apr 4 04:00:00 2001 Subject: [Distutils] wininst.exe source References: <001801c0bbc5$dacec7f0$f43f93cd@visionart.com> <021c01c0bc0b$b387d6a0$e000a8c0@thomasnotebook> Message-ID: <3ACAD3E6.BAB86518@gmx.de> This is a multi-part message in MIME format. --------------B0A07778FAF8B9235ECAAC8D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thomas Heller wrote: > > > where is the source for the WININST.EXE stub executable > > that is used for bdist_winist? i looked around but did > > not see it. is it created from some other 'installation > > tool', or is it simply a compiled program. > It's available via CVS, start here: > http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=python > > Unfortunately, it is not yet built with distutils (what a shame). > It is no problem to build it with distutils. See the attached file. Copy it to your misc directory and double-click. (It needs the zlib library and header files in a subdirectory "zlib" and the UPX packer in the current directory or somewhere else in the path, if want the exe-file compressed as the original wininst.exe is.) It uses the msvc compiler class, it would work with other compilers too, if you change some places in the code (unnamed unions and the resource file) which are handled a little bit different in other compilers. Kind regards Rene Liebscher --------------B0A07778FAF8B9235ECAAC8D Content-Type: text/plain; charset=us-ascii; name="build_wininst.py" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="build_wininst.py" """ Build the windows installer executable. We let distutils figure out how to compile. Most parameters are the same as distutils uses for its Extensions specification. """ # created 2000/09/05, Rene Liebscher __revision__ = "$Id: build_wininst.py $" import os,sys from distutils.sysconfig import customize_compiler from distutils.ccompiler import new_compiler from distutils.dep_util import newer_group # compile some source files to an executable def build_exe( compiler = None, # "msvc","mingw32",.. # see distutils --help-compiler verbose = 1, # 0 dry_run = 0, # 1 force = 1, # 1 debug = 0, # 1 extra_compile_args = [], extra_link_args = [], build_temp = ".", sources = [], include_dirs = ["."], output_name = "noname", output_dir = ".", export_symbols = None, libraries = [], library_dirs = ["."], runtime_library_dirs = None ): # Setup the CCompiler object that we'll use to do all the # compiling and linking compiler_obj = new_compiler (compiler=compiler, verbose=verbose, dry_run=dry_run, force=force) customize_compiler(compiler_obj) # how to call the result on this platform output_filename = compiler_obj.executable_filename( basename=output_name, output_dir=output_dir) # check if really compiling is really needed if not (force or newer_group(sources, output_filename, 'newer')): sys.stderr.write ("skipping '%s' (up-to-date)\n" % output_filename) else: sys.stderr.write ("building '%s'\n" % output_filename) # Next, compile the source code to object files. extra_args = extra_compile_args or [] if os.environ.has_key('CFLAGS'): extra_args.extend(string.split(os.environ['CFLAGS'])) # compile all source files objects = compiler_obj.compile (sources, output_dir=build_temp, #macros=macros, include_dirs=include_dirs, debug=debug, extra_postargs=extra_args) extra_args = extra_link_args or [] # link all object files to the exe compiler_obj.link (compiler_obj.EXECUTABLE, objects, output_filename, libraries=libraries, library_dirs=library_dirs, runtime_library_dirs=runtime_library_dirs, extra_postargs=extra_args, export_symbols=export_symbols, debug=debug, build_temp=build_temp) from distutils.spawn import find_executable,spawn upx_exe = find_executable("upx") if upx_exe: spawn([upx_exe,output_filename]) # build_exe # and now use build_exe to do the actual build build_exe( #compiler="bcpp", output_name = "wininst", sources=["install.c","extract.c","install.rc"], include_dirs=["zlib"], library_dirs=["zlib"], # zlib is in subdirectory zlib libraries=["zlib","gdi32","comctl32", "user32","advapi32"], ) --------------B0A07778FAF8B9235ECAAC8D-- From R.Liebscher@gmx.de Wed Apr 4 05:21:01 2001 From: R.Liebscher@gmx.de (Rene Liebscher) Date: Wed Apr 4 04:21:01 2001 Subject: [Distutils] wininst.exe source References: <001801c0bbc5$dacec7f0$f43f93cd@visionart.com> <021c01c0bc0b$b387d6a0$e000a8c0@thomasnotebook> <3ACAD3E6.BAB86518@gmx.de> Message-ID: <3ACAD8E9.81239718@gmx.de> Rene Liebscher wrote: > > Thomas Heller wrote: > > > > > where is the source for the WININST.EXE stub executable > > > that is used for bdist_winist? i looked around but did > > > not see it. is it created from some other 'installation > > > tool', or is it simply a compiled program. > > It's available via CVS, start here: > > http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=python > > > > Unfortunately, it is not yet built with distutils (what a shame). > > > It is no problem to build it with distutils. > See the attached file. > > ... > There are two things which need to be corrected: 1. change the default of the force parameter of build_exe() to 0 2. add the missing "return" after line 54 Kind regards Rene Liebscher From amos@digicool.com Wed Apr 4 21:36:02 2001 From: amos@digicool.com (Amos Latteier) Date: Wed Apr 4 20:36:02 2001 Subject: [Distutils] Catalog Server Prototype Progress Message-ID: <3ACBBCD2.50A531E2@digicool.com> Hi Guys, I just wanted to let folks know that I've made some more progress on my catalog server prototype. http://63.230.174.230:8080/archive Now you can use OpenPGP signatures with source and binary distributions. Also authors can include their pubic keys on their info pages. I've uploaded the lasted version of the server code to the catalog server (hey, it's even signed). I'm getting pretty close to being able to support PEP 243. The missing pieces are detailed in the TODO.txt file. As always, feedback is most welcome! -Amos -- Amos Latteier mailto:amos@digicool.com Digital Creations http://www.digicool.com From mal@lemburg.com Thu Apr 5 04:49:00 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu Apr 5 03:49:00 2001 Subject: [Distutils] Summary of requested features Message-ID: <3ACC2324.2B987B93@lemburg.com> Just so that we don't forget, here's the start of a feature request summary: * binary packages should include the Python version in their filename * all distutils packages should include a package release number (like the RPM one) meaning that you can generate new package versions without having to bump the software version number; we could use a new setup() keyword "release" for this [more features to add here] Please complete this list, so that we can add these to the distutils TODO (or even better, since more visible, to a distutils feature request PEP). Thanks, -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From mwa@gate.net Thu Apr 5 12:08:01 2001 From: mwa@gate.net (Mark W. Alexander) Date: Thu Apr 5 11:08:01 2001 Subject: [Distutils] Summary of requested features In-Reply-To: <3ACC2324.2B987B93@lemburg.com> Message-ID: On Thu, 5 Apr 2001, M.-A. Lemburg wrote: > Date: Thu, 05 Apr 2001 09:47:48 +0200 > From: M.-A. Lemburg > To: "Distribution Utilities SIG @ Python.Org" > Subject: [Distutils] Summary of requested features > > Just so that we don't forget, here's the start of a feature request > summary: > > * binary packages should include the Python version in their > filename > > * all distutils packages should include a package release number > (like the RPM one) meaning that you can generate new package > versions without having to bump the software version number; > we could use a new setup() keyword "release" for this Was the final format agreed to? Like: packagename-pkgversion-binaryrevision-pythonversion Mark From akuchlin@mems-exchange.org Thu Apr 5 12:24:01 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Thu Apr 5 11:24:01 2001 Subject: [Distutils] Summary of requested features In-Reply-To: <3ACC2324.2B987B93@lemburg.com>; from mal@lemburg.com on Thu, Apr 05, 2001 at 09:47:48AM +0200 References: <3ACC2324.2B987B93@lemburg.com> Message-ID: <20010405112315.A4031@ute.cnri.reston.va.us> On Thu, Apr 05, 2001 at 09:47:48AM +0200, M.-A. Lemburg wrote: >Just so that we don't forget, here's the start of a feature request >summary: Ooh, good timing! I was just thinking this morning that I should post a request for features ofr Distutils 1.1. >[more features to add here] Things on my list: * Konrad's suggested fixes (allowing single directories in MANIFEST, etc.) * Additional install_ subcommands: for DTDs and SGML catalogs, for TeX files. If you've had to write a custom install command for one of your setup.py files, consider submitting it. * Greg has been making noises about filling out the documentation, paid for by the last dregs of the Python Consortium money, but I don't know when he'll find the time. Release plans: I'm not going to work on this at all until Python 2.1 is out; even something as trivial as the directory/MANIFEST fix is not going to be added when a new release is so close. When 2.1final ships, I'll make a Distutils 1.0.2 release, and then we can start on work for 1.1. --amk From thomas.heller@ion-tof.com Thu Apr 5 12:42:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Thu Apr 5 11:42:01 2001 Subject: [Distutils] Summary of requested features References: <3ACC2324.2B987B93@lemburg.com> Message-ID: <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook> > Just so that we don't forget, here's the start of a feature request > summary: > > * binary packages should include the Python version in their > filename > > * all distutils packages should include a package release number > (like the RPM one) meaning that you can generate new package > versions without having to bump the software version number; > we could use a new setup() keyword "release" for this > * extend the install_* commands so that they write uninstall information * implement an uninstall command using the information above * write a test suite for distutils (I've just read Martin Fowler's refactoring book, so I know that tests are needed for refactoring) * refactor the build_ext methods, so that they are easier to extend (maybe this will also unify the CCompiler classes) * fix the *_clib commands * implement test command: often requested (but low priority IMO) and finally: * docs, docs, docs (I _will_ completely document the windows installer, but nothing more) Thomas From akuchlin@mems-exchange.org Thu Apr 5 12:50:00 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Thu Apr 5 11:50:00 2001 Subject: [Distutils] Summary of requested features In-Reply-To: <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook>; from thomas.heller@ion-tof.com on Thu, Apr 05, 2001 at 05:41:36PM +0200 References: <3ACC2324.2B987B93@lemburg.com> <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook> Message-ID: <20010405114901.B4031@ute.cnri.reston.va.us> On Thu, Apr 05, 2001 at 05:41:36PM +0200, Thomas Heller wrote: > * fix the *_clib commands Can you please remind me what's wrong with them (or file the appropriate SourceForge bugs)? --amk From Paul.Moore@uk.origin-it.com Thu Apr 5 12:55:11 2001 From: Paul.Moore@uk.origin-it.com (Moore, Paul) Date: Thu Apr 5 11:55:11 2001 Subject: [Distutils] Summary of requested features Message-ID: <714DFA46B9BBD0119CD000805FC1F53B01B5ADF8@ukrux002.rundc.uk.origin-it.com> From: M.-A. Lemburg [mailto:mal@lemburg.com] > Just so that we don't forget, here's the start of a feature request > summary: > [more features to add here] > > Please complete this list, so that we can add these to the distutils > TODO (or even better, since more visible, to a distutils feature > request PEP). Add into this * Change default install location for Mac to site-packages (to match what site.py in 2.1 does) [I have no personal interest in Macs, this just seems sensible] * Change default install location on Windows to site-packages (if my PEP on this subject - unnumbered as yet - gets accepted) Paul. From thomas.heller@ion-tof.com Thu Apr 5 13:04:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Thu Apr 5 12:04:01 2001 Subject: [Distutils] Summary of requested features References: <3ACC2324.2B987B93@lemburg.com> <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook> <20010405114901.B4031@ute.cnri.reston.va.us> Message-ID: <012f01c0bde9$dead68b0$e000a8c0@thomasnotebook> > On Thu, Apr 05, 2001 at 05:41:36PM +0200, Thomas Heller wrote: > > * fix the *_clib commands > > Can you please remind me what's wrong with them (or file the > appropriate SourceForge bugs)? > https://sourceforge.net/tracker/index.php?func=detail&aid=414032&group_id=5470&atid=105470 Thomas From mal@lemburg.com Thu Apr 5 13:42:03 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu Apr 5 12:42:03 2001 Subject: [Distutils] Summary of requested features References: <3ACC2324.2B987B93@lemburg.com> <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook> <20010405114901.B4031@ute.cnri.reston.va.us> <012f01c0bde9$dead68b0$e000a8c0@thomasnotebook> Message-ID: <3ACCA03A.83722B76@lemburg.com> Thanks for your input. Here's an updated summary: Distutils 1.1 Feature Request List: * Binary packages should include the Python version in their filename * All distutils packages should include a package release number (like the RPM one) meaning that you can generate new package versions without having to bump the software version number; we could use a new setup() keyword "release" for this. Filename format suggestion: packagename-pkgversion-binaryrevision-pythonversion[.platform]. * Konrad's suggested fixes (allowing single directories in MANIFEST, etc.) * Additional install_ subcommands: for DTDs and SGML catalogs, for TeX files. If you've had to write a custom install command for one of your setup.py files, consider submitting it. * extend the install_* commands so that they write uninstall information * implement an uninstall command using the information above * write a test suite for distutils (tests are needed for refactoring) * refactor the build_ext methods, so that they are easier to extend (maybe this will also unify the CCompiler classes) * fix the *_clib commands See https://sourceforge.net/tracker/index.php?func=detail&aid=414032&group_id=5470&atid=105470 * implement test command: often requested (low priority ?!) * docs, docs, docs (Thomas Heller will document the windows installer, Greg mentioned filling up some of the empty spaces in the existing documentation) * Change default install location for Mac to site-packages (to match what site.py in 2.1 does) * Change default install location on Windows to site-packages (see PEP XXX on this subject) [more features to add here] Please complete this list, so that we can add these to the distutils TODO (or even better, since more visible, to a distutils feature request PEP). Thanks, -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From akuchlin@mems-exchange.org Thu Apr 5 13:52:02 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Thu Apr 5 12:52:02 2001 Subject: [Distutils] Summary of requested features In-Reply-To: <3ACCA03A.83722B76@lemburg.com>; from mal@lemburg.com on Thu, Apr 05, 2001 at 06:41:30PM +0200 References: <3ACC2324.2B987B93@lemburg.com> <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook> <20010405114901.B4031@ute.cnri.reston.va.us> <012f01c0bde9$dead68b0$e000a8c0@thomasnotebook> <3ACCA03A.83722B76@lemburg.com> Message-ID: <20010405125156.E4031@ute.cnri.reston.va.us> On Thu, Apr 05, 2001 at 06:41:30PM +0200, M.-A. Lemburg wrote: >Please complete this list, so that we can add these to the distutils >TODO (or even better, since more visible, to a distutils feature >request PEP). I've already incorporated the list into the TODO at the top of the Distutils package (not in Lib/distutils itself), and will include further ideas and revisions as people post them. At this point, I don't feel anything here requires a PEP, except perhaps for the package database required for uninstalling. --amk From thomas.heller@ion-tof.com Thu Apr 5 14:08:02 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Thu Apr 5 13:08:02 2001 Subject: [Distutils] Summary of requested features References: <3ACC2324.2B987B93@lemburg.com> <00cb01c0bde6$e62f4840$e000a8c0@thomasnotebook> <20010405114901.B4031@ute.cnri.reston.va.us> <012f01c0bde9$dead68b0$e000a8c0@thomasnotebook> <3ACCA03A.83722B76@lemburg.com> <20010405125156.E4031@ute.cnri.reston.va.us> Message-ID: <01a501c0bdf2$ecc7db70$e000a8c0@thomasnotebook> > I've already incorporated the list into the TODO at the top of the > Distutils package (not in Lib/distutils itself), and will include > further ideas and revisions as people post them. Another point: Should the distutils tree (what's the correct CVS term here?) be finally moved into the python tree? Recently Pete Shinners wondered where the source for the windows installer is... It's not even in the python source distribution. Thomas From mwa@gate.net Fri Apr 6 17:47:01 2001 From: mwa@gate.net (Mark W. Alexander) Date: Fri Apr 6 16:47:01 2001 Subject: [Distutils] Solaris and HP binary commands Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---656673009-1276059836-986589469=:53210 Content-Type: TEXT/PLAIN; charset=US-ASCII Thanks to Andrew's work on PEP 241, I finally got motivated to revisit bdist commands for Solaris pkgtool and HP's SD-UX. Attached are three files bdist_packager.py provides an abstract base class for bdist commands. It provides easy access to all the PEP 241 metadata fields, plus "revision" for the package revision and installation scripts for preinstall, postinstall preremove, and postremove. That covers the base characteristics of all the package managers that I'm familiar with. If anyone can think of any others, let me know, otherwise additional extensions would be implemented in the specific packager's commands. I would, however, discourage _requiring_ any additional fields. It would be nice if by simply supplying the PEP241 metadata under the [bdist_packager] section all subclassed packagers worked with no further effort. It also has rudimentary relocation support by including a --no-autorelocate option. The bdist_packager is also where I see creating seperate binary packages for sub-packages supported. My need for that is much less than my desire for it right now, so I didn't give it much thought as I wrote it. I'd be delighted to hear any comments and suggestions on how to approach sub-packaging, though. The bdist_pktool command provides support for the Solaris pkgadd and pkgrm commands. In most cases, no additional options beyond the PEP 241 options are required. An exception is if the package name is >9 characters, a --pkg-abrev option is required because that's all pkgtool will handle. It makes listing the packages on the system a pain, but the actual package files produced do match name-version-revision-pyvers.pkg format. By default, bdist_pkgtool provides request, postinstall, preremove, and postremove scripts that will properly relocate modules to the site-packages directory and recompile all .py modules on the target machine. An author can provide a custom request script and either have it auto-relocate by merging the scripts, or inhibit auto-relocation with --no-autorelocate. The bdist_sdux command provides the same functionality as the pkgtool command, except the resulting packages cannot auto-relocate. Instead, a checkinstall script is included by default that determines of the target machines python installation matches that of the creating machine. If not, it bails out and provides the installer with the correct version of the swinstall command to place it in the proper directory. I have tested both these with some local packages, and with Marc-Andre's Egenix-mx-base. They work as long as the result is a single directory tree under site-packages. If anyone has modules that require multiple site-packages directories, or install in multiple directories somewhere else, I'd appreciate a note telling me where I can get them for testing. (I can almost gaurantee they won't handle header files properly.) Finally, I have some questions regarding some things I don't think I totally grasp. First, is there a Distutils method for determining the modules root directory under site-packages? I hacked it by grabbing distribution.packages[0], but that's probably easily broken. Second, in order to handle setup.cfg options in the subclassed commands, I had to scan self.distribution.get_option_dict('bdist_packager') and copy options to the instance during initialize_options. Somehow, that just feels wrong. Shouldn't they be inherited somehow? There's still some stuff to do. I'd like to have seperate classes for doc files, like rpm does, but I also want as much of the setup configuration as possible to be in the binary_packager class so it doesn't have to be replicated by every possible packager command. Any ideas on a "generic" way to specify file "classes", like headers, docs, etc. please let me know (including pointers to discussions already had....I know there where some, but I couldn't readily find them). I think the concept is probably best handled in the same way as producing multiple packages; so if you specify doc files, a seperate "doc" package would be produced. How does that sound? Anyway, if you've got Solaris and HP access, please give them a workout and let me know how it goes. (You MUST have the PEP 241 patches, or you won't be able to get to any of those options.) Mark Alexander mwa@gate.net ---656673009-1276059836-986589469=:53210 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="bdist_packager.py" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="bdist_packager.py" IiIiZGlzdHV0aWxzLmNvbW1hbmQuYmRpc3RfcGFja2FnZXINCg0KTW9kaWZp ZWQgZnJvbSBiZGlzdF9kdW1iIGJ5IE1hcmsgVyBBbGV4YW5kZXIgPG13YUBn YXRlLm5ldD4NCg0KSW1wbGVtZW50cyB0aGUgRGlzdHV0aWxzICdiZGlzdF9w YWNrYWdlcicgYWJzdHJhY3QgY29tbWFuZCANCnRvIGJlIHN1YmNsYXNzZWQg YnkgYmluYXJ5IHBhY2thZ2UgY3JlYXRpb24gY29tbWFuZHMuIiIiDQoNCg0K X19yZXZpc2lvbl9fID0gIiRJZDogYmRpc3RfcGFja2FnZXIucHksdiAwLjEg MjAwMS8wNC80IG13YSINCg0KaW1wb3J0IG9zDQpmcm9tIGRpc3R1dGlscy5j b3JlIGltcG9ydCBDb21tYW5kDQpmcm9tIGRpc3R1dGlscy51dGlsIGltcG9y dCBnZXRfcGxhdGZvcm0NCmZyb20gZGlzdHV0aWxzLmRpcl91dGlsIGltcG9y dCBjcmVhdGVfdHJlZSwgcmVtb3ZlX3RyZWUNCmZyb20gZGlzdHV0aWxzLmZp bGVfdXRpbCBpbXBvcnQgd3JpdGVfZmlsZQ0KZnJvbSBkaXN0dXRpbHMuZXJy b3JzIGltcG9ydCAqDQppbXBvcnQgc3RyaW5nLCBzeXMNCmltcG9ydCBwZGIN Cg0KY2xhc3MgYmRpc3RfcGFja2FnZXIgKENvbW1hbmQpOg0KDQogICAgZGVz Y3JpcHRpb24gPSAiYWJzdHJhY3QgYmFzZSBmb3IgcGFja2FnZSBtYW5hZ2Vy IHNwZWNpZmljIGJkaXN0IGNvbW1hbmRzIg0KDQojIFhYWCB1cGRhdGUgdXNl cl9vcHRpb25zDQogICAgdXNlcl9vcHRpb25zID0gWw0KICAgICAgICAgKCdi ZGlzdC1iYXNlPScsIE5vbmUsDQogICAgICAgICAiYmFzZSBkaXJlY3Rvcnkg Zm9yIGNyZWF0aW5nIGJ1aWx0IGRpc3RyaWJ1dGlvbnMiKSwNCiAgICAgICAg KCdwa2ctZGlyPScsIE5vbmUsDQogICAgICAgICAiYmFzZSBkaXJlY3Rvcnkg Zm9yIGNyZWF0aW5nIGJpbmFyeSBwYWNrYWdlcyAoZGVmYXVsdHMgdG8gXCJi aW5hcnlcIiB1bmRlciAiKSwNCiAgICAgICAgKCdkaXN0LWRpcj0nLCAnZCcs DQogICAgICAgICAiZGlyZWN0b3J5IHRvIHB1dCBmaW5hbCBSUE0gZmlsZXMg aW4gIg0KICAgICAgICAgIihhbmQgLnNwZWMgZmlsZXMgaWYgLS1zcGVjLW9u bHkpIiksDQogICAgICAgICgnY2F0ZWdvcnk9JywgTm9uZSwNCiAgICAgICAg ICJTb2Z0d2FyZSBjYXRlZ29yeSAocGFja2FnZXIgZGVwZW5kZW50IGZvcm1h dCkiKSwNCiAgICAgICAgKCdyZXZpc2lvbj0nLCBOb25lLA0KICAgICAgICAg InBhY2thZ2UgcmV2aXNpb24gbnVtYmVyIiksDQogICAgICAgICgnbWFpbnRh aW5lcj0nLCBOb25lLA0KICAgICAgICAgIlBhY2thZ2UgbWFpbnRhaW5lciIp LA0KICAgICAgICAoJ21haW50YWluZXItbWFpbD0nLCBOb25lLA0KICAgICAg ICAgIlBhY2thZ2UgbWFpbnRhaW5lcidzIGVtYWlsIGFkZHJlc3MiKSwNCiAg ICAgICAgKCdhdXRob3I9JywgTm9uZSwNCiAgICAgICAgICJQYWNrYWdlIGF1 dGhvciIpLA0KICAgICAgICAoJ2F1dGhvci1tYWlsPScsIE5vbmUsDQogICAg ICAgICAiUGFja2FnZSBhdXRob3IncyBlbWFpbCBhZGRyZXNzIiksDQogICAg ICAgICgnbGljZW5jZT0nLCBOb25lLA0KICAgICAgICAgIkxpY2Vuc2UgY29k ZSIpLA0KICAgICAgICAoJ2ljb249JywgTm9uZSwNCiAgICAgICAgICJQYWNr YWdlIGljb24iKSwNCiAgICAgICAgKCdzdWJwYWNrYWdlcz0nLC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b2NhdGUnXQ0KDQogICAgZGVmIGVuc3VyZV9zdHJpbmdf bm90X25vbmUgKHNlbGYsb3B0aW9uLGRlZmF1bHQ9Tm9uZSk6DQogICAgICAg IHZhbCA9IGdldGF0dHIoc2VsZixvcHRpb24pDQogICAgICAgIGlmIHZhbCBp cyBub3QgTm9uZToNCiAgICAgICAgICAgIHJldHVybg0KICAgICAgICBDb21t YW5kLmVuc3VyZV9zdHJpbmcoc2VsZixvcHRpb24sZGVmYXVsdCkNCiAgICAg ICAgdmFsID0gZ2V0YXR0cihzZWxmLG9wdGlvbikNCiAgICAgICAgaWYgdmFs IGlzIE5vbmU6DQogICAgICAgICAgICByYWlzZSBEaXN0dXRpbHNPcHRpb25F cnJvciwgIiclcycgbXVzdCBiZSBwcm92aWRlZCIgJSBvcHRpb24NCg0KICAg IGRlZiBlbnN1cmVfc2NyaXB0IChzZWxmLGFyZyk6DQogICAgICAgIGlmIG5v dCBhcmc6DQogICAgICAgICAgICByZXR1cm4NCiAgICAgICAgdHJ5Og0KICAg ICAgICAgICAgc2VsZi5lbnN1cmVfc3RyaW5nKGFyZywgTm9uZSkNCiAgICAg ICAgZXhjZXB0Og0KICAgICAgICAgICAgdHJ5Og0KICAgICAgICAgICAgICAg IHNlbGYuZW5zdXJlX2ZpbGVuYW1lKGFyZywgTm9uZSkNCiAgICAgICAgICAg IGV4Y2VwdDoNCiAgICAgICAgICAgICAgICByYWlzZSBSdW50aW1lRXJyb3Is IFwNCiAgICAgICAgICAgICAgICAgICAgImNhbm5vdCBkZWNpcGhlciBzY3Jp cHQgb3B0aW9uICglcykiIFwNCiAgICAgICAgICAgICAgICAgICAgJSBhcmcN Cg0KICAgIGRlZiB3cml0ZV9zY3JpcHQgKHNlbGYscGF0aCxhdHRyLGRlZmF1 bHQ9Tm9uZSk6DQogICAgICAgICIiIiB3cml0ZSB0aGUgc2NyaXB0IHNwZWNp ZmllZCBpbiBhdHRyIHRvIHBhdGguIGlmIGF0dHIgaXMgTm9uZSwNCiAgICAg ICAgICAgIHdyaXRlIHVzZSBkZWZhdWx0IGluc3RlYWQgIiIiDQogICAgICAg IHZhbCA9IGdldGF0dHIoc2VsZixhdHRyKQ0KICAgICAgICBpZiBub3QgdmFs Og0KICAgICAgICAgICAgaWYgbm90IGRlZmF1bHQ6DQogICAgICAgICAgICAg ICAgcmV0dXJuDQogICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAg IHNldGF0dHIoc2VsZixhdHRyLGRlZmF1bHQpDQogICAgICAgICAgICAgICAg dmFsID0gZGVmYXVsdA0KICAgICAgICBpZiB2YWwhPSIiOg0KICAgICAgICAg ICAgc2VsZi5hbm5vdW5jZSgnQ3JlYXRpbmcgJXMgc2NyaXB0JywgYXR0cikN CiAgICAgICAgICAgIHNlbGYuZXhlY3V0ZSh3cml0ZV9maWxlLA0KICAgICAg ICAgICAgICAgICAgICAgKHBhdGgsIHNlbGYuZ2V0X3NjcmlwdChhdHRyKSks DQogICAgICAgICAgICAgICAgICAgICAid3JpdGluZyAnJXMnIiAlIHBhdGgp DQoNCiAgICBkZWYgZ2V0X2JpbmFyeV9uYW1lKHNlbGYpOg0KICAgICAgICBw eV92ZXIgPSBzeXMudmVyc2lvblswOnN0cmluZy5maW5kKHN5cy52ZXJzaW9u LCcgJyldDQogICAgICAgIHJldHVybiBzZWxmLm5hbWUgKyAnLScgKyBzZWxm LnZlcnNpb24gKyAnLScgKyBcDQogICAgICAgICAgICAgICBzZWxmLnJldmlz aW9uICsgJy0nICsgcHlfdmVyDQoNCiAgICBkZWYgZ2V0X3NjcmlwdCAoc2Vs ZixhdHRyKToNCiAgICAgICAgIyBhY2NlcHQgYSBzY3JpcHQgYXMgYSBzdHJp bmcgKCJsaW5lXDAxMmxpbmVcMDEyLi4uIiksDQogICAgICAgICMgYSBmaWxl bmFtZSwgb3IgYSBsaXN0DQogICAgICAgICMgWFhYIFdlIGNvdWxkIHByb2Jh Ymx5IGdldCBhd2F5IHdpdGggY29weV9maWxlLCBidXQgSSdtDQogICAgICAg ICMgZ3Vlc3NpbmcgdGhpcyB3aWxsIGJlIG1vcmUgZmxleGlibGUgbGF0ZXIg b24uLi4uDQogICAgICAgIHZhbCA9IGdldGF0dHIoc2VsZixhdHRyKQ0KICAg ICAgICByZXQ9Tm9uZQ0KICAgICAgICBpZiB2YWw6DQogICAgICAgICAgICB0 cnk6DQogICAgICAgICAgICAgICAgb3Muc3RhdCh2YWwpDQogICAgICAgICAg ICAgICAgIyBzY3JpcHQgaXMgYSBmaWxlDQogICAgICAgICAgICAgICAgcmV0 PVtdDQogICAgICAgICAgICAgICAgZj1vcGVuKHZhbCkNCiAgICAgICAgICAg ICAgICByZXQ9c3RyaW5nLnNwbGl0KGYucmVhZCgpLCJcMDEyIik7DQogICAg ICAgICAgICAgICAgZi5jbG9zZSgpDQogICAgICAgICAgICAgICAgI3JldHVy biByZXQNCiAgICAgICAgICAgIGV4Y2VwdDoNCiAgICAgICAgICAgICAgICBp ZiB0eXBlKHZhbCk9PXR5cGUoIiIpOg0KICAgICAgICAgICAgICAgICAgICAj IHNjcmlwdCBpcyBhIHN0cmluZw0KICAgICAgICAgICAgICAgICAgICByZXQg PSBzdHJpbmcuc3BsaXQodmFsLCJcMDEyIikNCiAgICAgICAgICAgICAgICBl bGlmIHR5cGUodmFsKT09dHlwZShbXSk6DQogICAgICAgICAgICAgICAgICAg ICMgc2NyaXB0IGlzIGEgbGlzdA0KICAgICAgICAgICAgICAgICAgICByZXQg PSB2YWwNCiAgICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAg ICAgICByYWlzZSBSdW50aW1lRXJyb3IsIFwNCiAgICAgICAgICAgICAgICAg ICAgICAgICJjYW5ub3QgZmlndXJlIG91dCB3aGF0IHRvIGRvIHdpdGggJ3Jl cXVlc3QnIG9wdGlvbiAoJXMpIiBcDQogICAgICAgICAgICAgICAgICAgICAg ICAlIHZhbA0KICAgICAgICAgICAgcmV0dXJuIHJldA0KDQoNCiAgICBkZWYg aW5pdGlhbGl6ZV9vcHRpb25zIChzZWxmKToNCiAgICAgICAgZCA9IHNlbGYu ZGlzdHJpYnV0aW9uDQogICAgICAgIHNlbGYua2VlcF90ZW1wID0gMA0KICAg ICAgICBzZWxmLmNvbnRyb2xfb25seSA9IDANCiAgICAgICAgc2VsZi5ub19h dXRvcmVsb2NhdGUgPSAwDQogICAgICAgIHNlbGYucGtnX2RpciA9IE5vbmUN CiAgICAgICAgc2VsZi5wbGF0X25hbWUgPSBOb25lDQogICAgICAgIHNlbGYu aWNvbiA9IE5vbmUNCiAgICAgICAgc2VsZi5yZXF1aXJlcyA9IE5vbmUNCiAg ICAgICAgc2VsZi5zdWJwYWNrYWdlcyA9IE5vbmUNCiAgICAgICAgc2VsZi5j YXRlZ29yeSA9IE5vbmUNCiAgICAgICAgc2VsZi5yZXZpc2lvbiA9IE5vbmUN Cg0KICAgICAgICAjIFBFUCAyNDEgTWV0YWRhdGENCiAgICAgICAgc2VsZi5u YW1lID0gTm9uZQ0KICAgICAgICBzZWxmLnZlcnNpb24gPSBOb25lDQogICAg ICAgIHNlbGYudXJsID0gTm9uZQ0KICAgICAgICBzZWxmLmF1dGhvciA9IE5v bmUNCiAgICAgICAgc2VsZi5hdXRob3JfZW1haWwgPSBOb25lDQogICAgICAg IHNlbGYubWFpbnRhaW5lciA9IE5vbmUNCiAgICAgICAgc2VsZi5tYWludGFp bmVyX2VtYWlsID0gTm9uZQ0KICAgICAgICBzZWxmLmRlc2NyaXB0aW9uID0g Tm9uZQ0KICAgICAgICBzZWxmLmxvbmdfZGVzY3JpcHRpb24gPSBOb25lDQog ICAgICAgIHNlbGYubGljZW5jZSA9IE5vbmUNCiAgICAgICAgc2VsZi5wbGF0 Zm9ybXMgPSBOb25lDQogICAgICAgIHNlbGYua2V5d29yZHMgPSBOb25lDQog ICAgICAgIHNlbGYucm9vdF9wYWNrYWdlID0gTm9uZQ0KDQogICAgICAgICMg cGFja2FnZSBpbnN0YWxsYXRpb24gc2NyaXB0cw0KICAgIC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lID0gIiVzLiVzIiAlIChzZWxmLmRpc3RyaWJ1dGlvbi5nZXRf ZnVsbG5hbWUoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgc2VsZi5wbGF0X25hbWUpDQoNCiAgICAgICAgaWYgbm90IHNlbGYu a2VlcF90ZW1wOg0KICAgICAgICAgICAgcmVtb3ZlX3RyZWUoc2VsZi5wa2df ZGlyLCBzZWxmLnZlcmJvc2UsIHNlbGYuZHJ5X3J1bikNCg0KICAgICMgcnVu KCkNCg0KIyBjbGFzcyBiZGlzdF9wYWNrYWdlcg0K ---656673009-1276059836-986589469=:53210 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="bdist_pkgtool.py" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Solaris packager Content-Disposition: attachment; filename="bdist_pkgtool.py" IiIiZGlzdHV0aWxzLmNvbW1hbmQuYmRpc3RfcGtndG9vbA0KDQoNCkF1dGhv cjogTWFyayBXLiBBbGV4YW5kZXIgPG13YUBnYXRlLm5ldD4NCg0KSW1wbGVt ZW50cyB0aGUgRGlzdHV0aWxzICdiZGlzdF9wa2d0b29sJyBjb21tYW5kIChj cmVhdGUgU29sYXJpcyBwa2d0b29sDQpkaXN0cmlidXRpb25zKS4iIiINCg0K aW1wb3J0IG9zLCBzdHJpbmcsIHN5cywgcHdkLCBncnANCmltcG9ydCBnbG9i DQpmcm9tIHR5cGVzIGltcG9ydCAqDQpmcm9tIGRpc3R1dGlscy5jb3JlIGlt cG9ydCBDb21tYW5kLCBERUJVRw0KZnJvbSBkaXN0dXRpbHMudXRpbCBpbXBv cnQgZ2V0X3BsYXRmb3JtDQpmcm9tIGRpc3R1dGlscy5maWxlX3V0aWwgaW1w b3J0IHdyaXRlX2ZpbGUNCmZyb20gZGlzdHV0aWxzLmVycm9ycyBpbXBvcnQg Kg0KZnJvbSBkaXN0dXRpbHMuY29tbWFuZCBpbXBvcnQgYmRpc3RfcGFja2Fn ZXINCmltcG9ydCBjb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AgXTsgdGhlbg0KICAgIHJtIC1yZiAke0JBU0VESVJ9 L19fRElTVFVUSUxTX05BTUVfXw0KZmkNCiIiIg0KDQpjbGFzcyBiZGlzdF9w a2d0b29sIChiZGlzdF9wYWNrYWdlci5iZGlzdF9wYWNrYWdlcik6DQoNCiAg ICBkZXNjcmlwdGlvbiA9ICJjcmVhdGUgYW4gcGtndG9vbCAoU29sYXJpcykg cGFja2FnZSINCg0KICAgIHVzZXJfb3B0aW9ucyA9IGJkaXN0X3BhY2thZ2Vy LmJkaXN0X3BhY2thZ2VyLnVzZXJfb3B0aW9ucyArIFsNCiAgICAgICAgIygn cmV2aXNpb249JywgTm9uZSwNCiAgICAgICAgICMicGFja2FnZSByZXZpc2lv biBudW1iZXIgKFBTVEFNUCkiKSwNCiAgICAgICAgKCdwa2ctYWJyZXY9Jywg Tm9uZSwNCiAgICAgICAgICJBYmJyZXZpYXRpb24gKDkgY2hhcmFjdGVycyBv ciBsZXNzKSBvZiB0aGUgcGFja2FnZSBuYW1lIiksDQogICAgICAgICgnY29t cHZlcj0nLCBOb25lLA0KICAgICAgICAgImZpbGUgY29udGFpbmluZyBjb21w YXRpYmxlIHZlcnNpb25zIG9mIHRoaXMgcGFja2FnZSAobWFuIGNvbXB2ZXIp IiksDQogICAgICAgICgnZGVwZW5kPScsIE5vbmUsDQogICAgICAgICAiZmls ZSBjb250YWluaW5nIGRlcGVuZGVuY2llcyBmb3IgdGhpcyBwYWNrYWdlICht YW4gZGVwZW5kKSIpLA0KICAgICAgICAjKCdjYXRlZ29yeT0nLCBOb25lLA0K ICAgICAgICAgIyJTb2Z0d2FyZSBjYXRlZ29yeSIpLA0KICAgICAgICAoJ3Jl cXVlc3Q9JywgTm9uZSwNCiAgICAgICAgICJyZXF1ZXN0IHNjcmlwdCAoQm91 cm5lIHNoZWxsIGNvZGUpIiksDQogICAgICAgXQ0KDQogICAgZGVmIGluaXRp YWxpemVfb3B0aW9ucyAoc2VsZik6DQogICAgICAgICMgWFhYIEN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F9maW5hbGl6ZWRfY29tbWFuZCgnYmRpc3QnKS5kaXN0 X2Rpcg0KICAgICAgICAgICAgc2VsZi5wa2dfZGlyID0gb3MucGF0aC5qb2lu KGRpc3RfZGlyLCAicGtndG9vbCIpDQoNCiAgICAgICAgc2VsZi5lbnN1cmVf c3RyaW5nKCdjbGFzc2VzJywgTm9uZSkNCiAgICAgICAgI3NlbGYuZW5zdXJl X3N0cmluZygncmV2aXNpb24nLCAiMSIpDQogICAgICAgIHNlbGYuZW5zdXJl X3NjcmlwdCgncmVxdWVzdCcpDQogICAgICAgIHNlbGYuZW5zdXJlX3Njcmlw dCgncHJlaW5zdGFsbCcpDQogICAgICAgIHNlbGYuZW5zdXJlX3NjcmlwdCgn cG9zdGluc3RhbGwnKQ0KICAgICAgICBzZWxmLmVuc3VyZV9zY3JpcHQoJ3By ZXJlbW92ZScpDQogICAgICAgIHNlbGYuZW5zdXJlX3NjcmlwdCgncG9zdHJl bW92ZScpDQogICAgICAgIHNlbGYuZW5zdXJlX3N0cmluZygndmVuZG9yJywN CiAgICAgICAgICAgICAgICAgICAgICAgICAgICIlcyA8JXM+IiAlIChzZWxm LmF1dGhvciwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBzZWxmLmF1dGhvcl9lbWFpbCkpDQogICAgICAgIHNlbGYuZW5zdXJl X3N0cmluZygnY2F0ZWdvcnknLCAiU3lzdGVtLGFwcGxpY2F0aW9uIikNCiAg ICAgICAgc2VsZi5lbnN1cmVfc2NyaXB0KCdjb21wdmVyJykNCiAgICAgICAg c2VsZi5lbnN1cmVfc2NyaXB0KCdkZXBlbmQnKQ0KICAgICAgICBiZGlzdF9w YWNrYWdlci5iZGlzdF9wYWNrYWdlci5maW5hbGl6ZV9vcHRpb25zKHNlbGYp DQogICAgICAgIGlmIHNlbGYucGtnX2FicmV2IGlzIE5vbmU6DQogICAgICAg ICAgICBzZWxmLnBrZ19hYnJldj1zZWxmLm5hbWUNCiAgICAgICAgaW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AgICAgICAgICAgcGtnX2RpciA9IHNlbGYucGtnX2Rp cisiLyIrcm9vdA0KICAgICAgICAgICAgc2VsZi5ta3BhdGgocGtnX2RpcikN CiAgICAgICAgZWxzZToNCiAgICAgICAgICAgIHBrZ19kaXIgPSBzZWxmLnBr Z19kaXINCg0KICAgICAgICBpbnN0YWxsID0gc2VsZi5yZWluaXRpYWxpemVf Y29tbWFuZCgnaW5zdGFsbCcsIHJlaW5pdF9zdWJjb21tYW5kcz0xKQ0KICAg ICAgICAjIGJ1aWxkIHBhY2thZ2UNCiAgICAgICAgc2VsZi5hbm5vdW5jZSgn QnVpbGRpbmcgcGFja2FnZScpDQogICAgICAgIHNlbGYucnVuX2NvbW1hbmQo J2J1aWxkJykNCiAgICAgICAgc2VsZi5hbm5vdW5jZSgnQ3JlYXRpbmcgcGtn aW5mbyBmaWxlJykNCiAgICAgICAgcGF0aCA9IG9zLnBhdGguam9pbihwa2df ZGlyLCAicGtnaW5mbyIpDQogICAgICAgIHNlbGYuZXhlY3V0ZSh3cml0ZV9m aWxlLA0KICAgICAgICAgICAgICAgICAgICAgKHBhdGgsDQogICAgICAgICAg ICAgICAgICAgICAgc2VsZi5fbWFrZV9pbmZvX2ZpbGUoKSksDQogICAgICAg ICAgICAgICAgICAgICAid3JpdGluZyAnJXMnIiAlIHBhdGgpDQogICAgICAg ICMgcmVxdWVzdCBzY3JpcHQgaGFuZGxpbmcNCiAgICAgICAgaWYgc2VsZi5y ZXF1ZXN0PT1Ob25lOg0KICAgICAgICAgICAgc2VsZi5yZXF1ZXN0ID0gc2Vs Zi5fbWFrZV9yZXF1ZXN0X3NjcmlwdCgpDQogICAgICAgIGlmIHNlbGYucmVx dWVzdCE9IiI6DQogICAgICAgICAgICBwYXRoID0gb3MucGF0aC5qb2luKHBr Z19kaXIsICJyZXF1ZXN0IikNCiAgICAgICAgICAgIHNlbGYuZXhlY3V0ZSh3 cml0ZV9maWxlLA0KICAgICAgICAgICAgICAgICAgICAgKHBhdGgsDQogICAg ICAgICAgICAgICAgICAgICAgc2VsZi5yZXF1ZXN0KSwNCiAgICAgICAgICAg ICAgICAgICAgICJ3cml0aW5nICclcyciICUgcGF0aCkNCg0KICAgICAgICAj IENyZWF0ZSBpbnN0YWxsYXRpb24gc2NyaXB0cywgc2luY2UgY29tcHZlciAm IGRlcGVuZCBhcmUNCiAgICAgICAgIyB1c2VyIGNyZWF0ZWQgZmlsZXMsIHRo ZXkgd29yayBqdXN0IGZpbmUgYXMgc2NyaXB0cw0KICAgICAgICBzZWxmLndy aXRlX3NjcmlwdChvcy5wYXRoLmpvaW4ocGtnX2RpciwgInBvc3RpbnN0YWxs IiksDQogICAgICAgICAgICAgICAgICdwb3N0aW5zdGFsbCcsREVGQVVMVF9Q T1NUSU5TVEFMTCkNCiAgICAgICAgc2VsZi53cml0ZV9zY3JpcHQob3MucGF0 aC5qb2luKHBrZ19kaXIsICJwcmVpbnN0YWxsIiksDQogICAgICAgICAgICAg ICAgICdwcmVpbnN0YWxsJyxOb25lKQ0KICAgICAgICBzZWxmLndyaXRlX3Nj cmlwdChvcy5wYXRoLmpvaW4ocGtnX2RpciwgInByZXJlbW92ZSIpLA0KICAg ICAgICAgICAgICAgICAncHJlcmVtb3ZlJyxERUZBVUxUX1BSRVJFTU9WRSkN CiAgICAgICAgc2VsZi53cml0ZV9zY3JpcHQob3MucGF0aC5qb2luKHBrZ19k aXIsICJwb3N0cmVtb3ZlIiksDQogICAgICAgICAgICAgICAgICdwb3N0cmVt b3ZlJyxOb25lKQ0KICAgICAgICBzZWxmLndyaXRlX3NjcmlwdChvcy5wYXRo LmpvaW4ocGtnX2RpciwgImNvbXB2ZXIiKSwNCiAgICAgICAgICAgICAgICAg J2NvbXB2ZXInLE5vbmUpDQogICAgICAgIHNlbGYud3JpdGVfc2NyaXB0KG9z LnBhdGguam9pbihwa2dfZGlyLCAiZGVwZW5kIiksDQogICAgICAgICAgICAg ICAgICdkZXBlbmQnLE5vbmUpDQogICAgICAgICAgICANCiAgIC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WxmLnBrZ19hYnJldikNCiAgICAgICAgc2VsZi5zcGF3bihwa2df Y21kKQ0KICAgICAgICBvcy5zeXN0ZW0oInJtIC1yZiAvdmFyL3Nwb29sL3Br Zy8lcyIgJSBzZWxmLnBrZ19hYnJldikNCiAgICAgICAgDQoNCiAgICBkZWYg cnVuIChzZWxmKToNCiAgICAgICAgaWYgc2VsZi5zdWJwYWNrYWdlczoNCiAg ICAgICAgICAgIHNlbGYuc3VicGFja2FnZXM9c3RyaW5nLnNwbGl0KHNlbGYu c3VicGFja2FnZXMsIiwiKQ0KICAgICAgICAgICAgZm9yIHBrZyBpbiBzZWxm LnN1YnBhY2thZ2VzOg0KICAgICAgICAgICAgICAgIHNlbGYubWFrZV9wYWNr YWdlKHN1YnBhY2thZ2UpDQogICAgICAgIGVsc2U6DQogICAgICAgICAgICBz ZWxmLm1ha2VfcGFja2FnZSgpDQogICAgIyBydW4oKQ0KDQogIA0KICAgIGRl ZiBfbWFrZV9wcm90b3R5cGUoc2VsZik6DQogICAgICAgIHByb3RvX2ZpbGUg PSBbImkgcGtnaW5mbyJdDQogICAgICAgIGlmIHNlbGYucmVxdWVzdDoNCiAg ICAgICAgICAgIHByb3RvX2ZpbGUuZXh0ZW5kKFsnaSByZXF1ZXN0J10pDQog ICAgICAgIGlmIHNlbGYucG9zdGluc3RhbGw6DQogICAgICAgICAgICBwcm90 b19maWxlLmV4dGVuZChbJ2kgcG9zdGluc3RhbGwnXSkNCiAgICAgICAgaWYg c2VsZi5wb3N0cmVtb3ZlOg0KICAgICAgICAgICAgcHJvdG9fZmlsZS5leHRl bmQoWydpIHBvc3RyZW1vdmUnXSkNCiAgICAgICAgaWYgc2VsZi5wcmVpbnN0 YWxsOg0KICAgICAgICAgICAgcHJvdG9fZmlsZS5leHRlbmQoWydpIHByZWlu c3RhbGwnXSkNCiAgICAgICAgaWYgc2VsZi5wcmVyZW1vdmU6DQogICAgICAg ICAgICBwcm90b19maWxlLmV4dGVuZChbJ2kgcHJlcmVt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J1aWxkL2xpYi4lcyIgJSBnZXRfcGxhdGZvcm0oKSkNCiAgICAgICAg ICAgICNwcm90b19maWxlLmV4dGVuZChzdHJpbmcuc3BsaXQoDQogICAgICAg ICAgICAgICAgI2dldG91dHB1dCgicGtncHJvdG8gYnVpbGQvbGliLiVzLyVz PSVzIiAlDQogICAgICAgICAgICAgICAgICAgICMoZ2V0X3BsYXRmb3JtKCks c2VsZi5uYW1lLCBzZWxmLm5hbWUpKSwNCiAgICAgICAgICAgICAgICAjIlww MTIiKSkNCiAgICAgICAgI2V4Y2VwdDoNCgkJCSNwYXNzDQogICAgICAgICN0 cnk6DQogICAgICAgICAgICAjcGRiLnNldF90cmFjZSgpDQogICAgICAgICAg ICAjb3Muc3RhdCgiYnVpbGQvbGliIikNCiAgICAgICAgICAgICNwcm90b19m aWxlLmV4dGVuZChzdHJpbmcuc3BsaXQoDQogICAgICAgICAgICAgICAgI2dl dG91dHB1dCgicGtncHJvdG8gYnVpbGQvbGliLyVzPSVzIiAlDQogICAgICAg ICAgICAgICAgICAgICMoc2VsZi5kaXN0cmlidXRpb24uZ2V0X25hbWUoKSwN CiAgICAgICAgICAgICAgICAgICAgI3NlbGYuZGlzdHJpYnV0aW9uLmdldF9u YW1lKCkpKSwNCiAgICAgICAgICAgICAgICAjIlwwMTIiKSkNCiAgICAgICAg I2V4Y2VwdDoNCgkJCSNwYXNzDQogICAgICAgIHJldHVybiBwcm90b19maWxl DQoNCiAgICBkZWYgX21ha2VfcmVxdWVzdF9zY3JpcHQoc2VsZik6DQogICAg ICAgIGdsb2JhbCBERUZBVUxUX1JFUVVFU1QNCiAgICAgICAgIyBBIGxpdHRs ZSBkaWZmZXJlbnQgZnJvbSBvdGhlciBzY3JpcHRzLCBpZiB3ZSBhcmUgdG8g YXV0b21hdGljYWxseQ0KICAgICAgICAjIHJlbG9jYXRlIHRvIHRoZSB0YXJn ZXQgc2l0ZS1wYWNrYWdlcywgd2UgaGF2ZSB0byB3cmFwIGFueSBwcm92a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xpY2VuY2UpIF0pDQogICAgICAgIGlu Zm9fZmlsZS5leHRlbmQoWydFTUFJTD0iJXMiJyAlIHNlbGYubWFpbnRhaW5l cl9lbWFpbCBdKQ0KICAgICAgICBpZiBzZWxmLnBsYXRmb3JtczoNCiAgICAg ICAgICAgIGFyY2hzPXN0cmluZy5qb2luKHNlbGYucGxhdGZvcm1zLCcsJykN CiAgICAgICAgZWxzZToNCiAgICAgICAgICAgIHByaW50ICJBc3N1bWluZyBh IHNwYXJjIGFyY2hpdGVjdXJlIg0KICAgICAgICAgICAgYXJjaHM9J3NwYXJj Jw0KICAgICAgICBpbmZvX2ZpbGUuZXh0ZW5kKFsnQVJDSD0iJXMiJyAlIGFy Y2hzIF0pDQoNCiAgICAgICAgaWYgc2VsZi51cmw6DQogICAgICAgICAgICBp bmZvX2ZpbGUuZXh0ZW5kKFsnSE9UTElORT0iJXMiJyAlIHNlbGYudXJsIF0p DQogICAgICAgIGlmIHNlbGYuY2xhc3NlczoNCiAgICAgICAgICAgIGluZm9f ZmlsZS5leHRlbmQoWydDTEFTU0VTPSIlcyInICUgc2VsZi5jbGFzc2VzIF0p DQogICAgICAgIGlmIHNlbGYuY2F0ZWdvcnk6DQogICAgICAgICAgICBpbmZv X2ZpbGUuZXh0ZW5kKFsnQ0FURUdPUlk9IiVzIicgJSBzZWxmLmNhdGVnb3J5 IF0pDQogICAgICAgIHNpdGU9Tm9uZQ0KICAgICAgICBmb3IgaSBpbiAgc3lz LnBhdGg6DQogICAgICAgICAgICBpZiBpWy0xMzpdPT0ic2l0ZS1wYWNrYWdl cyI6DQogICAgICAgICAgICAgICAgc2l0ZT1pDQogICAgICAgICAgICAgICAg YnJlYWsNCiAgICAgICAgaWYgc2l0ZToNCiAgICAgICAgICAgIGluZm9fZmls ZS5leHRlbmQoWydCQVNFRElSPSIlcyInICUgc2l0ZSBdKQ0KICAgICAgICAg ICAgICAgICAgICAgIA0KICAgICAgICByZXR1cm4gaW5mb19maWxlDQoNCiAg ICAjIF9tYWtlX2luZm9fZmlsZSAoKQ0KDQogICAgZGVmIF9mb3JtYXRfY2hh bmdlbG9nKHNlbGYsIGNoYW5nZWxvZyk6DQogICAgICAgICIiIkZvcm1hdCB0 aGUgY2hhbmdlbG9nIGNvcnJlY3RseSBhbmQgY29udmVydCBpdCB0byBhIGxp c3Qgb2Ygc3RyaW5ncw0KICAgICAgICAiIiINCiAgICAgICAgaWYgbm90IGNo YW5nZWxvZzoNCiAgICAgICAgICAgIHJldHVybiBjaGFuZ2Vsb2cNCiAgICAg ICAgbmV3X2NoYW5nZWxvZyA9IFtdDQogICAgICAgIGZvciBsaW5lIGluIHN0 cmluZy5zcGxpdChzdHJpbmcuc3RyaXAoY2hhbmdlbG9nKSwgJ1xuJyk6DQog ICAgICAgICAgICBsaW5lID0gc3RyaW5nLnN0cmlwKGxpbmUpDQogICAgICAg ICAgICBpZiBsaW5lWzBdID09ICcqJzoNCiAgICAgICAgICAgICAgICBuZXdf Y2hhbmdlbG9nLmV4dGVuZChbJycsIGxpbmVdKQ0KICAgICAgICAgICAgZWxp ZiBsaW5lWzBdID09ICctJzoNCiAgICAgICAgICAgICAgICBuZXdfY2hhbmdl bG9nLmFwcGVuZChsaW5lKQ0KICAgICAgICAgICAgZWxzZToNCiAgICAgICAg ICAgICAgICBuZXdfY2hhbmdlbG9nLmFwcGVuZCgnICAnICsgbGluZSkNCiAg ICAgICAgICAgICAgICANCiAgICAgICAgIyBzdHJpcCB0cmFpbGluZyBuZXds aW5lIGluc2VydGVkIGJ5IGZpcnN0IGNoYW5nZWxvZyBlbnRyeQ0KICAgICAg ICBpZiBub3QgbmV3X2NoYW5nZWxvZ1swXToNCiAgICAgICAgICAgIGRlbCBu ZXdfY2hhbmdlbG9nWzBdDQogICAgICAgIA0KICAgICAgICByZXR1cm4gbmV3 X2NoYW5nZWxvZw0KDQogICAgIyBfZm9ybWF0X2NoYW5nZWxvZygpDQoNCiMg Y2xhc3MgYmRpc3RfcnBtDQo= ---656673009-1276059836-986589469=:53210 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="bdist_sdux.py" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: HP packager Content-Disposition: attachment; filename="bdist_sdux.py" IiIiZGlzdHV0aWxzLmNvbW1hbmQuYmRpc3RfcGtndG9vbA0KDQpJbXBsZW1l bnRzIHRoZSBEaXN0dXRpbHMgJ2JkaXN0X3NkdXgnIGNvbW1hbmQgdG8gY3Jl YXRlIEhQLVVYIA0Kc3dpbnN0YWxsIGRlcG90IiIiDQoNCiMgTWFyayBBbGV4 YW5kZXIgPG13YUBnYXRlLm5ldD4NCg0KX19yZXZpc2lvbl9fID0gIiRJZDog YmRpc3Rfc2R1eC5weSx2IDAuMiAiDQojaW1wb3J0IHBkYg0KaW1wb3J0IG9z LCBzdHJpbmcNCmltcG9ydCBnbG9iDQpmcm9tIHR5cGVzIGltcG9ydCAqDQpm cm9tIGRpc3R1dGlscy5jb3JlIGltcG9ydCBDb21tYW5kLCBERUJVRw0KZnJv bSBkaXN0dXRpbHMudXRpbCBpbXBvcnQgZ2V0X3BsYXRmb3JtDQpmcm9tIGRp c3R1dGlscy5maWxlX3V0aWwgaW1wb3J0IHdyaXRlX2ZpbGUNCmZyb20gZGlz dHV0aWxzLmVycm9ycyBpbXBvcnQgKg0KZnJvbSBkaXN0dXRpbHMuY29tbWFu ZCBpbXBvcnQgYmRpc3RfcGFja2FnZXINCmltcG9ydCBzeXMNCmZyb20gY29t bWFuZHMgaW1wb3J0IGdldG91dHB1dA0KDQpERUZBVUxUX0NIRUNLSU5TVEFM TD0iIiIjIS9iaW4vc2gNCi91c3IvYmluL3doaWNoIHB5dGhvbiAyPiYxID4v ZGV2L251bGwNCmlmIFsgJD8gLW5lIDAgXTsgdGhlbg0KICAgIGVjaG8gIkVS Uk9SOiBQeXRob24gbXVzdCBiZSBvbiB5b3VyIFBBVEgiICAmPjINCiAgICBl Y2hvICJFUlJPUjogKFlvdSBtYXkgbmVlZCB0byBsaW5rIGl0IHR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ZSwNCiAgICAgICAgICJEb24ndCByZXNldCBwZXJtaXNzaW9ucyBhbmQgb3du ZXJzaGlwIHRvIHJvb3QvYmluIiksICMgWFhYDQogICAgICAgICgnY29yZXF1 aXNpdGVzPScsIE5vbmUsDQogICAgICAgICAiY29yZXF1aXNpdGVzIiksICMg WFhYDQogICAgICAgICgncHJlcmVxdWlzaXRlcz0nLCBOb25lLA0KICAgICAg ICAgInByZXJlcXVpc2l0ZXMiKSwgIyBYWFgNCiAgICAgICAgIygnY2F0ZWdv cnk9JywgTm9uZSwNCiAgICAgICAgICMiU29mdHdhcmUgY2F0ZWdvcnkiKSwN CiAgICAgICAgKCdjaGVja2luc3RhbGw9JywgTm9uZSwgIyBYWFggYWxhIHJl cXVlc3QNCiAgICAgICAgICJjaGVja2luc3RhbGwgc2NyaXB0IChCb3VybmUg c2hlbGwgY29kZSkiKSwNCiAgICAgICAgKCdjb25maWd1cmU9JywgTm9uZSwg IyBYWFggDQogICAgICAgICAiY29uZmlndXJlIHNjcmlwdCAoQm91cm5lIHNo ZWxsIGNvZGUpIiksDQogICAgICAgICgndW5jb25maWd1cmU9JywgTm9uZSwg IyBYWFgNCiAgICAgICAgICJ1bmNvbmZpZ3VyZSBzY3JpcHQgKEJvdXJuZSBz aGVsbCBjb2RlKSIpLA0KICAgICAgICAoJ3ZlcmlmeT0nLCBOb25lLCAjIFhY WA0KICAgICAgICAgInZlcmlmeSBzY3JpcHQgKEJvdXJuZSBzaGVsbCBjb2Rl KSIpLA0KICAgICAgICAoJ3VucHJlaW5zdGFsbD0nLCBOb25lLCAjIFhYWA0K ICAgICAgICAgInVucHJlaW5zdGFsbCBzY3JpcHQgKEJvdXJuZSBzaGVsbCBj b2RlKSIpLA0KICAgICAgICAoJ3VucG9zdGluc3RhbGw9JywgTm9uZSwgIyBY WFgNCiAgICAgICAgICJ1bnBvc3RpbnN0YWxsIHNjcmlwdCAoQm91cm5lIHNo ZWxsIGNvZGUpIiksDQogICAgICAgXQ0KDQogICAgY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YWRtZScpDQogICAgICAgIHNlbGYuZW5zdXJlX3N0cmlu ZygnbWFjaGluZV90eXBlJywnKicpDQogICAgICAgIGlmIG5vdCBzZWxmLnBs YXRmb3JtczoNCiAgICAgICAgICAgIGlmIHNlbGYuZGlzdHJpYnV0aW9uLmhh c19leHRfbW9kdWxlcygpOg0KICAgICAgICAgICAgICAgICMgVGhpcyBpcyBw cm9iYWJseSBIUCwgYnV0IGlmIGl0J3Mgbm8sIHVzZSBzeXMucGxhdGZvcm0N CiAgICAgICAgICAgICAgICBpZiBzeXMucGxhdGZvcm1bMDo1XSA9PSAiaHAt dXgiOg0KICAgICAgICAgICAgICAgICAgICBzZWxmLnBsYXRmb3JtcyA9ICJI UC1VWCINCiAgICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAg ICAgICBzZWxmLnBsYXRmb3JtcyA9IHN0cmluZy51cHBlcihzeXMucGxhdGZv cm0pDQogICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAgIHNlbGYu cGxhdGZvcm1zID0gIioiDQogICAgICAgIGVsc2U6DQogICAgICAgICAgICAj IHdlIGNhbiBvbmx5IGhhbmRsZSBvbmUNCiAgICAgICAgICAgIHNlbGYucGxh dGZvcm1zPXN0cmluZy5qb2luKHNlbGYucGxhdGZvcm1zWzBdKQ0KICAgICAg ICBzZWxmLmVuc3VyZV9zdHJpbmcoJ29zX3JlbGVhc2UnLCcqJykNCiAgICAg ICAgc2VsZi5lbnN1cmVfc3RyaW5nKCdkaXJlY3RvcnknLCclcy9saWIvcHl0 aG9uJXMvc2l0ZS1wYWNrYWdlcycgJSBcDQogICAgICAgICAgICAgICAgKHN5 cy5leGVjX3ByZWZpeCwgc3lzLnZlcnNpb25bMDozXSkpDQogICAgICAgIGJk aXN0X3BhY2thZ2VyLmJkaXN0X3BhY2thZ2VyLmZpbmFsaXplX29wdGlvbnMo c2VsZikNCiAgICAgICAgREVGQVVMVF9DSEVDS0lOU1RBTEwgPSBzdHJpbmcu cmVwbGFjZShERUZBVUxUX0NIRUNLSU5TVEFMTCwNCiAgICAgICAgICAgICJf X0RJU1RVVElMU19OQU1FX18iLCBzZWxmLnJvb3RfcGFja2FnZSkNCiAgICAg ICAgREVGQVVMVF9DSEVDS0lOU1RBTEwgPSBzdHJpbmcucmVwbGFjZShERUZB VUxUX0NIRUNLSU5TVEFMTCwNCiAgICAgICAgICAgICJfX0RJU1RVVElMU19Q S0dfRElSX18iLCBzZWxmLmRpcmVjdG9yeSkNCiAgICAgICAgREVGQVVMVF9Q T1NUSU5TVEFMTCA9IHN0cmluZy5yZXBsYWNlKERFRkFVTFRfUE9TVElOU1RB TEwsDQogICAgICAgICAgICAiX19ESVNUVVRJTFNfTkFNRV9fIiwgc2VsZi5y b290X3BhY2thZ2UpDQogICAgICAgIERFRkFVTFRfUFJFUkVNT1ZFID0gc3Ry aW5nLnJlcGxhY2UoREVGQVVMVF9QUkVSRU1PVkUsDQogICAgICAgICAgICAi X19ESVNUVVRJTFNfTkFNRV9fIiwgc2VsZi5yb290X3BhY2thZ2UpDQogICAg ICAgIERFRkFVTFRfUE9TVFJFTU9WRSA9IHN0cmluZy5yZXBsYWNlKERFRkFV TFRfUE9TVFJFTU9WRSwNCiAgICAgICAgICAgICJfX0RJU1RVVElMU19OQU1F X18iLCBzZWxmLnJvb3RfcGFja2FnZSkNCiAgICAjIGZpbmFsaXplX29wdGlv bnMoKQ0KDQogICAgZGVmIHJ1biAoc2VsZik6DQogICAgICAgICMgbWFrZSBk aXJlY3Rvcmllcw0KICAgICAgICBzZWxmLm1rcGF0aChzZWxmLnBrZ19kaXIp DQogICAgICAgIHBzZl9wYXRoID0gb3MucGF0aC5qb2luKHNlbGYucGtnX2Rp ciwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiJXMucHNm IiAlIHNlbGYuZ2V0X2JpbmFyeV9uYW1lKCkpDQogICAgICAgICMgYnVpbGQg cGFja2FnZQ0KICAgICAgICBzZWxmLmFubm91bmNlKCdCdWlsZGluZyBwYWNr YWdlJykNCiAgICAgICAgc2VsZi5ydW5fY29tbWFuZCgnYnVpbGQnKQ0KICAg ICAgICBzZWxmLmFubm91bmNlKCdDcmVhdGluZyBwc2YgZmlsZScpDQogICAg ICAgIHNlbGYuZXhlY3V0ZSh3cml0ZV9maWxlLA0KICAgICAgICAgICAgICAg ICAgICAgKHBzZl9wYXRoLA0KICAgICAgICAgICAgICAgICAgICAgIHNlbGYu X21ha2VfY29udHJvbF9maWxlKCkpLA0KICAgICAgICAgICAgICAgICAgICAg IndyaXRpbmcgJyVzJyIgJSBwc2ZfcGF0aCkNCiAgICAgICAgaWYgc2VsZi5j b250cm9sX29ubHk6ICMgc3RvcCBpZiByZXF1ZXN0ZWQNCiAgICAgICAgICAg IHJldHVybg0KDQogICAgICAgIHNlbGYuYW5ub3VuY2UoJ0NyZWF0aW5nIHBh Y2thZ2UnKQ0KICAgICAgICBzcGF3bl9jbWQgPSBbJ3N3cGFja2FnZScsICct cyddDQogICAgICAgIHNwYXduX2NtZC5hcHBlbmQocHNmX3BhdGgpDQogICAg ICAgIHNwYXduX2NtZC5hcHBlbmQoJy14JykNCiAgICAgICAgc3Bhd25fY21k LmFwcGVuZCgndGFyZ2V0X3R5cGU9dGFwZScpDQogICAgICAgIHNwYXduX2Nt ZC5hcHBlbmQoJ0AnKQ0KICAgICAgICBzcGF3bl9jbWQuYXBwZW5kKHNlbGYu cGtnX2RpcisiLyIrc2VsZi5nZXRfYmluYXJ5X25hbWUoKSsnLmRlcG90JykN CiAgICAgICAgc2VsZi5zcGF3bihzcGF3bl9jbWQpDQoNCiAgICAjIHJ1bigp DQoNCiAgDQogICAgZGVmIF9tYWtlX2NvbnRyb2xfZmlsZShzZWxmKToNCiAg ICAgICAgIyBHZW5lcmF0ZSBhIHBzZiBmaWxlIGFuZCByZXR1cm4gaXQgYXMg bGlzdCBvZiBzdHJpbmdzIChvbmUgcGVyIGxpbmUpLg0KICAgICAgICAjIGRl ZmluaXRpb25zIGFuZCBoZWFkZXJzDQogICAgICAgIHRpdGxlID0gIiVzICVz IiAlIChzZWxmLm1haW50YWluZXIsc2VsZi5tYWludGFpbmVyX2VtYWlsKQ0K ICAgICAgICB0aXRsZT10aXRsZVswOjgwXQ0KICAgICAgICAjdG9wPXNlbGYu ZGlzdHJpYnV0aW9uLnBhY2thZ2VzWzBdDQogICAgICAgIHBzZl9maWxlID0g Ww0KICAgICAgICAgICAgJ3ZlbmRvcicsICAgICAgICAgICAgICAgIyBWZW5k b3IgaW5mb3JtYXRpb24NCiAgICAgICAgICAgICcgICAgdGFnICAgICAgICAg ICAgICAgICVzJyAlICJESVNUVVRJTFMiLA0KICAgICAgICAgICAgJyAgICB0 aXRsZSAgICAgICAgICAgICAgJXMnICUgdGl0bGUsDQogICAgICAgICAgICAn ICAgIGRlc2NyaXB0aW9uICAgICAgICBEaXN0dXRpbHMgcGFja2FnZSBtYWlu dGFpbmVyICglcyknICUgc2VsZi5saWNlbmNlLA0KICAgICAgICAgICAgJ2Vu ZCcsICAgICAgICAgICAgICAgICAgIyBlbmQgb2YgdmVuZG9yDQogICAgICAg ICAgICAncHJvZHVjdCcsICAgICAgICAgICAgICAjIFByb2R1Y3QgaW5mb3Jt YXRpb24NCiAgICAgICAgICAgICcgICAgdGFnICAgICAgICAgICAgICAgICVz JyAlIHNlbGYubmFtZSwNCiAgICAgICAgICAgICcgICAgdGl0bGUgICAgICAg ICAgICAgICVzJyAlIHNlbGYuZGVzY3JpcHRpb24sDQogICAgICAgICAgICAn ICAgIGRlc2NyaXB0aW9uICAgICAgICAlcycgJSBzZWxmLmRlc2NyaXB0aW9u LA0KICAgICAgICAgICAgJyAgICByZXZpc2lvbiAgICAgICAgICAgJXMnICUg c2VsZi52ZXJzaW9uLA0KICAgICAgICAgICAgJyAgICBhcmNoaXRlY3R1cmUg ICAgICAgJXMnICUgc2VsZi5wbGF0Zm9ybXMsDQogICAgICAgICAgICAnICAg IG1hY2hpbmVfdHlwZSAgICAgICAlcycgJSBzZWxmLm1hY2hpbmVfdHlwZSwN CiAgICAgICAgICAgICcgICAgb3NfbmFtZSAgICAgICAgICAgICVzJyAlIHNl bGYucGxhdGZvcm1zLA0KICAgICAgICAgICAgJyAgICBvc19yZWxlYXNlICAg ICAgICAgJXMnICUgc2VsZi5vc19yZWxlYXNlLA0KICAgICAgICAgICAgJyAg ICBkaXJlY3RvcnkgICAgICAgICAgJXMnICUgc2VsZi5kaXJlY3RvcnkgKyAi LyIgKyBzZWxmLnJvb3RfcGFja2FnZSwNCiAgICAgICAgICAgIF0NCg0KICAg ICAgICBzZWxmLndyaXRlX3NjcmlwdChvcy5wYXRoLmpvaW4oc2VsZi5wa2df ZGlyLCAiY2hlY2tpbnN0YWxsIiksDQogICAgICAgICAgICAgICAgJ2NoZWNr aW5zdGFsbCcsREVGQVVMVF9DSEVDS0lOU1RBTEwpDQogICAgICAgIHBzZl9m aWxlLmV4dGVuZChbJyAgICBjaGVja2luc3RhbGwgICAgICAgJXMvY2hlY2tp bnN0YWxsJyAlIHNlbGYucGtnX2Rpcl0pDQogICAgICAgIHNlbGYud3JpdGVf c2NyaXB0KG9zLnBhdGguam9pbihzZWxmLnBrZ19kaXIsICJwb3N0aW5zdGFs bCIpLA0KICAgICAgICAgICAgICAgICdwb3N0aW5zdGFsbCcsREVGQVVMVF9Q T1NUSU5TVEFMTCkNCiAgICAgICAgcHNmX2ZpbGUuZXh0ZW5kKFsnICAgIHBv c3RpbnN0YWxsICAgICAgICAlcy9wb3N0aW5zdGFsbCcgJSBzZWxmLnBrZ19k aXJdKQ0KICAgICAgICBzZWxmLndyaXRlX3NjcmlwdChvcy5wYXRoLmpvaW4o c2VsZi5wa2dfZGlyLCAicHJlcmVtb3ZlIiksDQogICAgICAgICAgICAgICAg J3ByZXJlbW92ZScsREVGQVVMVF9QUkVSRU1PVkUpDQogICAgICAgIHBzZl9m aWxlLmV4dGVuZChbJyAgICBwcmVyZW1vdmUgICAgICAgICAgJXMvcHJlcmVt b3ZlJyAlIHNlbGYucGtnX2Rpcl0pDQogICAgICAgIHNlbGYud3JpdGVfc2Ny aXB0KG9zLnBhdGguam9pbihzZWxmLnBrZ19kaXIsICJwb3N0cmVtb3ZlIiks DQogICAgICAgICAgICAgICAgJ3Bvc3RyZW1vdmUnLERFRkFVTFRfUE9TVFJF TU9WRSkNCiAgICAgICAgcHNmX2ZpbGUuZXh0ZW5kKFsnICAgIHBvc3RyZW1v dmUgICAgICAgICAlcy9wb3N0cmVtb3ZlJyAlIHNlbGYucGtnX2Rpcl0pDQog ICAgICAgIGlmIHNlbGYucHJlaW5zdGFsbDoNCiAgICAgICAgICAgIHNlbGYu d3JpdGVfc2NyaXB0KHNlbGYucGtnX2RpcisiL3ByZWluc3RhbGwiLCAncHJl aW5zdGFsbCcsIE5vbmUpDQogICAgICAgICAgICBwc2ZfZmlsZS5leHRlbmQo WycgICAgcHJlaW5zdGFsbCAgICAgICAgICVzL3ByZWluc3RhbGwnICUgc2Vs Zi5wa2dfZGlyXSkNCiAgICAgICAgaWYgc2VsZi5jb25maWd1cmU6DQogICAg ICAgICAgICBzZWxmLndyaXRlX3NjcmlwdChzZWxmLnBrZ19kaXIrIi9jb25m aWd1cmUiLCAnY29uZmlndXJlJywgTm9uZSkNCiAgICAgICAgICAgIHBzZl9m aWxlLmV4dGVuZChbJyAgICBjb25maWd1cmUgICAgICAgICAgJXMvY29uZmln dXJlJyAlIHNlbGYucGtnX2Rpcl0pDQogICAgICAgIGlmIHNlbGYudW5jb25m aWd1cmU6DQogICAgICAgICAgICBzZWxmLndyaXRlX3NjcmlwdChzZWxmLnBr Z19kaXIrIi91bmNvbmZpZ3VyZSIsICd1bmNvbmZpZ3VyZScsIE5vbmUpDQog ICAgICAgICAgICBwc2ZfZmlsZS5leHRlbmQoWycgICAgdW5jb25maWd1cmUg ICAgICAgICVzL3VuY29uZmlndXJlJyAlIHNlbGYucGtnX2Rpcl0pDQogICAg ICAgIGlmIHNlbGYudmVyaWZ5Og0KICAgICAgICAgICAgc2Vs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mlsZS5leHRlbmQoWycgICAgY29weXJpZ2h0ICAgICAgICAgPGNvcHly aWdodCddKQ0KICAgICAgICBpZiBzZWxmLnJlYWRtZToNCiAgICAgICAgICAg ICMgWFggbWFrZSBhIHJlYWRtZSBmaWxlIFhYWA0KICAgICAgICAgICAgd3Jp dGVfc2NyaXB0KCdyZWFkbWUnKQ0KICAgICAgICAgICAgcHNmX2ZpbGUuZXh0 ZW5kKFsnICAgIHJlYWRtZSAgICAgICAgICAgIDxyZWFkbWUnXSkNCg0KICAg ICAgICBwc2ZfZmlsZS5leHRlbmQoWycgICAgZmlsZXNldCddKSAgICAjIHN0 YXJ0IGZpbGVzZXQNCiAgICAgICAgcGxhdGxpYj1zZWxmLmdldF9maW5hbGl6 ZWRfY29tbWFuZCgnYnVpbGQnKS5idWlsZF9wbGF0bGliDQogICAgICAgIHRp dGxlID0gIiVzIGluc3RhbGxhdGlvbiBmaWxlcyIgJSAoc2VsZi5uYW1lKQ0K ICAgICAgICBwc2ZfZmlsZS5leHRlbmQoWw0KICAgICAgICAgICAgJyAgICAg ICAgdGFnICAgICAgICAgICAgJXMnICUgJ0ZJTEVTJywNCiAgICAgICAgICAg ICcgICAgICAgIHRpdGxlICAgICAgICAgICVzJyAlICIlcyBpbnN0YWxsYXRp b24gZmlsZXMiICUgKHNlbGYubmFtZSksDQogICAgICAgICAgICAnICAgICAg ICByZXZpc2lvbiAgICAgICAlcycgJSBzZWxmLnZlcnNpb24sDQogICAgICAg ICAgICAjJyAgICAgICAgZGlyZWN0b3J5ICAgICAgJXMvJXM9JXMvJXMnICUg KHBsYXRsaWIsc2VsZi5uYW1lLHNlbGYuc2l0ZSxzZWxmLm5hbWUpLA0KICAg ICAgICAgICAgJyAgICAgICAgZGlyZWN0b3J5ICAgICAgJXMvJXM9JXMvJXMn ICUgKHBsYXRsaWIsc2VsZi5yb290X3BhY2thZ2Usc2VsZi5kaXJlY3Rvcnks c2VsZi5yb290X3BhY2thZ2UpLA0KICAgICAgICAgICAgJyAgICAgICAgZmls ZSAgICAgICAgICAgKicNCiAgICAgICAgICAgIF0pDQogICAgICAgIGlmIG5v dCBzZWxmLmtlZXBfcGVybWlzc2lvbnM6DQogICAgICAgICAgICBwc2ZfZmls ZS5leHRlbmQoWycgICAgICAgIGZpbGVfcGVybWlzc2lvbnMgICAgLW0gNDQ0 IC11IHJvb3QgLWcgYmluJ10pDQogICAgICAgIHBzZl9maWxlLmV4dGVuZChb JyAgICBlbmQnXSkgICAgICAgICMgZW5kIG9mIGZpbGVzZXQNCiAgICAgICAg cHNmX2ZpbGUuZXh0ZW5kKFsnZW5kJ10pICAgICMgZW5kIG9mIHByb2R1Y3QN CiAgICAgICAgICAgICAgIA0KIyBYWFggYWRkIGZpbGVzZXQgaW5mb3JtYXRp b24NCiAgICAgICAgDQoNCiAgICAgICAgcmV0dXJuIHBzZl9maWxlDQoNCiAg ICAjIF9tYWtlX2NvbnRyb2xfZmlsZSAoKQ0KDQoNCiMgY2xhc3MgYmRpc3Rf c2R1eA0K ---656673009-1276059836-986589469=:53210-- From kern@caltech.edu Sat Apr 7 03:12:01 2001 From: kern@caltech.edu (Robert Kern) Date: Sat Apr 7 02:12:01 2001 Subject: [Distutils] Another requested feature (with patch) Message-ID: <20010406231055.A27519@its.caltech.edu> * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst commands. This is necessary when trying to build on Windows with mingw32 since the plain bdist_* commands will try to rebuild with MSVCCompiler. I have a patch that seems to work with the dumb formats and Windows installer. I didn't quite grok the bdist_rpm code, so I don't quite know how to work it in there. The patch is attached. I can put it on the Sourceforge Patch Manager if someone likes. -- Robert Kern kern@caltech.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From kern@caltech.edu Sat Apr 7 03:13:01 2001 From: kern@caltech.edu (Robert Kern) Date: Sat Apr 7 02:13:01 2001 Subject: [Distutils] Patch from the previous message Message-ID: <20010406231255.A27539@its.caltech.edu> --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sorry. Here it is. -- Robert Kern kern@caltech.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bdist_skip.diff" ? build Index: distutils/command/bdist.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist.py,v retrieving revision 1.20 diff -c -r1.20 bdist.py *** distutils/command/bdist.py 2000/10/14 04:06:40 1.20 --- distutils/command/bdist.py 2001/04/07 06:07:52 *************** *** 40,47 **** --- 40,51 ---- ('dist-dir=', 'd', "directory to put final built distributions in " "[default: dist]"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), ] + boolean_options = ['skip-build'] + help_options = [ ('help-formats', None, "lists available distribution formats", show_formats), *************** *** 76,81 **** --- 80,86 ---- self.plat_name = None self.formats = None self.dist_dir = None + self.skip_build = 0 # initialize_options() Index: distutils/command/bdist_dumb.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_dumb.py,v retrieving revision 1.16 diff -c -r1.16 bdist_dumb.py *** distutils/command/bdist_dumb.py 2000/09/30 18:27:54 1.16 --- distutils/command/bdist_dumb.py 2001/04/07 06:07:52 *************** *** 30,38 **** "creating the distribution archive"), ('dist-dir=', 'd', "directory to put final built distributions in"), ] ! boolean_options = ['keep-temp'] default_format = { 'posix': 'gztar', 'nt': 'zip', } --- 30,40 ---- "creating the distribution archive"), ('dist-dir=', 'd', "directory to put final built distributions in"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), ] ! boolean_options = ['keep-temp', 'skip-build'] default_format = { 'posix': 'gztar', 'nt': 'zip', } *************** *** 44,49 **** --- 46,52 ---- self.format = None self.keep_temp = 0 self.dist_dir = None + self.skip_build = 0 # initialize_options() *************** *** 71,80 **** def run (self): ! self.run_command('build') install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir self.announce("installing to %s" % self.bdist_dir) self.run_command('install') --- 74,85 ---- def run (self): ! if not self.skip_build: ! self.run_command('build') install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir + install.skip_build = self.skip_build self.announce("installing to %s" % self.bdist_dir) self.run_command('install') Index: distutils/command/bdist_wininst.py =================================================================== RCS file: /cvsroot/python/distutils/distutils/command/bdist_wininst.py,v retrieving revision 1.20 diff -c -r1.20 bdist_wininst.py *** distutils/command/bdist_wininst.py 2001/03/16 20:57:37 1.20 --- distutils/command/bdist_wininst.py 2001/04/07 06:07:52 *************** *** 36,41 **** --- 36,43 ---- "bitmap to use for the installer instead of python-powered logo"), ('title=', 't', "title to display on the installer background instead of default"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), ] boolean_options = ['keep-temp'] *************** *** 49,54 **** --- 51,57 ---- self.dist_dir = None self.bitmap = None self.title = None + self.skip_build = 0 # initialize_options() *************** *** 79,88 **** ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") ! self.run_command('build') install = self.reinitialize_command('install') install.root = self.bdist_dir if os.name != 'nt': # Must force install to use the 'nt' scheme; we set the # prefix too just because it looks silly to put stuff --- 82,93 ---- ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") ! if not self.skip_build: ! self.run_command('build') install = self.reinitialize_command('install') install.root = self.bdist_dir + install.skip_build = self.skip_build if os.name != 'nt': # Must force install to use the 'nt' scheme; we set the # prefix too just because it looks silly to put stuff --MGYHOYXEY6WxJCY8-- From mal@lemburg.com Sat Apr 7 06:55:15 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Sat Apr 7 05:55:15 2001 Subject: [Distutils] Another requested feature (with patch) References: <20010406231055.A27519@its.caltech.edu> Message-ID: <3ACEE3D0.BC117E7C@lemburg.com> Robert Kern wrote: > > * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst > commands. This is necessary when trying to build on Windows with mingw32 > since the plain bdist_* commands will try to rebuild with MSVCCompiler. > I have a patch that seems to work with the dumb formats and Windows > installer. I didn't quite grok the bdist_rpm code, so I don't quite > know how to work it in there. > > The patch is attached. I can put it on the Sourceforge Patch Manager > if someone likes. Please do so that we don't forget about the patch ;-) -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From Tony Seward Sat Apr 7 13:52:01 2001 From: Tony Seward (Tony Seward) Date: Sat Apr 7 12:52:01 2001 Subject: [Distutils] Requested feature Message-ID: Better SWIG support would be nice. From Tony Seward Sat Apr 7 13:56:01 2001 From: Tony Seward (Tony Seward) Date: Sat Apr 7 12:56:01 2001 Subject: [Distutils] Requested feature In-Reply-To: Message-ID: On Sat, 7 Apr 2001, Tony Seward wrote: > Better SWIG support would be nice. > Oops. Too fast with the fingers. Open patch #401904 is a reasonable solution. (At least it worked for me.) Tony > > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > http://mail.python.org/mailman/listinfo/distutils-sig > From phrxy@csv.warwick.ac.uk Sat Apr 7 14:00:59 2001 From: phrxy@csv.warwick.ac.uk (John J. Lee) Date: Sat Apr 7 13:00:59 2001 Subject: [Distutils] Another requested feature (with patch) In-Reply-To: <20010406231055.A27519@its.caltech.edu> Message-ID: On Fri, 6 Apr 2001, Robert Kern wrote: > * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst > commands. This is necessary when trying to build on Windows with mingw32 > since the plain bdist_* commands will try to rebuild with MSVCCompiler. > I have a patch that seems to work with the dumb formats and Windows > installer. I didn't quite grok the bdist_rpm code, so I don't quite > know how to work it in there. > > The patch is attached. I can put it on the Sourceforge Patch Manager > if someone likes. Shouldn't there instead be a -c (--compiler) option to build and install? This makes sense, and is neater. I think this was discussed here before at some point, but I don't remember if anything was decided. John From kern@caltech.edu Sun Apr 8 22:26:00 2001 From: kern@caltech.edu (Robert Kern) Date: Sun Apr 8 21:26:00 2001 Subject: [Distutils] Another requested feature (with patch) In-Reply-To: <3ACEE3D0.BC117E7C@lemburg.com>; from mal@lemburg.com on Sat, Apr 07, 2001 at 11:54:24AM +0200 References: <20010406231055.A27519@its.caltech.edu> <3ACEE3D0.BC117E7C@lemburg.com> Message-ID: <20010408182542.B29724@its.caltech.edu> On Sat, Apr 07, 2001 at 11:54:24AM +0200, M.-A. Lemburg wrote: > Robert Kern wrote: [snip] > > The patch is attached. I can put it on the Sourceforge Patch Manager > > if someone likes. > > Please do so that we don't forget about the patch ;-) Done. Patch # 414775 > -- > Marc-Andre Lemburg -- Robert Kern kern@caltech.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From R.Liebscher@gmx.de Mon Apr 9 05:13:02 2001 From: R.Liebscher@gmx.de (Rene Liebscher) Date: Mon Apr 9 04:13:02 2001 Subject: [Distutils] Another requested feature (with patch) References: Message-ID: <3AD16E94.772F3488@gmx.de> "John J. Lee" wrote: > > On Fri, 6 Apr 2001, Robert Kern wrote: > > > * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst > > commands. This is necessary when trying to build on Windows with mingw32 > > since the plain bdist_* commands will try to rebuild with MSVCCompiler. Anyone checked this? It should be solved since May 2000, see also http://mail.python.org/pipermail/distutils-sig/2000-May/001052.html http://mail.python.org/pipermail/distutils-sig/2000-May/001081.html > > I have a patch that seems to work with the dumb formats and Windows > > installer. I didn't quite grok the bdist_rpm code, so I don't quite > > know how to work it in there. > > > > The patch is attached. I can put it on the Sourceforge Patch Manager > > if someone likes. > > Shouldn't there instead be a -c (--compiler) option to build and install? > This makes sense, and is neater. I think this was discussed here before > at some point, but I don't remember if anything was decided. You can always add options for commands which are to be run by the command you want to execute. python setup.py install build --compiler=mingw32 (install runs an internal build) or python setup.py bdist ... build --compiler=mingw32 (bdist does an install which does a build) Rene From mal@lemburg.com Mon Apr 9 05:31:00 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Apr 9 04:31:00 2001 Subject: [Distutils] Another requested feature (with patch) References: <3AD16E94.772F3488@gmx.de> Message-ID: <3AD17309.214675F0@lemburg.com> Rene Liebscher wrote: > > "John J. Lee" wrote: > > > > On Fri, 6 Apr 2001, Robert Kern wrote: > > > > > * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst > > > commands. This is necessary when trying to build on Windows with mingw32 > > > since the plain bdist_* commands will try to rebuild with MSVCCompiler. > Anyone checked this? It should be solved since May 2000, see also > http://mail.python.org/pipermail/distutils-sig/2000-May/001052.html > http://mail.python.org/pipermail/distutils-sig/2000-May/001081.html > > > > I have a patch that seems to work with the dumb formats and Windows > > > installer. I didn't quite grok the bdist_rpm code, so I don't quite > > > know how to work it in there. > > > > > > The patch is attached. I can put it on the Sourceforge Patch Manager > > > if someone likes. > > > > Shouldn't there instead be a -c (--compiler) option to build and install? > > This makes sense, and is neater. I think this was discussed here before > > at some point, but I don't remember if anything was decided. > > You can always add options for commands which are to be run by the > command you > want to execute. > > python setup.py install build --compiler=mingw32 > (install runs an internal build) > > or > > python setup.py bdist ... build --compiler=mingw32 > (bdist does an install which does a build) The point here is to skip the build during the bdist* processing. This is especially important for bdist_rpm (and probably others too) since the build commands don't inherit the extra options you pass to setup.py), e.g. bdist_rpm won't use any of the compiler options for compiling the RPM binary... at least it did not last time I tested this. -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From kern@caltech.edu Mon Apr 9 06:40:02 2001 From: kern@caltech.edu (Robert Kern) Date: Mon Apr 9 05:40:02 2001 Subject: [Distutils] Another requested feature (with patch) In-Reply-To: <3AD16E94.772F3488@gmx.de>; from R.Liebscher@gmx.de on Mon, Apr 09, 2001 at 10:11:00AM +0200 References: <3AD16E94.772F3488@gmx.de> Message-ID: <20010409023907.A585@its.caltech.edu> On Mon, Apr 09, 2001 at 10:11:00AM +0200, Rene Liebscher wrote: > "John J. Lee" wrote: > > > > On Fri, 6 Apr 2001, Robert Kern wrote: > > > > > * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst > > > commands. This is necessary when trying to build on Windows with mingw32 > > > since the plain bdist_* commands will try to rebuild with MSVCCompiler. > Anyone checked this? It should be solved since May 2000, see also > http://mail.python.org/pipermail/distutils-sig/2000-May/001052.html > http://mail.python.org/pipermail/distutils-sig/2000-May/001081.html I used a Distutils with that patch. "python setup.py bdist --format=zip" did not work. > > > I have a patch that seems to work with the dumb formats and Windows > > > installer. I didn't quite grok the bdist_rpm code, so I don't quite > > > know how to work it in there. > > > > > > The patch is attached. I can put it on the Sourceforge Patch Manager > > > if someone likes. > > > > Shouldn't there instead be a -c (--compiler) option to build and install? > > This makes sense, and is neater. I think this was discussed here before > > at some point, but I don't remember if anything was decided. > > You can always add options for commands which are to be run by the > command you > want to execute. > > python setup.py install build --compiler=mingw32 > (install runs an internal build) > > or > > python setup.py bdist ... build --compiler=mingw32 > (bdist does an install which does a build) Ooh! Neat! I'm sure this is documented somewhere, but we might as well put it on the request list to make that particular use of multiple commands more obvious. Therefore, my patch could be replaced by python setup.py bdist ... install --skip-build > Rene -- Robert Kern kern@caltech.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From R.Liebscher@gmx.de Mon Apr 9 10:39:01 2001 From: R.Liebscher@gmx.de (Rene Liebscher) Date: Mon Apr 9 09:39:01 2001 Subject: [Distutils] Another requested feature (with patch) References: <3AD16E94.772F3488@gmx.de> <20010409023907.A585@its.caltech.edu> Message-ID: <3AD1BAF0.C8B7F116@gmx.de> Robert Kern wrote: > > On Mon, Apr 09, 2001 at 10:11:00AM +0200, Rene Liebscher wrote: > > "John J. Lee" wrote: > > > > > > On Fri, 6 Apr 2001, Robert Kern wrote: > > > > > > > * add a --skip-build option to the bdist, bdist_dumb, and bdist_wininst > > > > commands. This is necessary when trying to build on Windows with mingw32 > > > > since the plain bdist_* commands will try to rebuild with MSVCCompiler. > > Anyone checked this? It should be solved since May 2000, see also > > http://mail.python.org/pipermail/distutils-sig/2000-May/001052.html > > http://mail.python.org/pipermail/distutils-sig/2000-May/001081.html > > I used a Distutils with that patch. "python setup.py bdist --format=zip" did > not work. > I works if you do a build, install or bdist without to change the source files. If you change the source files then you you have to specify the compiler. If mingw32 is your prefered compiler you could add these lines to your personal distutils configuration file ( http://python.sourceforge.net/devel-docs/inst/config-syntax.html ) ------------------------ [build_ext] compiler=mingw32 ------------------------ Kind regards Rene From thomas.heller@ion-tof.com Mon Apr 9 15:01:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 9 14:01:01 2001 Subject: [Distutils] Small change to bdist_wininst Message-ID: <051001c0c11e$ebd61770$e000a8c0@thomasnotebook> The bdist_wininst command creates a windows installer presenting a small GUI to the user. The meta-info from the setup script is displayed in a dialog box, in the following way (this is for distutils itself): +-----------------------------------------------------+ |A collection of modules to aid in the distribution and installation of |Python modules, extensions, and (ultimately) applications. A standard |part of Python 1.6 and 2.0, but also distributed separately for use with |Python 1.5. | | | | Author: Greg Ward | | Author_email: gward@python.net | | Description: Python Distribution Utilities | | Licence: Python | | Maintainer: A.M. Kuchling | | Maintainer_email: amk1@bigfoot.com | | Name: Distutils | | Url: http://www.python.org/sigs/distutils-sig/ | | Version: 1.0.2pre | +-----------------------------------------------------+ The dialog box is not large enough to display the whole text without scrolling, the actual textfield size (at least on my computer) is marked above. I think that the box should be enlarged so that 80 characters are displayed. Should I make this change? Thomas From mal@lemburg.com Mon Apr 9 15:14:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Apr 9 14:14:01 2001 Subject: [Distutils] Small change to bdist_wininst References: <051001c0c11e$ebd61770$e000a8c0@thomasnotebook> Message-ID: <3AD1FBA5.36B27601@lemburg.com> Thomas Heller wrote: > > The bdist_wininst command creates a windows installer > presenting a small GUI to the user. > The meta-info from the setup script is displayed in > a dialog box, in the following way (this is for distutils itself): > > +-----------------------------------------------------+ > |A collection of modules to aid in the distribution and installation of > |Python modules, extensions, and (ultimately) applications. A standard > |part of Python 1.6 and 2.0, but also distributed separately for use with > |Python 1.5. | > | | > | Author: Greg Ward | > | Author_email: gward@python.net | > | Description: Python Distribution Utilities | > | Licence: Python | > | Maintainer: A.M. Kuchling | > | Maintainer_email: amk1@bigfoot.com | > | Name: Distutils | > | Url: http://www.python.org/sigs/distutils-sig/ | > | Version: 1.0.2pre | > +-----------------------------------------------------+ > > The dialog box is not large enough to display the whole text > without scrolling, the actual textfield size (at least on > my computer) is marked above. > > I think that the box should be enlarged so that 80 characters > are displayed. > > Should I make this change? Yes, please (I had to reformat the descriptions of my mx stuff manually to make them fit the windows :-). 80 chars is the standard for just about everything, so its a pretty good assumption for use of message boxes as well :-) -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From pete@visionart.com Mon Apr 9 15:37:01 2001 From: pete@visionart.com (Pete Shinners) Date: Mon Apr 9 14:37:01 2001 Subject: [Distutils] Small change to bdist_wininst References: <051001c0c11e$ebd61770$e000a8c0@thomasnotebook> Message-ID: <009401c0c123$dfbd5fc0$f43f93cd@visionart.com> > The dialog box is not large enough to display the whole text > without scrolling, the actual textfield size (at least on > my computer) is marked above. > > I think that the box should be enlarged so that 80 characters > are displayed. > > Should I make this change? another option might be to simply remove the line feeds in the description text, then enable wordwrapping on the multiline edit box. i also think a bigger box here is good too. although stripping the linefeeds would destroy any formatting anyone put into their description (like bulleted items, etc) i'm not sure if anyone is doing anything like that (or if it is recommended at all) in their long_description From mal@lemburg.com Tue Apr 10 08:53:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue Apr 10 07:53:01 2001 Subject: [Distutils] Solaris and HP binary commands References: Message-ID: <3AD2F3C9.A345847B@lemburg.com> "Mark W. Alexander" wrote: > > Thanks to Andrew's work on PEP 241, I finally got motivated > to revisit bdist commands for Solaris pkgtool and HP's SD-UX. Great :) > Attached are three files ... Please upload these files to the SourceForge patch manager, so that we don't lose track of them. About the packager base class: if we proceed down this road, then bdist_rpm should be adapted to the new base class as well. Other packager which are still unsupported (this should go onto the todo list): * Debian tools * FreeBSD tools * non-RedHat RPMs (e.g. as subclasses of bdist_rpm) Thanks, -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From mwa@gate.net Tue Apr 10 12:47:00 2001 From: mwa@gate.net (Mark W. Alexander) Date: Tue Apr 10 11:47:00 2001 Subject: [Distutils] Solaris and HP binary commands In-Reply-To: <3AD2F3C9.A345847B@lemburg.com> Message-ID: On Tue, 10 Apr 2001, M.-A. Lemburg wrote: > > > Attached are three files ... > > Please upload these files to the SourceForge patch manager, so > that we don't lose track of them. OK, I was hoping for a little shake-out by others first, but it may be I'm the only poor sap coping with these systems. I've already got a buggette in sdux improperly using build_platlib for pure modules (like, um, distutils...Duh). I'll submit them when that's corrected. > About the packager base class: if we proceed down this road, > then bdist_rpm should be adapted to the new base class as well. That's the idea. If the packager base class can be made smart enough, a single setup.cfg entry should suffice for distributions to make binaries in every possible format. Delusions of grandeur aside, I don't think I'm distutils savy enough to trust bdist_packager based on my input alone. I'd really appreciate some more eyeballs on that class especially. Especially Mssrs. Heller and Geller! > Other packager which are still unsupported (this should go onto the > todo list): > > * Debian tools That's my next one.. > * FreeBSD tools > * non-RedHat RPMs (e.g. as subclasses of bdist_rpm) How would those differ? The .spec files and the rpm calls to make them should remain unchanged. (FWIW, I've fought rpm on Solaris and HP and determined that it wasn't worth the effort.) Mark From akuchlin@mems-exchange.org Tue Apr 10 13:25:01 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Tue Apr 10 12:25:01 2001 Subject: [Distutils] Solaris and HP binary commands In-Reply-To: ; from mwa@gate.net on Tue, Apr 10, 2001 at 11:47:09AM -0400 References: <3AD2F3C9.A345847B@lemburg.com> Message-ID: <20010410122422.A15057@ute.cnri.reston.va.us> On Tue, Apr 10, 2001 at 11:47:09AM -0400, Mark W. Alexander wrote: >> * Debian tools > >That's my next one.. Note that Sean Reifschneider was planning to devote some engineer time to implementing a bdist command for Debian. Sean, is there any progress to report? (Also, I think other people have taken stabs at it; check the Distutil-SIG archives.) --amk From thomas.heller@ion-tof.com Wed Apr 11 11:09:00 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Wed Apr 11 10:09:00 2001 Subject: [Distutils] Small change to bdist_wininst References: <051001c0c11e$ebd61770$e000a8c0@thomasnotebook> <3AD1FBA5.36B27601@lemburg.com> Message-ID: <04aa01c0c290$cd18d610$e000a8c0@thomasnotebook> I've checked in a larger dialog box, which should be able to display approximately 80 (due to the proportional font used) characters. Thomas From mal@lemburg.com Wed Apr 11 15:23:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Wed Apr 11 14:23:01 2001 Subject: [Distutils] Packagers (Solaris and HP binary commands) References: Message-ID: <3AD4A0C7.76F233D0@lemburg.com> "Mark W. Alexander" wrote: > > On Tue, 10 Apr 2001, M.-A. Lemburg wrote: > > > > About the packager base class: if we proceed down this road, > > then bdist_rpm should be adapted to the new base class as well. > > That's the idea. If the packager base class can be made smart > enough, a single setup.cfg entry should suffice for distributions > to make binaries in every possible format. > > Delusions of grandeur aside, I don't think I'm distutils savy > enough to trust bdist_packager based on my input alone. I'd > really appreciate some more eyeballs on that class especially. > Especially Mssrs. Heller and Geller! > > > Other packager which are still unsupported (this should go onto the > > todo list): > > > > * Debian tools > > That's my next one.. > > > * FreeBSD tools > > * non-RedHat RPMs (e.g. as subclasses of bdist_rpm) > > How would those differ? The .spec files and the rpm calls to > make them should remain unchanged. (FWIW, I've fought rpm on > Solaris and HP and determined that it wasn't worth the effort.) What's different is the directory layout and naming conventions these distributions use, e.g. SuSE uses different file/package names than RedHat and thus the dependencies may not properly match. For some Linux distros the installation layout may also be different (some use /usr/local others /opt etc. for optional system add-ons). -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From pete@visionart.com Fri Apr 13 22:12:00 2001 From: pete@visionart.com (Pete Shinners) Date: Fri Apr 13 21:12:00 2001 Subject: [Distutils] Distutil BUG in RC1 !! Message-ID: <00d401c0c480$37c96f60$f43f93cd@visionart.com> i'm guessing this is kind of urgent, i just found a bug in the distutils that came with my recently downloaded Python2.1C1 i installed on windows, using the win-installer for 2.1c1 here's the quick and dirty details... in the file "lib/distutils/archive-util.py" line 103, it creates a ZIP archive with the following command... ZipFile(zip_filename, "wb", compression=zipfile.ZIP_DEFLATED) the problem here is the file mode, "wb". the zipfile.py that comes with 2.1c1 only allows the following file modes; "r", "w", or "a". this can be seen at line 166 in "lib/zipfile.py" modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'} self.fp = open(file, modeDict[mode]) personally, i would think it better to make the zipfile smart enough to handle "wb" as a mode, but it certainly does not. anyways, the "sdist" command fails when building a zipfile because of this. please, someone tell me this won't be found when the final Python-2.1 is released in a few days. i'll mail out a full scale assault-style warning if there's still no news by the 16th. but i figure it can be handled most quickly and cleanly right here and now in disutils-sig From guido@digicool.com Sat Apr 14 13:16:02 2001 From: guido@digicool.com (Guido van Rossum) Date: Sat Apr 14 12:16:02 2001 Subject: [Distutils] Re: Distutil BUG in RC1 !! In-Reply-To: Your message of "Sat, 14 Apr 2001 12:01:01 -0400." References: Message-ID: <200104141718.MAA16989@cj20424-a.reston1.va.home.com> > i'm guessing this is kind of urgent, i just found a bug in > the distutils that came with my recently downloaded Python2.1C1 > i installed on windows, using the win-installer for 2.1c1 > > here's the quick and dirty details... > > in the file "lib/distutils/archive-util.py" line 103, it creates > a ZIP archive with the following command... > > ZipFile(zip_filename, "wb", compression=zipfile.ZIP_DEFLATED) > > > the problem here is the file mode, "wb". the zipfile.py that comes > with 2.1c1 only allows the following file modes; "r", "w", or "a". > this can be seen at line 166 in "lib/zipfile.py" > > modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'} > self.fp = open(file, modeDict[mode]) > > > > personally, i would think it better to make the zipfile smart enough > to handle "wb" as a mode, but it certainly does not. anyways, the > "sdist" command fails when building a zipfile because of this. > > > please, someone tell me this won't be found when the final Python-2.1 > is released in a few days. i'll mail out a full scale assault-style > warning if there's still no news by the 16th. but i figure it can be > handled most quickly and cleanly right here and now in disutils-sig Thanks for reporting. Fixing modeDict in zipfile.py isn't enough, because there are other places where it relies on the key being one of 'r', 'w', or 'a'. So I propose this fix to archive-util.py: *** archive_util.py 2000/09/26 02:13:49 1.9 --- archive_util.py 2001/04/14 16:15:14 *************** *** 100,106 **** z.write(path, path) if not dry_run: ! z = zipfile.ZipFile(zip_filename, "wb", compression=zipfile.ZIP_DEFLATED) os.path.walk(base_dir, visit, z) --- 100,106 ---- z.write(path, path) if not dry_run: ! z = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) os.path.walk(base_dir, visit, z) I will check this in now. I can't test it though, so please let me know whether this solves the problem. --Guido van Rossum (home page: http://www.python.org/~guido/) From Nicolas.Chauvat@logilab.fr Mon Apr 16 12:27:01 2001 From: Nicolas.Chauvat@logilab.fr (Nicolas Chauvat) Date: Mon Apr 16 11:27:01 2001 Subject: [Distutils] Problem with build_clib building PIL Message-ID: Hi folks, I downloaded the latest PIL source tarball from pythonware.com, copied the pil_setup.py example available from the latest Distutil (1.0.1) to Imaging-1.1.1/setup.py, cd'd to that directory and ran 'python setup.py sdist', only to see it fail: [nico@mybox Imaging-1.1.1]$ python setup.py sdist running sdist warning: sdist: manifest template 'MANIFEST.in' does not exist (using defau= lt file list) Traceback (innermost last): File "setup.py", line 181, in ? libraries =3D optional_libs)] File "/usr/lib/python1.5/site-packages/distutils/core.py", line 138, in s= etup dist.run_commands() File "/usr/lib/python1.5/site-packages/distutils/dist.py", line 829, in r= un_commands self.run_command(cmd) File "/usr/lib/python1.5/site-packages/distutils/dist.py", line 849, in r= un_command cmd_obj.run() File "/usr/lib/python1.5/site-packages/distutils/command/sdist.py", line = 143, in run self.get_file_list() File "/usr/lib/python1.5/site-packages/distutils/command/sdist.py", line = 242, in get_file_list self.add_defaults() File "/usr/lib/python1.5/site-packages/distutils/command/sdist.py", line = 319, in add_defaults self.filelist.extend(build_clib.get_source_files()) File "/usr/lib/python1.5/site-packages/distutils/cmd.py", line 107, in __= getattr__ raise AttributeError, attr AttributeError: get_source_files [nico@mybox Imaging-1.1.1]$=20 I checked the file .../distutils/command/build_clib.py and it doesn't have the missing get_source_files() method, whereas build_py.py and build_ext.py have it. I don't have time to figure out what the actual problem is and to come up with a fix in case it'd be needed, I hope someone will... [please cc me as I'm not on the list] --=20 Nicolas Chauvat http://www.logilab.com - "Mais o=F9 est donc Ornicar ?" - LOGILAB, Paris (F= rance) From mal@lemburg.com Wed Apr 18 18:08:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Wed Apr 18 17:08:01 2001 Subject: [Distutils] Change in build_ext breaks code Message-ID: <3ADE01E5.FCA9BCB9@lemburg.com> A recent change (fix) in build_ext.py breaks code which wants to override .finalize_options(): revision 1.68.2.1 date: 2001/03/31 16:09:32; author: moshez; state: Exp; lines: +20 -2 - #233253 - distutils/command/build_ext.py - the --define and --undef options didn't work, whether specified on the command-line or in setup.cfg. - distutils/command/build_ext.py - make docstrings raw - #128930 - distutils/command/build_ext.py - split rpath argument Suggested by AMK, but had to be massaged a bit from the cvs diff The proper thing to do would be to test .define and .undefine for strings (which are set by the command-line args) before tweaking them into tuples... -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From akuchlin@mems-exchange.org Fri Apr 20 15:35:00 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Fri Apr 20 14:35:00 2001 Subject: [Distutils] Distutils 1.0.2 release candidate Message-ID: I've put a release candidate for Distutils 1.0.2: http://www.python.org/sigs/distutils-sig/download/ (Available in .tar.gz, .zip, and Win32 .exe formats) Can people please try it out and let me know if there are any problems? If there aren't, in a few days I'll update the Distutils Web page and send out an announcement. People on the Python-checkins list will notice that I haven't made any changes beyond bumping the version number; 1.0.2 is the same code that's in Python 2.1final. --amk From thomas.heller@ion-tof.com Mon Apr 23 04:37:02 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 23 03:37:02 2001 Subject: [Distutils] Distutils 1.0.2 release candidate References: Message-ID: <024d01c0cbc8$1ad8d6d0$e000a8c0@thomasnotebook> > I've put a release candidate for Distutils 1.0.2: > http://www.python.org/sigs/distutils-sig/download/ > > (Available in .tar.gz, .zip, and Win32 .exe formats) > > Can people please try it out and let me know if there are any > problems? If there aren't, in a few days I'll update the Distutils > Web page and send out an announcement. > Some quick notes: - the wininst version (Distutils-1.0.2.win32.exe) crashed with a general protection fault, if I build it myself it seems to work. - The archive-util bug reported by Pete Shinners seems still to be present: > in the file "lib/distutils/archive-util.py" line 103, it creates > a ZIP archive with the following command... > > ZipFile(zip_filename, "wb", compression=zipfile.ZIP_DEFLATED) I can take a deeper look later, in the meantime it seems it should not yet be released. BTW: There is a bug in the Python 2.1 release version of Distutils: '1.0.2pre' isn't a valid version number by distutils' own standards. This was of course _my_ fault. Thomas From akuchlin@mems-exchange.org Mon Apr 23 12:17:00 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Mon Apr 23 11:17:00 2001 Subject: [Distutils] Distutils 1.0.2 release candidate In-Reply-To: <024d01c0cbc8$1ad8d6d0$e000a8c0@thomasnotebook>; from thomas.heller@ion-tof.com on Mon, Apr 23, 2001 at 09:36:25AM +0200 References: <024d01c0cbc8$1ad8d6d0$e000a8c0@thomasnotebook> Message-ID: <20010423111638.A5750@ute.cnri.reston.va.us> On Mon, Apr 23, 2001 at 09:36:25AM +0200, Thomas Heller wrote: >- The archive-util bug reported by Pete Shinners seems still to be >present: Aieee! My source tree mustn't have been up to date; I've made a new set of tarballs which really *do* have the current code. This may also explain why the Windows installer crashes, since there were some missing patches for it. Please try again with the new files. >BTW: There is a bug in the Python 2.1 release version of Distutils: >'1.0.2pre' isn't a valid version number by distutils' own standards. >This was of course _my_ fault. I don't think this really matters; the setup.py containing the 1.0.2pre version isn't inside the Python 2.1 source tree at all, --amk From thomas.heller@ion-tof.com Mon Apr 23 12:58:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 23 11:58:01 2001 Subject: [Distutils] Distutils 1.0.2 release candidate References: <024d01c0cbc8$1ad8d6d0$e000a8c0@thomasnotebook> <20010423111638.A5750@ute.cnri.reston.va.us> Message-ID: <068d01c0cc0e$1ca333c0$e000a8c0@thomasnotebook> > >BTW: There is a bug in the Python 2.1 release version of Distutils: > >'1.0.2pre' isn't a valid version number by distutils' own standards. > >This was of course _my_ fault. > > I don't think this really matters; the setup.py containing the > 1.0.2pre version isn't inside the Python 2.1 source tree at all, > Not the setup.py, but distutils\__init__.py is: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/dist/src/Lib/distutils/__init__.py?rev=1.19&content-type=text/vnd.viewc vs-markup """distutils The main package for the Python Module Distribtion Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ __revision__ = "$Id: __init__.py,v 1.19 2001/03/16 21:00:18 theller Exp $" __version__ = "1.0.2pre" C:\work\chip_test>c:\python21\python.exe Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. >>> import distutils >>> distutils.__version__ '1.0.2pre' >>> ^Z Thomas From paul@pfdubois.com Mon Apr 23 14:33:01 2001 From: paul@pfdubois.com (Paul F. Dubois) Date: Mon Apr 23 13:33:01 2001 Subject: [Distutils] Installers for Numeric Message-ID: Dear Nummies, If you picked up the source installer for 20.0.0b2 in the first hour after I released it, it will die when building "kinds". Since you probably don't care, everything else will have been done by then. I have fixed both the .tar.gz and .zip source distributions now. This egregious error gives me the chance to say that I haven't the slightest idea whether the rpm and source rpm work. I just made 'em with Distutils. You rpm freaks out there will have to check it out and if it needs fixing, fix it. But we get so many people asking for those and for the Windows installers that I thought it worth a shot. Distutils burbled along pleasantly while making them, anyway. I did try the Windows installers and although they seem to work the "uninstall" didn't work for me. I have no clue if that is because that command isn't expected to work yet or not. Well informed, aren't I? Can you do better? Please do. == Paul From thomas.heller@ion-tof.com Mon Apr 23 14:51:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 23 13:51:01 2001 Subject: [Distutils] Installers for Numeric References: Message-ID: <081901c0cc1d$e2f4b620$e000a8c0@thomasnotebook> > I did try the Windows installers and although they seem to work the > "uninstall" didn't work for me. I have no clue if that is because that > command isn't expected to work yet or not. This command _is_expected to work (and it did indeed for me). Which problems did you have? Thomas From dubois@users.sourceforge.net Mon Apr 23 15:00:01 2001 From: dubois@users.sourceforge.net (Paul F. Dubois) Date: Mon Apr 23 14:00:01 2001 Subject: [Distutils] Installers for Numeric In-Reply-To: <081901c0cc1d$e2f4b620$e000a8c0@thomasnotebook> Message-ID: Eeek. It does work for me. I just wasn't doing it right. Being a stupid Unix hacker I was trying to execute a file in Python 2.1 that said RemoveMA-8.6.exe. I should have realized that would not remove MA-8.6. (:-> Indeed, if I do the normal Windows Add/Remove programs, no problem. I do suggest renaming the file, IWouldRemoveMA-8.6IfYouKnewHow.notexe -----Original Message----- From: distutils-sig-admin@python.org [mailto:distutils-sig-admin@python.org]On Behalf Of Thomas Heller Sent: Monday, April 23, 2001 10:50 AM To: Paul F. Dubois; Numpy-Discussion@Lists. Sourceforge. Net Cc: Distutils-Sig@Python.Org Subject: Re: [Distutils] Installers for Numeric > I did try the Windows installers and although they seem to work the > "uninstall" didn't work for me. I have no clue if that is because that > command isn't expected to work yet or not. This command _is_expected to work (and it did indeed for me). Which problems did you have? Thomas _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig From thomas.heller@ion-tof.com Mon Apr 23 15:14:00 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 23 14:14:00 2001 Subject: [Distutils] Installers for Numeric References: Message-ID: <087f01c0cc21$2e5d56f0$e000a8c0@thomasnotebook> > Eeek. It does work for me. I just wasn't doing it right. Being a stupid Unix > hacker I was trying to execute a file in Python 2.1 that said > RemoveMA-8.6.exe. I should have realized that would not remove MA-8.6. (:-> > It's not that easy on windows: The days where you would simply start a program to do something are long gone ;-). I assume you got a message-box, saying something like 'This program is normally run by windows', which seems not to be very good. Probably it should say: 'To remove the MA-8.6 package, please use Control Panel->Add/Remove Programs' or something like that. Thomas > Indeed, if I do the normal Windows Add/Remove programs, no problem. > > I do suggest renaming the file, > IWouldRemoveMA-8.6IfYouKnewHow.notexe From paul@pfdubois.com Mon Apr 23 15:19:02 2001 From: paul@pfdubois.com (Paul F. Dubois) Date: Mon Apr 23 14:19:02 2001 Subject: [Distutils] Installers for Numeric In-Reply-To: <087f01c0cc21$2e5d56f0$e000a8c0@thomasnotebook> Message-ID: No, it was more alarming than that. "Setup program invalid or damaged." -----Original Message----- From: Thomas Heller [mailto:thomas.heller@ion-tof.com] Sent: Monday, April 23, 2001 11:14 AM To: Paul F. Dubois; Numpy-Discussion@Lists. Sourceforge. Net Cc: Distutils-Sig@Python.Org Subject: Re: [Distutils] Installers for Numeric > Eeek. It does work for me. I just wasn't doing it right. Being a stupid Unix > hacker I was trying to execute a file in Python 2.1 that said > RemoveMA-8.6.exe. I should have realized that would not remove MA-8.6. (:-> > It's not that easy on windows: The days where you would simply start a program to do something are long gone ;-). I assume you got a message-box, saying something like 'This program is normally run by windows', which seems not to be very good. Probably it should say: 'To remove the MA-8.6 package, please use Control Panel->Add/Remove Programs' or something like that. Thomas > Indeed, if I do the normal Windows Add/Remove programs, no problem. > > I do suggest renaming the file, > IWouldRemoveMA-8.6IfYouKnewHow.notexe From thomas.heller@ion-tof.com Mon Apr 23 15:48:00 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Mon Apr 23 14:48:00 2001 Subject: [Distutils] Installers for Numeric References: Message-ID: <091901c0cc25$dc6d70f0$e000a8c0@thomasnotebook> > No, it was more alarming than that. "Setup program invalid or damaged." Not for me. Just downloaded from SF the py2.1 versions, installed and clicked FFTPack, MA, Numeric, kinds and RNG and I always got 'This program is normally run by windows'. Thomas From tshumway@ics.uci.edu Mon Apr 23 22:38:09 2001 From: tshumway@ics.uci.edu (Terrel Shumway) Date: Mon Apr 23 21:38:09 2001 Subject: [Distutils] building wxpython with msvc Message-ID: <3AE4D7CB.A36477F4@ics.uci.edu> Building wxPython in an unusual environment I discovered that MS link.exe uses the environment variable TMP for its temporary files. unusual environment: \ is not writable by current user os.env["TMP"] is not set result: link.exe fails: "\lnk2 does not exist" Solution: before calling link.exe, make sure TMP is set and points to a writable directory. This fix should probably go into distutils. From P.FREMY@OBERTHURCS.com Tue Apr 24 12:18:09 2001 From: P.FREMY@OBERTHURCS.com (Philippe FREMY) Date: Tue Apr 24 11:18:09 2001 Subject: [Distutils] using distutils for an application Message-ID: <191CBBF91062D411855D00D0B76F1C3053CCE4@PROXIMA> Hi, I have developped an application with Python and PyQt (klotski, see http://klotski.berlios.de/klotski/) and was faced with the problem of distribution. I was told to look at distutils but this wasn't the answer to my problems. Distutils is very module centric. It is very efficient to install a module but doesn't answer the needs of installing applications. The problems I had are: - where to install the program data ? - how to start the program ? Use a loader ? Tell people to run python klotski.py ? - how to make the program visible to the underlying os (Menu, etc) ? - how to load the data that have been installed (find their location at runtime) ? I solved all this using a shell script loader and a Makefile to install everything under /usr/share for Unix. For windows, I just left everything in the same directory. I wonder if you have advices regarding this kind of problem and if they are going to be adressed by distutils or if it is considered to be too much os-specific. regards, Philippe ps: I am not subscribed, so please cc me any answer. From mal@lemburg.com Tue Apr 24 13:05:10 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue Apr 24 12:05:10 2001 Subject: [Distutils] using distutils for an application References: <191CBBF91062D411855D00D0B76F1C3053CCE4@PROXIMA> Message-ID: <3AE5A36F.C406040E@lemburg.com> Philippe FREMY wrote: > > Hi, > > I have developped an application with Python and PyQt (klotski, see > http://klotski.berlios.de/klotski/) and was faced with the problem of > distribution. > > I was told to look at distutils but this wasn't the answer to my problems. > > Distutils is very module centric. It is very efficient to install a module > but doesn't answer the needs of installing applications. It wasn't designed for packaging applications, but it should be possible to tweak the implementation according to your needs by subclassing distutils commands. > The problems I had are: > - where to install the program data ? distutils has a command install_data for this which you may want to use. > - how to start the program ? Use a loader ? Tell people to run python > klotski.py ? Right. > - how to make the program visible to the underlying os (Menu, etc) ? On Windows, you would add a Menu entry... I'm not sure how this is done and whether distutils has any support for this. On Unix, there is no standard method for this. Not sure about Macs. > - how to load the data that have been installed (find their location at > runtime) ? Depends on how you configure install_data. > I solved all this using a shell script loader and a Makefile to install > everything under /usr/share for Unix. For windows, I just left everything in > the same directory. This seems like a reasonable way to do it. distutils should be able to emulate your Makefile easily (after all, it's using Python). > I wonder if you have advices regarding this kind of problem and if they are > going to be adressed by distutils or if it is considered to be too much > os-specific. > > regards, > > Philippe > > ps: I am not subscribed, so please cc me any answer. > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From shredwheat@mediaone.net Tue Apr 24 14:12:56 2001 From: shredwheat@mediaone.net (Pete Shinners) Date: Tue Apr 24 13:12:56 2001 Subject: [Distutils] docs and samples Message-ID: <008401c0cce1$002f9480$0200a8c0@petebox> hello distutils. i've got my sizeable package that distutils is now handling really well. i've got some questions on how to best cleanup some loose ends. first, the package comes with a good supply of documentation and example code. this is really useful and i'd like to do my best to guarantee anyone who installs also has these on hand. currently these files are all in my MANIFEST template, so they are included with the "sdist" archives. i haven't put them into my "install_data" yet, because i'm not sure where i should put them. i've seen pyopengl just puts all this into it's installed "site-packages" directory, which hasn't bothered me really, but i don't know if all users will be able to find it there. has anyone figured out a standard way to do this, perhaps distutils should also have a "install_docs" command which can put things in the proper place? in my specific case the docs are in HTML, and the sample code requires the use of many binary data files. i'm just not sure what to do with these? From P.FREMY@OBERTHURCS.com Wed Apr 25 17:11:01 2001 From: P.FREMY@OBERTHURCS.com (Philippe FREMY) Date: Wed Apr 25 16:11:01 2001 Subject: [Distutils] using distutils for an application Message-ID: <191CBBF91062D411855D00D0B76F1C3053CF05@PROXIMA> > > > > Distutils is very module centric. It is very efficient to > install a module > > but doesn't answer the needs of installing applications. > > It wasn't designed for packaging applications, > Reading the SIG intruduction: "The goal of the Distribution Utilities (`distutils') is to make building, distributing, and installing Python modules, extensions, and applications painless and standardized." I see the word "applications" there :-) > > The problems I had are: > > - where to install the program data ? > > distutils has a command install_data for this which you may want > to use. I didn't see it or was unable to use it. Is it really possible to install data and then load them at runtime without any problem ? > > - how to make the program visible to the underlying os (Menu, etc) ? > > On Windows, you would add a Menu entry... I'm not sure how > this is done and whether distutils has any support for this. > On Unix, there is no standard method for this. Not sure > about Macs. This is exactly the point I would like to make. There is no standard method _yet_. But I think it should be worked out. > but it should > be possible to tweak the implementation according to your needs > by subclassing distutils commands. This should not be a tweak every different program has to rewrite. A handwritten unstandard installation method is not a good idea. There are more and more applications developed with python today, especially since there are more graphical toolkits available : PyQt, PyGtk, PyGnome, PyWxWindow, Tkinter, etc. A standard way of distributing a python application is really needed. There is not that much to define, given how much has already been done with DistUtils: - define where to install runtime data and how to load it - define perhaps how to store and load user data - provide a way to install the program in the standard menu system: -> gnome, kde, windows, mac, ... On unix, this could be configurable and left up to the guy installing the program to decide for what environment he want a menu entry. What do you think about this ? regards, Philippe From mal@lemburg.com Thu Apr 26 10:34:00 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu Apr 26 09:34:00 2001 Subject: [Distutils] using distutils for an application References: <191CBBF91062D411855D00D0B76F1C3053CF05@PROXIMA> Message-ID: <3AE82377.10EB1370@lemburg.com> Philippe FREMY wrote: > > > > > > > Distutils is very module centric. It is very efficient to > > install a module > > > but doesn't answer the needs of installing applications. > > > > It wasn't designed for packaging applications, > > > Reading the SIG intruduction: > "The goal of the Distribution Utilities (`distutils') is to make building, > distributing, and installing Python modules, extensions, and applications > painless and standardized." > > I see the word "applications" there :-) Well, eventually distutils will also be able to package and install applications, but we're still not quite there yet (even though Thomas' py2exe is already heading in that direction). > > > The problems I had are: > > > - where to install the program data ? > > > > distutils has a command install_data for this which you may want > > to use. > > I didn't see it or was unable to use it. Is it really possible to install > data and then load them at runtime without any problem ? The command is not really well-defined yet, e.g. to be able to make some use of it, I had to subclass it too for my mx stuff. > > > - how to make the program visible to the underlying os (Menu, etc) ? > > > > On Windows, you would add a Menu entry... I'm not sure how > > this is done and whether distutils has any support for this. > > On Unix, there is no standard method for this. Not sure > > about Macs. > > This is exactly the point I would like to make. There is no standard method > _yet_. But I think it should be worked out. Don't you think that professional installers do a better job here ? E.g. distutils could create the setup scripts for these installers rather than try to mimick all the works itself. > > but it should > > be possible to tweak the implementation according to your needs > > by subclassing distutils commands. > > This should not be a tweak every different program has to rewrite. A > handwritten unstandard installation method is not a good idea. > > There are more and more applications developed with python today, especially > since there are more graphical toolkits available : PyQt, PyGtk, PyGnome, > PyWxWindow, Tkinter, etc. > > A standard way of distributing a python application is really needed. There > is not that much to define, given how much has already been done with > DistUtils: > > - define where to install runtime data and how to load it > - define perhaps how to store and load user data > - provide a way to install the program in the standard menu system: > -> gnome, kde, windows, mac, ... > On unix, this could be configurable and left up to the guy installing the > program to > decide for what environment he want a menu entry. > > What do you think about this ? Sounds like a huge project. Note that these kind of ideas will only make it into production code if someone stands up and just does the job (like Greg Ward did ). The finishing can then be done be the community, but the general wrapup of initial code has to be done by one or two persons working closely together. -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From vanandel@ucar.edu Thu Apr 26 10:54:01 2001 From: vanandel@ucar.edu (Joe Van Andel) Date: Thu Apr 26 09:54:01 2001 Subject: [Distutils] [Fwd: Re: [Numpy-discussion] Re: [Annouce] Numeric Python 20.0.0b2] Message-ID: <3AE82831.F8B142E2@atd.ucar.edu> Does anyone have a clean solution to the problem of a user needing to specify non-default compiler optimization flags? Konrad Hinsen writes the following to numpy-discussion@lists.sourceforge.net -------- Original Message -------- . . . However, I am not quite happy with other aspects of Distutils. I tried it on my Molecular Modelling Toolkit as well, but users will kill me if I use this in an official release. Some of the code just needs to be compiled with the highest optimization level, and there is no way I can do that with Distutils. _______________________________________________ From thomas.heller@ion-tof.com Thu Apr 26 16:41:03 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Thu Apr 26 15:41:03 2001 Subject: [Distutils] Distutils 1.0.2 release candidate References: <024d01c0cbc8$1ad8d6d0$e000a8c0@thomasnotebook> <20010423111638.A5750@ute.cnri.reston.va.us> Message-ID: <003601c0ce88$c7272780$e000a8c0@thomasnotebook> > Aieee! My source tree mustn't have been up to date; I've made a new > set of tarballs which really *do* have the current code. This may > also explain why the Windows installer crashes, since there were some > missing patches for it. Please try again with the new files. It works now (at least the windows installer which I tried). Thomas From fdrake@acm.org Fri Apr 27 01:35:00 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri Apr 27 00:35:00 2001 Subject: [Distutils] unit test support for distutils Message-ID: <15080.63130.50479.108640@cj42289-a.reston1.va.home.com> --2ZSfV0bXlp Content-Type: text/plain; charset=us-ascii Content-Description: message body and .signature Content-Transfer-Encoding: 7bit I'm sure others have taken a stab at this, but I'd like to suggest that we include some support for a standard test command for setup.py. I've attached the command I've been playing with, but would love to hear other suggestions as well. Drop the attached file into the standard library as distutils/command/test.py. It adds the command "test" parallel to the "build" and "install" commands. It expects a directory named "test" parallel to the setup.py script; that directory is searched for Python module files named test_*.py. Each such module is imported; if a callable named test_suite() is found, it should return a unittest.TestSuite instance that can be run. I'm sure there's a better way to report failures, but I haven't had time to dig that deeply into the distutils yet. -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations --2ZSfV0bXlp Content-Type: text/x-python Content-Description: test command for distutils Content-Disposition: inline; filename="test.py" Content-Transfer-Encoding: 7bit """distutils.command.test Implements the Distutils 'test' command. """ import glob import os import sys import unittest from distutils.core import Command class test(Command): # Brief (40-50 characters) description of the command description = "Run the test suite for the package." # List of option tuples: long name, short name (None if no short # name), and help string. user_options = [#('', '', # ""), ] def initialize_options(self): self.test_dirs = None def finalize_options(self): if self.test_dirs is None: self.test_dirs = ["test"] def run(self): errors = failures = 0 for dir in self.test_dirs: for filename in glob.glob(os.path.join(dir, "test_*.py")): self.announce("running test from " + filename) info = self._run_test(filename) errors = errors + info[0] failures = failures + info[1] if errors or failures: self.announce("%d errors and %d failures" % (errors, failures)) def _run_test(self, filename): # make sure the file's directory is on sys.path so we can import. dirname, basename = os.path.split(filename) sys.path.insert(0, dirname) try: modname = os.path.splitext(basename)[0] mod = __import__(modname) if hasattr(mod, "test_suite"): suite = mod.test_suite() runner = unittest.TextTestRunner(stream=open("/dev/null", 'w')) results = runner.run(suite) return len(results.errors), len(results.failures) else: return (0, 0) finally: if sys.path[0] == dirname: del sys.path[0] --2ZSfV0bXlp-- From mal@lemburg.com Fri Apr 27 06:08:00 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Fri Apr 27 05:08:00 2001 Subject: [Distutils] unit test support for distutils References: <15080.63130.50479.108640@cj42289-a.reston1.va.home.com> Message-ID: <3AE936A2.4EE61989@lemburg.com> "Fred L. Drake, Jr." wrote: > > I'm sure others have taken a stab at this, but I'd like to suggest > that we include some support for a standard test command for > setup.py. I've attached the command I've been playing with, but would > love to hear other suggestions as well. > Drop the attached file into the standard library as > distutils/command/test.py. It adds the command "test" parallel to the > "build" and "install" commands. It expects a directory named "test" > parallel to the setup.py script; that directory is searched for Python > module files named test_*.py. Each such module is imported; if a > callable named test_suite() is found, it should return a > unittest.TestSuite instance that can be run. Wouldn't it be better to explicitly name the test script using a keyword parameter to setup() ? > I'm sure there's a > better way to report failures, but I haven't had time to dig that > deeply into the distutils yet. Some comments: * test (if available) should be run prior to install * installing should not be possible with failing tests (errors) unless an override option is used * the test command should have an option to turn warnings into errors -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Pages: http://www.lemburg.com/python/ From robin@jessikat.fsnet.co.uk Fri Apr 27 06:57:26 2001 From: robin@jessikat.fsnet.co.uk (Robin Becker) Date: Fri Apr 27 05:57:26 2001 Subject: [Distutils] AIX Message-ID: Is there any support for AIX in distutils? We've got several extensions that work fine on PC/Solaris/FreBSD/Linux etc, but now we want to do things with an AIX system and I remember AIX as being particularly nasty and tedious. -- Robin Becker From fdrake@acm.org Fri Apr 27 15:26:02 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri Apr 27 14:26:02 2001 Subject: [Distutils] unit test support for distutils In-Reply-To: <3AE936A2.4EE61989@lemburg.com> References: <15080.63130.50479.108640@cj42289-a.reston1.va.home.com> <3AE936A2.4EE61989@lemburg.com> Message-ID: <15081.47465.828298.590677@cj42289-a.reston1.va.home.com> M.-A. Lemburg writes: > Wouldn't it be better to explicitly name the test script using > a keyword parameter to setup() ? I think that would be a good elaboration, but something simple like this would be useful for the typical case. > * test (if available) should be run prior to install Agreed; I didn't want to mess with the other commands until we determine whether it should go in. > * installing should not be possible with failing tests (errors) unless > an override option is used Fair enough. > * the test command should have an option to turn warnings into > errors Are they treated differently? What's missing is that I don't know offhand how to raise the error condition for distutils, otherwise I would. -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From martin@loewis.home.cs.tu-berlin.de Sat Apr 28 04:01:04 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat Apr 28 03:01:04 2001 Subject: [Distutils] Installing files with syntactic errors Message-ID: <200104280652.f3S6qti00944@mira.informatik.hu-berlin.de> In my package, I have a few files which are syntactically incorrect in Python 1.5 (since they use Unicode literals). Those files are not used in Python 1.5, but are part of a package, and are used in Python 2.0 and later. When running install_cmd on Python 1.5, installation aborts when trying to byte-compile files. I know I can invoke install_cmd with --no-compile, but I still would like to generate byte code for all the other files. So I'm looking for a way to either skip byte-compilation for a single file, to silently procede in case of byte-compilation errors, or to exclude a single module of a package from both building and installation. Any suggestions are welcome. TIA, Martin From mal@lemburg.com Mon Apr 30 04:48:00 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Apr 30 03:48:00 2001 Subject: [Distutils] Installing files with syntactic errors References: <200104280652.f3S6qti00944@mira.informatik.hu-berlin.de> Message-ID: <3AED1880.27502A1B@lemburg.com> "Martin v. Loewis" wrote: > > In my package, I have a few files which are syntactically incorrect in > Python 1.5 (since they use Unicode literals). Those files are not used > in Python 1.5, but are part of a package, and are used in Python 2.0 > and later. > > When running install_cmd on Python 1.5, installation aborts when > trying to byte-compile files. I know I can invoke install_cmd with > --no-compile, but I still would like to generate byte code for all the > other files. > > So I'm looking for a way to either skip byte-compilation for a single > file, to silently procede in case of byte-compilation errors, I'd suggest to use the latter approach and add an option --skip-syntaxerrors to the install command. > or to > exclude a single module of a package from both building and > installation. -- Marc-Andre Lemburg ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/