From thomas.heller@ion-tof.com Wed Sep 5 10:04:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Wed Sep 5 09:04:01 2001 Subject: [Distutils] PEP250 implemented for bdist_wininst (was: Re: [Python-Dev] PEP 250) References: <20010831093519.A16031@gerg.ca> Message-ID: <03b901c1360b$16353350$e000a8c0@thomasnotebook> From: "Greg Ward" > Thomas -- > > have you been following the saga of patch #449054, part of the PEP 250 > implementation. If I understand things correctly, this patch only > partly implements PEP 250 -- the rest is waiting on a change to > bdist_wininst. What's the status of this change? Going to make it in? > > Please see > > http://sourceforge.net/tracker/?func=detail&atid=305470&aid=449054&group_id=5470 > > if you haven't already... > > Greg I've just checked in the changes needed for the bdist_wininst command. Thomas From boud@rempt.xs4all.nl Wed Sep 5 17:00:03 2001 From: boud@rempt.xs4all.nl (Boudewijn Rempt) Date: Wed Sep 5 16:00:03 2001 Subject: [Distutils] Request for technical review Message-ID: Dear people, I want to include a chapter on distributing applications with distutils in my upcoming book on PyQt GUI programming - I thought that a discussion of distributing apps really belongs in a book on GUI app development. However, I'm not an expert (until recently I just made a tarball for the few users brave enough to try my apps), and I'd like to subject the text to a technical review. No doubt I've made bloomers everywhere... It's meant to be a simple introduction to the difficulties associated with packaging Python apps and a cookbook approach to generate a Linux and Windows installation package of an application (no complex libraries to include or anything, just install the app in a place where it can be found, and put the application data in a sensible place). Is there someone who would like to go through the text? Boudewijn Rempt | http://www.valdyas.org From davida@pobox.com Thu Sep 6 00:34:01 2001 From: davida@pobox.com (David Arnold) Date: Wed Sep 5 23:34:01 2001 Subject: [Distutils] windows installer Message-ID: <200109060332.f863Ww710765@xevious.dstc.monash.edu.au> i have a problem with the bdist_wininst target for one of my projects. on Unix (where i use sdist), i override the install command class to do some customisation and configuration on the destination machine, but with bdist_wininst, the install command is run on the packager's machine, not the target. i'd like to be able to register COM servers, create start-menu shortcuts, etc, from within the installer. so ... what do people think about allowing an additional option in the setup.cfg, understood by bdist_wininst (and, more particularly, wininst.exe) that is the name of a script to be run by the selected interpreter after completing the installation? i could then install a `post_wininst.py' script, add it setup.cfg, and when run from wininst.exe, it could do the post-installation things, and if necessary, even remove itself when done. when the script exits, wininst.exe can splash the final wizard pane, and exit. comments? d From robin@jessikat.fsnet.co.uk Thu Sep 6 04:27:01 2001 From: robin@jessikat.fsnet.co.uk (Robin Becker) Date: Thu Sep 6 03:27:01 2001 Subject: [Distutils] windows installer In-Reply-To: <200109060332.f863Ww710765@xevious.dstc.monash.edu.au> References: <200109060332.f863Ww710765@xevious.dstc.monash.edu.au> Message-ID: In article <200109060332.f863Ww710765@xevious.dstc.monash.edu.au>, David Arnold writes >i have a problem with the bdist_wininst target for one of my projects. > ..... > >what do people think about allowing an additional option in the >setup.cfg, understood by bdist_wininst (and, more particularly, >wininst.exe) that is the name of a script to be run by the selected >interpreter after completing the installation? > >i could then install a `post_wininst.py' script, add it setup.cfg, and >when run from wininst.exe, it could do the post-installation things, and >if necessary, even remove itself when done. when the script exits, >wininst.exe can splash the final wizard pane, and exit. > >comments? .... sounds excellent, if not already present it should be. I'm told inno et al allow pre and post execution. -- Robin Becker From Alexandre.Fayolle@logilab.fr Thu Sep 6 11:50:06 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu Sep 6 10:50:06 2001 Subject: [Distutils] building on windows with mingw32 Message-ID: Hello, I'm trying to build an extension module on windows using the --compiler=mingw32 option to the build command, but I get the following error : running build_ext building 'logilab.xmldiff.maplookup' extension creating build\temp.win32-2.1 creating build\temp.win32-2.1\Release C:\CYGWIN\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON21\Include -c logilab/xmldiff/extensions/maplookup.c -o build\temp.win32-2.1\Release\maplookup.o writing build\temp.win32-2.1\Release\maplookup.def C:\CYGWIN\BIN\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.1\Release\ maplookup.o build\temp.win32-2.1\Release\maplookup.def -LC:\PYTHON21\libs -lpython21 -o build\lib.win32-2.1\logilab\xmldiff\maplookup.pyd build\temp.win32-2.1\Release\maplookup.o(.text+0xb2):maplookup.c: undefined reference to `_imp___Py_NoneStruct' build\temp.win32-2.1\Release\maplookup.o(.text+0xb9):maplookup.c: undefined reference to `_imp___Py_NoneStruct' build\temp.win32-2.1\Release\maplookup.o(.text+0x150):maplookup.c: undefined reference to `_imp___Py_NoneStruct' build\temp.win32-2.1\Release\maplookup.o(.text+0x157):maplookup.c: undefined reference to `_imp___Py_NoneStruct' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 I'm running python 2.1 on Win98, with gcc 2.95.3-5 and ld 2.11.90. nm on maplookup.o told me the following $ nm //C/temp/DistUtils/build/temp.win32-2.1/Release/maplookup.o | grep None U __imp___Py_NoneStruct (notice the double underscore at the beginning of the symbole, whereas the error message has only one underscore) The only symbols I could find in python21.lib having something to do with None are the following : $ nm python21.lib | grep None mp.win32-2.1/Release 00000000 T _PyErr_SetNone 00000000 I __imp__PyErr_SetNone Does anyone have an idea about what's going on ? TIA Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From R.Liebscher@gmx.de Thu Sep 6 12:02:02 2001 From: R.Liebscher@gmx.de (Rene Liebscher) Date: Thu Sep 6 11:02:02 2001 Subject: [Distutils] building on windows with mingw32 References: Message-ID: <3B978FD7.8973F7C9@gmx.de> Alexandre Fayolle wrote: > > Hello, > > I'm trying to build an extension module on windows using the > --compiler=mingw32 option to the build command, but I get the following > error : > > running build_ext > building 'logilab.xmldiff.maplookup' extension > creating build\temp.win32-2.1 > creating build\temp.win32-2.1\Release > C:\CYGWIN\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON21\Include -c > logilab/xmldiff/extensions/maplookup.c -o > build\temp.win32-2.1\Release\maplookup.o > writing build\temp.win32-2.1\Release\maplookup.def > C:\CYGWIN\BIN\gcc.exe -mno-cygwin -mdll -static -s > build\temp.win32-2.1\Release\ > maplookup.o build\temp.win32-2.1\Release\maplookup.def -LC:\PYTHON21\libs > -lpython21 -o build\lib.win32-2.1\logilab\xmldiff\maplookup.pyd > build\temp.win32-2.1\Release\maplookup.o(.text+0xb2):maplookup.c: undefined > reference to `_imp___Py_NoneStruct' > build\temp.win32-2.1\Release\maplookup.o(.text+0xb9):maplookup.c: undefined > reference to `_imp___Py_NoneStruct' > build\temp.win32-2.1\Release\maplookup.o(.text+0x150):maplookup.c: undefined > reference to `_imp___Py_NoneStruct' > build\temp.win32-2.1\Release\maplookup.o(.text+0x157):maplookup.c: undefined > reference to `_imp___Py_NoneStruct' > collect2: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > > I'm running python 2.1 on Win98, with gcc 2.95.3-5 and ld 2.11.90. > > nm on maplookup.o told me the following > $ nm //C/temp/DistUtils/build/temp.win32-2.1/Release/maplookup.o | grep > None > U __imp___Py_NoneStruct > > (notice the double underscore at the beginning of the symbole, whereas the > error message has only one underscore) > > The only symbols I could find in python21.lib having something to do with > None are the following : > > $ nm python21.lib | grep None mp.win32-2.1/Release > 00000000 T _PyErr_SetNone > 00000000 I __imp__PyErr_SetNone > > Does anyone have an idea about what's going on ? > > TIA > > Alexandre Fayolle gcc needs its own libraries. See at http://python.sourceforge.net/devel-docs/inst/non-ms-compilers.html how to build these libraries. kind regards Rene Liebscher From Alexandre.Fayolle@logilab.fr Thu Sep 6 12:18:01 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu Sep 6 11:18:01 2001 Subject: [Distutils] building on windows with mingw32 In-Reply-To: <3B978FD7.8973F7C9@gmx.de> Message-ID: On Thu, 6 Sep 2001, Rene Liebscher wrote: > gcc needs its own libraries. See at > http://python.sourceforge.net/devel-docs/inst/non-ms-compilers.html > how to build these libraries. Thanks for the quick and precise answer. It worked like a breeze ! Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From thomas.heller@ion-tof.com Thu Sep 6 16:09:00 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Thu Sep 6 15:09:00 2001 Subject: [Distutils] Re: [XML-SIG] Problem installing PyXMLv0.6.6 References: <87DAC3BFA900D41199FF00E018A0042F2E7C82@HOBBES><01d601c12cb9$2872ab20$e000a8c0@thomasnotebook><15238.33009.608095.827060@grendel.digicool.com><033d01c12ccc$72cca7d0$e000a8c0@thomasnotebook><15238.41443.603440.529861@grendel.digicool.com><03fb01c12ccf$27773220$e000a8c0@thomasnotebook> <15238.42846.990755.185752@grendel.digicool.com> Message-ID: <011b01c13707$3cde87c0$e000a8c0@thomasnotebook> From: "Fred L. Drake, Jr." > > Thomas Heller writes: > > There is a Windows api to find out which pythonxx.dll python.exe > > binds to, so it should be possible. > > Cool! So there is hope for people who build from source but don't > or can't build the installer. (Wise was generous in giving us a copy > of their current installer builder, but it was only one license.) I have implemented most of this. The user can browse for other python.exe files, and the installer determines the dll which this exe loads. The final problem is that I'm not able to figure out sys.prefix for this executable. I tried to dynamically embed this dll, and retrieve sys.prefix. Normally this is empty. If I do not set PYTHONHOME, sys.prefix is wrong (the path to the installer executable). If I do set PYTHONHOME to the actual python.exe, sys.prefix is also wrong (path to the python.exe). In case I've compiled my python from source, the path to the exe is ...\src\PCBUILD\python.exe, and sys.prefix is set to ...\src\PYBUILD while it should be '...\src'. sys.path seems to be set correctly. The only possibility I see at the moment is to import the os module, retrieve the path from it (which is /lib/os.py), and determine the prefix from it. Aren't there any other solutions? Thomas From oldham@codesourcery.com Thu Sep 6 16:23:00 2001 From: oldham@codesourcery.com (Jeffrey Oldham) Date: Thu Sep 6 15:23:00 2001 Subject: [Distutils] Difficulty on Irix Message-ID: <200109061922.MAA19105@oz.codesourcery.com> I am having difficulty using ExtensionClass on IRIX64 6.5. The compiler produces n32 ABI object files but the linker needs to be told this. python setup.py build --build-platlib . --build-temp . running build running build_ext skipping 'ExtensionClass' extension (up-to-date) skipping 'Acquisition' extension (up-to-date) skipping 'MethodObject' extension (up-to-date) building 'MultiMapping' extension cc -O -OPT:Olimit=0 -I/usr/local/packages/Python-2.1.1/include/python2.1 -c MultiMapping.c -o ./MultiMapping.o #### ld expects o32 objects but is given n32 objects. ld -shared -all ./MultiMapping.o -o ./MultiMapping.so ld32: FATAL 12: Expecting o32 objects: ./MultiMapping.o is n32. error: command 'ld' failed with exit status 4 #### ld succeeds when told -n32. ld -n32 -shared -all ./MultiMapping.o -o ./MultiMapping.so Here is the Setup file: *shared* ExtensionClass ExtensionClass.c Acquisition Acquisition.c MethodObject MethodObject.c MultiMapping MultiMapping.c ThreadLock ThreadLock.c Missing Missing.c Sync Sync.c Record Record.c ComputedAttribute ComputedAttribute.c Perhaps an irixcompiler.py needs to be written? Thanks, Jeffrey D. Oldham oldham@codesourcery.com From thomas.heller@ion-tof.com Fri Sep 7 04:47:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Fri Sep 7 03:47:01 2001 Subject: [Distutils] windows installer References: <200109060332.f863Ww710765@xevious.dstc.monash.edu.au> Message-ID: <039201c13771$2a92a410$e000a8c0@thomasnotebook> > i have a problem with the bdist_wininst target for one of my projects. > > on Unix (where i use sdist), i override the install command class to > do some customisation and configuration on the destination machine, > but with bdist_wininst, the install command is run on the packager's > machine, not the target. > > i'd like to be able to register COM servers, create start-menu > shortcuts, etc, from within the installer. > > so ... > > what do people think about allowing an additional option in the > setup.cfg, understood by bdist_wininst (and, more particularly, > wininst.exe) that is the name of a script to be run by the selected > interpreter after completing the installation? > > i could then install a `post_wininst.py' script, add it setup.cfg, and > when run from wininst.exe, it could do the post-installation things, and > if necessary, even remove itself when done. when the script exits, > wininst.exe can splash the final wizard pane, and exit. > This is an idea I also had in my mind for quite some time, but I have not yet added to my (overloaded) todo list. Thomas From mal@lemburg.com Mon Sep 10 17:37:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Sep 10 16:37:01 2001 Subject: [Distutils] bdist_inno again References: <6qd75g6oud.fsf@abnoba.intevation.de> Message-ID: <3B9D20E4.B0F4AB83@lemburg.com> Bernhard Herzog wrote: > > Hi all, > > a bdist_inno command to generate an installer with Inno Setup has been > discussed previously but I don't know whether anybody has done anything > about it. Has anything changed in this regard? Has anybody started to > write it? > > I'll start writing it myself, otherwise. I don't know how general it > will be, though. All I really need at the moment is an implementation > that's good enough for my needs. I looked into writing one, but was on vacation for the last three weeks and didn't get around to it. I think the bdist_rpm command should go a long way as template for the bdist_inno command. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From akuchlin@mems-exchange.org Mon Sep 10 17:44:01 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Mon Sep 10 16:44:01 2001 Subject: [Distutils] bdist_inno again In-Reply-To: <3B9D20E4.B0F4AB83@lemburg.com>; from mal@lemburg.com on Mon, Sep 10, 2001 at 10:21:56PM +0200 References: <6qd75g6oud.fsf@abnoba.intevation.de> <3B9D20E4.B0F4AB83@lemburg.com> Message-ID: <20010910164316.H19628@ute.mems-exchange.org> On Mon, Sep 10, 2001 at 10:21:56PM +0200, M.-A. Lemburg wrote: >I think the bdist_rpm command should go a long way as template >for the bdist_inno command. Also note patch #415226 on SourceForge, which creates a new base class for binary packaging. I'd like comments on whether this patch is a good idea. --amk From bh@intevation.de Tue Sep 11 07:14:01 2001 From: bh@intevation.de (Bernhard Herzog) Date: Tue Sep 11 06:14:01 2001 Subject: [Distutils] bdist_inno again References: <6qd75g6oud.fsf@abnoba.intevation.de> <3B9D20E4.B0F4AB83@lemburg.com> Message-ID: <6q3d5udohy.fsf@abnoba.intevation.de> "M.-A. Lemburg" writes: > Bernhard Herzog wrote: > > > > Hi all, > > > > a bdist_inno command to generate an installer with Inno Setup has been > > discussed previously but I don't know whether anybody has done anything > > about it. Has anything changed in this regard? Has anybody started to > > write it? > > > > I'll start writing it myself, otherwise. I don't know how general it > > will be, though. All I really need at the moment is an implementation > > that's good enough for my needs. > > I looked into writing one, but was on vacation for the last three > weeks and didn't get around to it. Well, I've written one for our project in the meantime. I've tried to separate the generic bdist_inno code from our application specific code so I can make it available separately. The current version, just put online, is: ftp://intevation.de/users/bh/bdist_inno-0.1.py It's a bit kludgy and unfinished but it works for us. One reason it's kludgy is that it's for an application and not just modules. > I think the bdist_rpm command should go a long way as template > for the bdist_inno command. I borrowed some ideas from it, at least. :) Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://mapit.de/ From bh@intevation.de Tue Sep 11 11:06:00 2001 From: bh@intevation.de (Bernhard Herzog) Date: Tue Sep 11 10:06:00 2001 Subject: [Distutils] bdist_inno again References: <6qd75g6oud.fsf@abnoba.intevation.de> <3B9D20E4.B0F4AB83@lemburg.com> <20010910164316.H19628@ute.mems-exchange.org> Message-ID: <6qvgipddsh.fsf@abnoba.intevation.de> Andrew Kuchling writes: > On Mon, Sep 10, 2001 at 10:21:56PM +0200, M.-A. Lemburg wrote: > >I think the bdist_rpm command should go a long way as template > >for the bdist_inno command. > > Also note patch #415226 on SourceForge, which creates a new base class > for binary packaging. I'd like comments on whether this patch is a > good idea. In principle it's a good idea, I think. I'm not so sure about the patch as it is, though. The script parameters (preinstall, postinstall, etc.) are probably unix or even RPM specific. Their documentation explicitly says they're "Bourne shell code". It's also not clear whether their values are filenames (as in bdist_rpm) or the actual code. The get_script method allows both (and even a list of strings) and the ensure_script method appears to but doesn't do it correctly (it tests for string first which will always be true even if it's a filename; the correct implementation would probably just check for string). The run method doesn't seem to do any actual work and even hinders derived classes in just extending it. ISTM that derived classes will have to overwrite this method (in its current implementation) completely. Last not least, I agree with Martin's comment in the patch tracker that the patch should also modify existing bdist commands. Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://mapit.de/ From andy47@crosswinds.net Wed Sep 12 08:28:01 2001 From: andy47@crosswinds.net (Andy Todd) Date: Wed Sep 12 07:28:01 2001 Subject: [Distutils] Having trouble with 'exclude' Message-ID: <3B9F46DC.9040200@crosswinds.net> I am having a few problems with creating a source distribution and would appreciate any help or pointers. The situation, I have the world's simplest package, in the directory are five files; """ MANIFEST.in setup.py wibble.py wibble.user.py """ The only line in MANIFEST.in is; "exclude wibble.user.py" because for my own reasons I do not want that file even in my source distribution. When I run "python setup.py sdist" I get the following output; """ running sdist reading manifest template 'MANIFEST.in' warning: no previously-included files found matching 'wibble.user.py' writing manifest file 'MANIFEST' creating Wibble-1.0 making hard links in Wibble-1.0... hard linking README.txt -> Wibble-1.0 hard linking setup.py -> Wibble-1.0 hard linking ./wibble.py -> Wibble-1.0/. hard linking ./wibble.user.py -> Wibble-1.0/. tar -cf dist/Wibble-1.0.tar Wibble-1.0 gzip -f9 dist/Wibble-1.0.tar removing 'Wibble-1.0' (and everything under it) """ Any suggestions? If it is any help my setup.py file is basically; """ #!/usr/bin/env python APPLICATION_NAME = "Wibble" from distutils.core import setup import glob, os, sys setup(name=APPLICATION_NAME, version=1.0, description="My application", author="me", author_email="my.email", url="http://my.url", packages=[APPLICATION_NAME], package_dir={APPLICATION_NAME: '.'}, scripts=[], licence="Python", data_files=[] ) """ Whilst I'm here, is there any definitive documentation on the arguments and their valid values that can be passed to 'setup'? The shipped documentation seems to be a bit all over the place. Thanks in advance, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Hit me with your fax machine, baby" - Francis Dunnery, "Because I Can" From R.Liebscher@gmx.de Wed Sep 12 09:06:10 2001 From: R.Liebscher@gmx.de (Rene Liebscher) Date: Wed Sep 12 08:06:10 2001 Subject: [Distutils] Having trouble with 'exclude' References: <3B9F46DC.9040200@crosswinds.net> Message-ID: <3B9F4ECA.BD37CA@gmx.de> Andy Todd wrote: > > I am having a few problems with creating a source distribution and would > appreciate any help or pointers. > > The situation, I have the world's simplest package, in the directory are > five files; > > """ > MANIFEST.in > setup.py > wibble.py > wibble.user.py > """ > > The only line in MANIFEST.in is; > "exclude wibble.user.py" > > because for my own reasons I do not want that file even in my source > distribution. > > When I run "python setup.py sdist" I get the following output; > """ > running sdist > reading manifest template 'MANIFEST.in' > warning: no previously-included files found matching 'wibble.user.py' > writing manifest file 'MANIFEST' > creating Wibble-1.0 > making hard links in Wibble-1.0... > hard linking README.txt -> Wibble-1.0 > hard linking setup.py -> Wibble-1.0 > hard linking ./wibble.py -> Wibble-1.0/. > hard linking ./wibble.user.py -> Wibble-1.0/. > tar -cf dist/Wibble-1.0.tar Wibble-1.0 > gzip -f9 dist/Wibble-1.0.tar > removing 'Wibble-1.0' (and everything under it) > """ > > Any suggestions? > > If it is any help my setup.py file is basically; > > """ > #!/usr/bin/env python > APPLICATION_NAME = "Wibble" > from distutils.core import setup > import glob, os, sys > > setup(name=APPLICATION_NAME, > version=1.0, > description="My application", > author="me", > author_email="my.email", > url="http://my.url", > packages=[APPLICATION_NAME], > package_dir={APPLICATION_NAME: '.'}, > scripts=[], > licence="Python", > data_files=[] > ) > """ > > Whilst I'm here, is there any definitive documentation on the arguments > and their valid values that can be passed to 'setup'? The shipped > documentation seems to be a bit all over the place. > > Thanks in advance, > Andy You specify the package dir as '.'. Then the file wibble.user.py is listed as './wibble.user.py' and is not matched as '^wibble\.user\.py$' (regular expression.) (You can see this by setting the environment variable DISTUTILS_DEBUG=1 before you run your setup.py.) If you use exclude ./wibble.user.py it should work as you want. Kind regards Rene Liebscher From pobrien@orbtech.com Wed Sep 12 14:48:01 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Wed Sep 12 13:48:01 2001 Subject: [Distutils] Help - Does wininst ignore MANIFEST? Message-ID: I just started using distutils, have run into a snag and could really use some help. I'm able to create source distributions with no problem. But when I try to create a windows installer version via: C:\Code\PyCrust>python setup.py bdist --formats=wininst I get a win32.exe file that does not contain my icon file or subdirectories, whereas the .zip and .tar.gz files come out fine. Is this a known problem? Or am I doing something wrong? Here are my manifest files: MANIFEST.in ----------- include PyCrust.ico recursive-include Data *.py *.txt recursive-include Demos *.py *.txt recursive-include Docs *.py *.txt Produces this MANIFEST file: ---------------------------- PyCrust.ico README.txt setup.py .\PyCrust.py .\PyFilling.py .\PyShell.py .\__init__.py .\crust.py .\filling.py .\interpreter.py .\introspect.py .\pseudo.py .\shell.py .\version.py Data\PyCrustTutorial.py Data\PythonTutorial.py Demos\PyCrustAlaCarte.py Demos\PyCrustMinimus.py Docs\CHANGES.txt Which is used by this setup.py: ------------------------------- #!/usr/bin/env python """Setup file for the distribution of PyCrust. PyCrust is a pure Python distribution. Thanks to Andy Todd, who created the original setup.py for PyCrust.""" __author__ = "Patrick K. O'Brien " __cvsid__ = "$Id: setup.py,v 1.1 2001/09/12 16:16:32 pobrien Exp $" __date__ = "September 11, 2001" __version__ = "$Revision: 1.1 $"[11:-2] from distutils.core import setup import version setup(name="PyCrust", version=str(version.VERSION), description="PyCrust - The Flakiest Python Shell", author="Patrick K. O'Brien", author_email="pobrien@orbtech.com", url="http://sourceforge.net/projects/pycrust/", packages=["PyCrust"], package_dir={"PyCrust": "."}, scripts=["PyCrust.py", "PyShell.py", "PyFilling.py"], licence="Python", long_description=""" PyCrust is an interactive Python environment written in Python. PyCrust components can run standalone or be integrated into other development environments and/or other Python applications. PyCrust comes with an interactive Python shell (PyShell), an interactive namespace/object tree control (PyFilling) and an integrated, split-window combination of the two (PyCrust). """, ) Any advice would be greatly appreciated. I'm on Win98se with Python 2.1.1 and Cygwin (though I am running distutils from a dosbox, not the Cygwin shell). Thanks. --- Patrick K. O'Brien Orbtech (http://www.orbtech.com) "I am, therefore I think." From robin@alldunn.com Wed Sep 12 15:42:18 2001 From: robin@alldunn.com (Robin Dunn) Date: Wed Sep 12 14:42:18 2001 Subject: [Distutils] Help - Does wininst ignore MANIFEST? References: Message-ID: <019901c13bba$80490730$0100a8c0@Rogue> > I just started using distutils, have run into a snag and could really use > some help. I'm able to create source distributions with no problem. But when > I try to create a windows installer version via: > > C:\Code\PyCrust>python setup.py bdist --formats=wininst > > I get a win32.exe file that does not contain my icon file or subdirectories, > whereas the .zip and .tar.gz files come out fine. Is this a known problem? > Or am I doing something wrong? IIUC, the bdist commands only bundle what would be installed with a "python setup.py install" command. I've been able to get other files installed by using the data_files parameter to the setup function. For example (edited from PyBSDDB): setup(name = 'bsddb3', # # ... all the other stuff clipped ... # data_files = [("bsddb3/utils", ["db/bin/db_archive.exe", "db/bin/db_checkpoint.exe", "db/bin/db_deadlock.exe", "db/bin/db_dump.exe", "db/bin/db_load.exe", "db/bin/db_printlog.exe", "db/bin/db_recover.exe", "db/bin/db_stat.exe", "db/bin/db_upgrade.exe", "db/bin/db_verify.exe", "db/bin/libdb%s.dll" % ver, ]), ("bsddb3/test", glob.glob("test/*.py")) ] ) -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From pobrien@orbtech.com Wed Sep 12 18:55:00 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Wed Sep 12 17:55:00 2001 Subject: [Distutils] Help - Does wininst ignore MANIFEST? In-Reply-To: Message-ID: Correction, the .zip and .tar.gz files contain everything specified in MANIFEST, but do not *install* everything that gets unzipped. I have to say, this has got to be the most frustrating experience I have had yet with Python. --- Patrick K. O'Brien Orbtech (http://www.orbtech.com) "I am, therefore I think." -----Original Message----- From: distutils-sig-admin@python.org [mailto:distutils-sig-admin@python.org]On Behalf Of Patrick K. O'Brien Sent: Wednesday, September 12, 2001 12:46 PM To: Distutils Subject: [Distutils] Help - Does wininst ignore MANIFEST? I just started using distutils, have run into a snag and could really use some help. I'm able to create source distributions with no problem. But when I try to create a windows installer version via: C:\Code\PyCrust>python setup.py bdist --formats=wininst I get a win32.exe file that does not contain my icon file or subdirectories, whereas the .zip and .tar.gz files come out fine. Is this a known problem? Or am I doing something wrong? Here are my manifest files: MANIFEST.in ----------- include PyCrust.ico recursive-include Data *.py *.txt recursive-include Demos *.py *.txt recursive-include Docs *.py *.txt Produces this MANIFEST file: ---------------------------- PyCrust.ico README.txt setup.py .\PyCrust.py .\PyFilling.py .\PyShell.py .\__init__.py .\crust.py .\filling.py .\interpreter.py .\introspect.py .\pseudo.py .\shell.py .\version.py Data\PyCrustTutorial.py Data\PythonTutorial.py Demos\PyCrustAlaCarte.py Demos\PyCrustMinimus.py Docs\CHANGES.txt Which is used by this setup.py: ------------------------------- #!/usr/bin/env python """Setup file for the distribution of PyCrust. PyCrust is a pure Python distribution. Thanks to Andy Todd, who created the original setup.py for PyCrust.""" __author__ = "Patrick K. O'Brien " __cvsid__ = "$Id: setup.py,v 1.1 2001/09/12 16:16:32 pobrien Exp $" __date__ = "September 11, 2001" __version__ = "$Revision: 1.1 $"[11:-2] from distutils.core import setup import version setup(name="PyCrust", version=str(version.VERSION), description="PyCrust - The Flakiest Python Shell", author="Patrick K. O'Brien", author_email="pobrien@orbtech.com", url="http://sourceforge.net/projects/pycrust/", packages=["PyCrust"], package_dir={"PyCrust": "."}, scripts=["PyCrust.py", "PyShell.py", "PyFilling.py"], licence="Python", long_description=""" PyCrust is an interactive Python environment written in Python. PyCrust components can run standalone or be integrated into other development environments and/or other Python applications. PyCrust comes with an interactive Python shell (PyShell), an interactive namespace/object tree control (PyFilling) and an integrated, split-window combination of the two (PyCrust). """, ) Any advice would be greatly appreciated. I'm on Win98se with Python 2.1.1 and Cygwin (though I am running distutils from a dosbox, not the Cygwin shell). Thanks. --- Patrick K. O'Brien Orbtech (http://www.orbtech.com) "I am, therefore I think." _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig From pobrien@orbtech.com Wed Sep 12 19:14:01 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Wed Sep 12 18:14:01 2001 Subject: [Distutils] Help - Does wininst ignore MANIFEST? In-Reply-To: <019901c13bba$80490730$0100a8c0@Rogue> Message-ID: I will give that a try, Robin. In the mean time, can someone please explain to me the precise purpose of the MANIFEST file? Why would I specify files to include in the distribution, that I didn't actually want installed? This makes no sense to me at all. All the files I want are in the .zip and .tar.gz, and are extracted properly, but only the root directory is actually getting installed by "python setup.py install". If I have to specify everything in the data_files parameter, what does the MANIFEST buy me? --- Patrick K. O'Brien Orbtech (http://www.orbtech.com) "I am, therefore I think." -----Original Message----- From: distutils-sig-admin@python.org [mailto:distutils-sig-admin@python.org]On Behalf Of Robin Dunn Sent: Wednesday, September 12, 2001 1:41 PM To: pobrien@orbtech.com; Distutils Subject: Re: [Distutils] Help - Does wininst ignore MANIFEST? > I just started using distutils, have run into a snag and could really use > some help. I'm able to create source distributions with no problem. But when > I try to create a windows installer version via: > > C:\Code\PyCrust>python setup.py bdist --formats=wininst > > I get a win32.exe file that does not contain my icon file or subdirectories, > whereas the .zip and .tar.gz files come out fine. Is this a known problem? > Or am I doing something wrong? IIUC, the bdist commands only bundle what would be installed with a "python setup.py install" command. I've been able to get other files installed by using the data_files parameter to the setup function. For example (edited from PyBSDDB): setup(name = 'bsddb3', # # ... all the other stuff clipped ... # data_files = [("bsddb3/utils", ["db/bin/db_archive.exe", "db/bin/db_checkpoint.exe", "db/bin/db_deadlock.exe", "db/bin/db_dump.exe", "db/bin/db_load.exe", "db/bin/db_printlog.exe", "db/bin/db_recover.exe", "db/bin/db_stat.exe", "db/bin/db_upgrade.exe", "db/bin/db_verify.exe", "db/bin/libdb%s.dll" % ver, ]), ("bsddb3/test", glob.glob("test/*.py")) ] ) -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig From andy47@crosswinds.net Wed Sep 12 19:52:01 2001 From: andy47@crosswinds.net (Andy Todd) Date: Wed Sep 12 18:52:01 2001 Subject: [Distutils] Having trouble with 'exclude' References: <3B9F46DC.9040200@crosswinds.net> <3B9F4ECA.BD37CA@gmx.de> Message-ID: <3B9FE745.9050600@crosswinds.net> Rene, Rene Liebscher wrote: > Andy Todd wrote: > >>I am having a few problems with creating a source distribution and would >>appreciate any help or pointers. >> >>The situation, I have the world's simplest package, in the directory are >>five files; >> >>""" >>MANIFEST.in >>setup.py >>wibble.py >>wibble.user.py >>""" >> >>The only line in MANIFEST.in is; >>"exclude wibble.user.py" >> >>because for my own reasons I do not want that file even in my source >>distribution. >> >>When I run "python setup.py sdist" I get the following output; >>""" >>running sdist >>reading manifest template 'MANIFEST.in' >>warning: no previously-included files found matching 'wibble.user.py' >>writing manifest file 'MANIFEST' >>creating Wibble-1.0 >>making hard links in Wibble-1.0... >>hard linking README.txt -> Wibble-1.0 >>hard linking setup.py -> Wibble-1.0 >>hard linking ./wibble.py -> Wibble-1.0/. >>hard linking ./wibble.user.py -> Wibble-1.0/. >>tar -cf dist/Wibble-1.0.tar Wibble-1.0 >>gzip -f9 dist/Wibble-1.0.tar >>removing 'Wibble-1.0' (and everything under it) >>""" >> >>Any suggestions? >> >>If it is any help my setup.py file is basically; >> >>""" >>#!/usr/bin/env python >>APPLICATION_NAME = "Wibble" >>from distutils.core import setup >>import glob, os, sys >> >>setup(name=APPLICATION_NAME, >> version=1.0, >> description="My application", >> author="me", >> author_email="my.email", >> url="http://my.url", >> packages=[APPLICATION_NAME], >> package_dir={APPLICATION_NAME: '.'}, >> scripts=[], >> licence="Python", >> data_files=[] >> ) >>""" >> >>Whilst I'm here, is there any definitive documentation on the arguments >>and their valid values that can be passed to 'setup'? The shipped >>documentation seems to be a bit all over the place. >> >>Thanks in advance, >>Andy >> > > You specify the package dir as '.'. Then the file wibble.user.py > is listed as './wibble.user.py' and is not matched as > '^wibble\.user\.py$' (regular expression.) > (You can see this by setting the environment variable > DISTUTILS_DEBUG=1 before you run your setup.py.) > > If you use > exclude ./wibble.user.py > it should work as you want. > > Thanks very much, problem solved. Now onto the next little 'opportunity'. BTW, I'd still appreciate it if anyone could enlighten me on all of the arguments to setup and their expected values ... Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Hit me with your fax machine, baby" - Francis Dunnery, "Because I Can" From pobrien@orbtech.com Wed Sep 12 20:20:00 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Wed Sep 12 19:20:00 2001 Subject: [Distutils] Help - Does wininst ignore MANIFEST? In-Reply-To: <3B9FE590.2080201@crosswinds.net> Message-ID: Here is the setup.py that is finally working for me, at least on Windows, including being able to create a windows installer version as well. Thanks Robin and Andy. #!/usr/bin/env python """Setup file for the distribution of PyCrust. PyCrust is a pure Python distribution. Thanks to Andy Todd, who created the original setup.py for PyCrust.""" __author__ = "Patrick K. O'Brien " __cvsid__ = "$Id: setup.py,v 1.1 2001/09/12 16:16:32 pobrien Exp $" __date__ = "September 11, 2001" __version__ = "$Revision: 1.1 $"[11:-2] from distutils.core import setup import version import glob setup(name="PyCrust", version=str(version.VERSION), description="PyCrust - The Flakiest Python Shell", author="Patrick K. O'Brien", author_email="pobrien@orbtech.com", url="http://sourceforge.net/projects/pycrust/", packages=["PyCrust"], package_dir={"PyCrust": "."}, long_description=""" PyCrust is an interactive Python environment written in Python. PyCrust components can run standalone or be integrated into other development environments and/or other Python applications. PyCrust comes with an interactive Python shell (PyShell), an interactive namespace/object tree control (PyFilling) and an integrated, split-window combination of the two (PyCrust). """, data_files=[("PyCrust", ["PyCrust.ico",]), ("PyCrust/Data", glob.glob("Data/*.py")), ("PyCrust/Demos", glob.glob("Demos/*.py")), ("PyCrust/Docs", glob.glob("Docs/*.txt")), ], ) --- Patrick K. O'Brien Orbtech (http://www.orbtech.com) "I am, therefore I think." -----Original Message----- From: Andy Todd [mailto:andy47@crosswinds.net] Sent: Wednesday, September 12, 2001 5:46 PM To: pobrien@orbtech.com Subject: Re: [Distutils] Help - Does wininst ignore MANIFEST? I've got to agree with you there Patrick. The distutils setup for PythonCard is driving me nuts at the moment. From pete@shinners.org Thu Sep 13 19:16:18 2001 From: pete@shinners.org (Pete Shinners) Date: Thu Sep 13 18:16:18 2001 Subject: [Distutils] mac osx support? Message-ID: <3BA1301E.3030208@shinners.org> i've been trying to walk one of my users through compiling on max osx. it seems many things are wrong (or at least unframiliar) on osx. our first problem was needing a bunch of customish compile flags like "-framework". but we've got that all worked out. we've realized that distutils is adding no linking flags for the python libraries. no -L for its location, and no -l to actually link it. well that is strange, so we thought we'd force some flags to the link command, but that brought us to our next problem.. where are the shared libraries? we found something at /usr/local/lib/python2.1/python.so, but that won't exactly work with the compile, since "-lpython" looks for "libpython.so" (or is that not the case?) the user also found some files in /usr/local/lib/config like another "python.so" and a " libpython2.1.a". somethings funny. this osx user has compiled and installed his own version of python. these were his configure options... "--with-dyld --with-suffix=.x" any sort of help on this would be much appreciated, we're both entirely stumped. we have seen some problems like this on some mailing lists, but the only solutions we've been able to find are to link the extensions statically into python. i don't think that's really an option for us. :[ From mal@lemburg.com Sun Sep 23 15:03:17 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Sun Sep 23 14:03:17 2001 Subject: [Distutils] Bug in build_ext Message-ID: <3BAE232C.4751E917@lemburg.com> The build_ext command (and probably others too) don't clean up the build_temp directory before invoking the compiler. This causes the compiler to use object files it finds in the temp location for subsequent builds of other subpackages which is most probably not intended. Should I fix this bug in CVS by having the build_ext command clean up the temporary tree before invoking the compiler ? -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From mal@lemburg.com Sun Sep 23 16:57:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Sun Sep 23 15:57:01 2001 Subject: [Distutils] Bug in build_ext References: <3BAE232C.4751E917@lemburg.com> Message-ID: <3BAE3A6B.F837767@lemburg.com> "M.-A. Lemburg" wrote: > > The build_ext command (and probably others too) don't clean up > the build_temp directory before invoking the compiler. This causes > the compiler to use object files it finds in the temp location > for subsequent builds of other subpackages which is most probably > not intended. > > Should I fix this bug in CVS by having the build_ext command > clean up the temporary tree before invoking the compiler ? Checking this "fix" showed that distutils seems to use the build_temp area to communicate C libs and other files between commands. Using a separate subdir in the build_temp area for each extension and C lib avoids the problem and still allows distutils to pass libs etc between commands. Would this approach break anything ? Another quirk I found was that build_clib does not separate building of libs into different method calls; the build_libraries method does the complete job which makes it hard to subclass the command. I guess this should be changed to a .build_libraries() method which then calls .build_library() for each lib in the list. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From rdatta@crossaccess.com Thu Sep 27 11:03:00 2001 From: rdatta@crossaccess.com (R Datta) Date: Thu Sep 27 10:03:00 2001 Subject: [Distutils] Jython support? Message-ID: <5.1.0.14.0.20010927065950.00b16ff8@cxamail.crossaccess.com> Sorry if this has been covered in the past. I'm new to this sig. I DID search the archives, and didn't come up with anything of help. Is there distutil support for jython? i tried to install it, but of course setup.py wouldn't run because distutils module wasnt there :) Chicken n egg. If indeed there is no support for jython, how do jython developers install python modules? Thanks Raj Datta Professional Services Direct : 408-530-4932 CrossAccess Corp Cell : 408-316-5473 2900 Gordon Ave #100 Fax : 408-735-0328 Santa Clara CA 95051 Email : rdatta@crossaccess.com From Michel Sanner Thu Sep 27 16:13:00 2001 From: Michel Sanner (Michel Sanner) Date: Thu Sep 27 15:13:00 2001 Subject: [Distutils] RE: Function discussions... Message-ID: <200109271911.MAA1456472@goliath.scripps.edu> > Date: Thu, 27 Sep 2001 13:09:14 -0500 > From: Tarn Weisner Burton > Subject: RE: Function discussions... > To: Michel Sanner > Cc: "Mike C. Fletcher" > MIME-version: 1.0 > X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 > Content-transfer-encoding: 7BIT > Importance: Normal > X-Priority: 3 (Normal) > X-MSMail-priority: Normal > > | here is the end of the output: > | > | creating build/temp.irix64-6.5-2.1 > | cc -O -OPT:Olimit=0 -DGLX_PLATFORM -DNUMERIC > | -I/tsri/python/share/include/python2.1 -I/usr/include > | -I/usr/local/include > | -I/usr/X11/include -I/tsri/python/share/include/python2.1/Numeric > | -I/tsri/python/share/include/python2.1/Numeric_17 > | -I/tsri/python/share/include/python2.1/Numeric_18 -Isrc/gle/src > | -I/usr/include > | -I/usr/local/include -I/usr/X11/include > | -I/tsri/python/share/include/python2.1/Numeric > | -I/tsri/python/share/include/python2.1/Numeric_17 > | -I/tsri/python/share/include/python2.1/Numeric_18 -Isrc/gle/src -c > | src/interface_util/interface_util.c -o > | build/temp.irix64-6.5-2.1/interface_util.o > | > | cc-1005 cc: ERROR File = > | /tsri/python/share/include/python2.1/Python.h, Line = > | 24 > | The source file "config.h" is unavailable. > | > | #include "config.h" > | ^ > | > | 1 catastrophic error detected in the compilation of > | "src/interface_util/interface_util.c". > | Compilation terminated. > | error: command 'cc' failed with exit status 2 > > I'm not sure if there is anything I can do to fix this. You might try > making sure that you have the most recent version of distutils. Aside from > that it should work since others have installed on Irix 6.5 successfully. > Maybe something in the python installation is munged up. The include > directories selected for the python system are done by distutils and not by > the PyOpenGL setup directly.... > I updated our Distutils from 1.0.2.pre to 1.0.2 and still get the same error. This sounds like a bug in Distutils to me. It seems that it automatically adds sys.prefix+'/include/python'+sys.version[:3] to the include directories, which works fine as long as your Python interpreter is installed under sys.prefix in which case config.h is really in sys.prefix+'/include/python'+sys.version[:3]. But I believe that it still is legal to install Python specifying sys.exec_prefix, in which case config.h is found in sys.exec_prefix+'/include/python'+sys.version[:3] I checked with Sophie Coon (who has used Disutils previousely to build extensions here) and she confirmed that she had to add this directory explicitly using the setup.py file. For PyOpenGL, we tried to add: depInclude = sys.exec_prefix + '/include/python' + sys.version[:3] and: libraries = [('interface_util', {'sources':['src/interface_util/interface_util.c','src/interface_util/platform.c '], 'include_dirs' : [depInclude]}), but the directory still does not show up on the compilation line :( -Michel From akuchlin@mems-exchange.org Fri Sep 28 16:48:10 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Fri Sep 28 15:48:10 2001 Subject: [Distutils] Jython support? In-Reply-To: <5.1.0.14.0.20010927065950.00b16ff8@cxamail.crossaccess.com>; from rdatta@crossaccess.com on Thu, Sep 27, 2001 at 07:02:24AM -0700 References: <5.1.0.14.0.20010927065950.00b16ff8@cxamail.crossaccess.com> Message-ID: <20010928154557.C24257@ute.mems-exchange.org> On Thu, Sep 27, 2001 at 07:02:24AM -0700, R Datta wrote: >Is there distutil support for jython? i tried to install it, but of course >setup.py wouldn't run because distutils module wasnt there :) Chicken n egg. It may not run, but it shouldn't be because the distutils code is inaccessible. When you download the Distutils standalone distribution and run the setup.py, it should be importing the distutils package from the current directory. When I try running the setup.py with jython it fails, but with an exception: AttributeError: class 'org.python.modules.os' has no attribute 'utime' Presumably Java's lowest-common-denominator portability doesn't support os.utime(). Patches to make the code work with Jython would be welcome. --amk