From rdatta@crossaccess.com Mon Oct 1 00:30:00 2001 From: rdatta@crossaccess.com (R Datta) Date: Sun Sep 30 23:30:00 2001 Subject: [Distutils] Jython support? In-Reply-To: <20010928154557.C24257@ute.mems-exchange.org> References: <5.1.0.14.0.20010927065950.00b16ff8@cxamail.crossaccess.com> <5.1.0.14.0.20010927065950.00b16ff8@cxamail.crossaccess.com> Message-ID: <5.1.0.14.0.20010930201956.00af21c8@cxamail.crossaccess.com> I had to modify the install.py file to add the following term to the dictionary INSTALL_SCHEMES 'java': { 'purelib': '$base', 'platlib': '$base', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data' : '$base', }, This is because os.name returns java After making the change, i "graduated" to the error you mentioned. I will try and fix this in the os module. Raj At 12:45 PM 9/28/2001, distutils-sig-admin@python.org wrote: >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 > >_______________________________________________ >Distutils-SIG maillist - Distutils-SIG@python.org >http://mail.python.org/mailman/listinfo/distutils-sig 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 jack@oratrix.nl Thu Oct 4 12:32:00 2001 From: jack@oratrix.nl (Jack Jansen) Date: Thu Oct 4 11:32:00 2001 Subject: [Distutils] mac osx support? In-Reply-To: Message by Pete Shinners , Thu, 13 Sep 2001 15:15:58 -0700 , <3BA1301E.3030208@shinners.org> Message-ID: <20011004153110.A640F303181@snelboot.oratrix.nl> > 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. Switching to Python 2.2a4 should make a lot of difference. Many of the ideosyncracies with the MacOSX build process for Python have been ironed out in that release. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From andy47@halfcooked.com Wed Oct 10 22:58:00 2001 From: andy47@halfcooked.com (Andy Todd) Date: Wed Oct 10 21:58:00 2001 Subject: [Distutils] Automatic creation of .pyc files Message-ID: <3BC4FD21.60102@halfcooked.com> All, When packaging a Python module is it possible to stop the automatic creation of .pyc on installation? I ask because in PythonCard we currently store our configuration data in files that are imported but never executed (i.e. they just contain a list). When I package up the prototype and make it available I would like to be able to stop .pyc versions of these files being created. In the future we will probably change the way this data is stored to avoid this, but in the mean time I was wondering what I can do. Any and all suggestions are welcome. Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Hit me with your fax machine, baby" - Francis Dunnery, "Because I Can" From Alexandre.Fayolle@logilab.fr Thu Oct 11 11:54:01 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu Oct 11 10:54:01 2001 Subject: [Distutils] C extensions, Windows, and Fatal Python error Message-ID: Hello, I'm running python 2.1 on win2k, and I've built an extension module using mingw32, following the instruction in the Manual to build python21.a. Everything worked fine, I got my windows installer, ran it, but when I try to import the C extension, Python crashes: Type "copyright", "credits" or "license" for more information. >>> from logilab.xmldiff import maplookup Fatal Python error: Interpreter not initialized (version mismatch?) >From a quick search on the net, I gather that this is caused by a wrong python dll being loaded by the extension module, but the only python DLL I have is python21.dll. Anyone got a hint ? 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 Keila - Curitiba - Pr" Olá! Veja meu site pessoal no "Tripod.com.br". Basta clicar no endereço abaixo. GARANTO SER SUI-GENERIS - CLIQUE ABAIXO: http://pastorinha.tripod.com.br/seminarista Mais de 61.000 internautas visitaram a PG., existe 7 Álbuns: Se você quiser, por favor, indique minha Home Page, a outros Internautas. Mais detalhes, se comunique, passe um e-mail, que responderei brevemente. Dentro da Home Page, ao lado das fotos, você poderá saber muito mais sobre mim! Obrigada. e-mail: pastorinha@ieg.com.br Beijos:- Keila - Curitiba - Pr - Podes falar comigo, direto dela. Brevemente uma Carta Aberta. http://pastorinha.tripod.com.br/seminarista "Esta mensagem é enviada com a complacência da nova legislação sobre correio eletrônico, Seção 301, Parágrafo (a) (2) (c) Decreto S. 1618, Título Terceiro aprovado pelo "105º Congresso Base das Normativas Internacionais sobre o SPAM". Este E-mail não poderá ser considerado SPAM quando incluir uma forma de ser removido. Para ser removido de futuros correios, simplesmente responda indicando no Assunto: REMOVER" From mal@lemburg.com Mon Oct 22 16:54:10 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Oct 22 15:54:10 2001 Subject: [Distutils] C extensions, Windows, and Fatal Python error References: Message-ID: <3BD47695.6B16F627@lemburg.com> Alexandre Fayolle wrote: > > Hello, > > I'm running python 2.1 on win2k, and I've built an extension module using > mingw32, following the instruction in the Manual to build python21.a. > > Everything worked fine, I got my windows installer, ran it, but when I try > to import the C extension, Python crashes: > > Type "copyright", "credits" or "license" for more information. > >>> from logilab.xmldiff import maplookup > Fatal Python error: Interpreter not initialized (version mismatch?) > > >From a quick search on the net, I gather that this is caused by a wrong > python dll being loaded by the extension module, but the only python DLL I > have is python21.dll. > > Anyone got a hint ? Could be caused by a linker problem between the mingw32 compiled extension and the MS VC compiled Python DLL -- they don't seem to share the same data segments. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From edloper@gradient.cis.upenn.edu Fri Oct 26 03:13:00 2001 From: edloper@gradient.cis.upenn.edu (Edward D. Loper) Date: Fri Oct 26 02:13:00 2001 Subject: [Distutils] minimum Python version Message-ID: <200110260612.f9Q6Cci28796@gradient.cis.upenn.edu> Is there a way to specify a minimum Python version that's required by a distutils package? E.g., if I make a package, and I know it requires Python 2.1, I'd like it to check the version of Python on the system where it's being installed, to make sure that it's at least 2.1. -Edward From thomas.heller@ion-tof.com Fri Oct 26 05:51:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Fri Oct 26 04:51:01 2001 Subject: [Distutils] minimum Python version References: <200110260612.f9Q6Cci28796@gradient.cis.upenn.edu> Message-ID: <050301c15dfb$390c0cb0$e000a8c0@thomasnotebook> From: "Edward D. Loper" > > Is there a way to specify a minimum Python version that's required > by a distutils package? E.g., if I make a package, and I know > it requires Python 2.1, I'd like it to check the version of Python > on the system where it's being installed, to make sure that it's > at least 2.1. > Only in the setup script: import sys if sys.hexversion < 0x02010100: raise RuntimeError, "Python 2.1.1 or higher required" setup(...) but not in the bdist packages. Thomas From mal@lemburg.com Fri Oct 26 09:07:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Fri Oct 26 08:07:01 2001 Subject: [Distutils] minimum Python version References: <200110260612.f9Q6Cci28796@gradient.cis.upenn.edu> <050301c15dfb$390c0cb0$e000a8c0@thomasnotebook> Message-ID: <3BD92AD1.7E71D744@lemburg.com> Thomas Heller wrote: > > From: "Edward D. Loper" > > > > Is there a way to specify a minimum Python version that's required > > by a distutils package? E.g., if I make a package, and I know > > it requires Python 2.1, I'd like it to check the version of Python > > on the system where it's being installed, to make sure that it's > > at least 2.1. > > > Only in the setup script: > > import sys > if sys.hexversion < 0x02010100: > raise RuntimeError, "Python 2.1.1 or higher required" > > setup(...) Right. > but not in the bdist packages. The Windows installer is bound to a specific Python version, so it won't even install to a different version. The rpms are different though: they don't check for the Python version and just unzip to the version directory which was specified at RPM contruction time. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From thomas.heller@ion-tof.com Fri Oct 26 09:55:01 2001 From: thomas.heller@ion-tof.com (Thomas Heller) Date: Fri Oct 26 08:55:01 2001 Subject: [Distutils] minimum Python version References: <200110260612.f9Q6Cci28796@gradient.cis.upenn.edu> <050301c15dfb$390c0cb0$e000a8c0@thomasnotebook> <3BD92AD1.7E71D744@lemburg.com> Message-ID: <015701c15e1d$66052400$e000a8c0@thomasnotebook> From: "M.-A. Lemburg" > Thomas Heller wrote: > > > > From: "Edward D. Loper" > > > > > > Is there a way to specify a minimum Python version that's required > > > by a distutils package? E.g., if I make a package, and I know > > > it requires Python 2.1, I'd like it to check the version of Python > > > on the system where it's being installed, to make sure that it's > > > at least 2.1. > > > > > Only in the setup script: > > > > import sys > > if sys.hexversion < 0x02010100: > > raise RuntimeError, "Python 2.1.1 or higher required" > > > > setup(...) > > Right. > > > but not in the bdist packages. > > The Windows installer is bound to a specific Python version, > so it won't even install to a different version. Only if it contains compiled extensions (impure distribution)! You can, however, specify a required Python version at build time with the --target-version command line flag, but there is _no_ --minimum-target-version flag. Thomas From ALEX.BELT@bcbssc.com Mon Oct 29 09:25:22 2001 From: ALEX.BELT@bcbssc.com (ALEX BELT) Date: Mon Oct 29 09:25:22 2001 Subject: [Distutils] Help with Compilation Message-ID: Good day everyone, I am writing a Python script for the web in a Windows environment, but I have a problem: the web page is generated inside another web environment, so I need to compile the Python script directly to a machine executable file, rather than bytecode. I cannot use Java as a solution, the language has inherent limitations that prevent it from doing what I need. I need to develop this quickly, which eliminates C or C++, and I have to keep in mind that not all users may have Windows in the future, so using a MS product is not a realistic solution. Is it possible to compile Python to machine code, or alternatively, find a way to use the Python script without having Python installed on the user's machine? Thanks! Alex Belt From mal@lemburg.com Mon Oct 29 13:33:01 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Mon Oct 29 13:33:01 2001 Subject: [Distutils] Help with Compilation References: Message-ID: <3BDDA07D.CA5D5F7F@lemburg.com> ALEX BELT wrote: > > Good day everyone, > > I am writing a Python script for the web in a Windows environment, but I have > a problem: the web page is generated inside another web environment, so I need > to compile the Python script directly to a machine executable file, rather > than bytecode. I cannot use Java as a solution, the language has inherent > limitations that prevent it from doing what I need. I need to develop this > quickly, which eliminates C or C++, and I have to keep in mind that not all > users may have Windows in the future, so using a MS product is not a realistic > solution. Is it possible to compile Python to machine code, or alternatively, > find a way to use the Python script without having Python installed on the > user's machine? Have a look at py2exe. It wraps up everythin you need in a single executable along with a few DLLs. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From ALEX.BELT@bcbssc.com Mon Oct 29 15:15:00 2001 From: ALEX.BELT@bcbssc.com (ALEX BELT) Date: Mon Oct 29 15:15:00 2001 Subject: [Distutils] Help with Compilation Message-ID: ALEX BELT wrote: > > Good day everyone, > > I am writing a Python script for the web in a Windows environment, but I have > a problem: the web page is generated inside another web environment, so I need > to compile the Python script directly to a machine executable file, rather > than bytecode. I cannot use Java as a solution, the language has inherent > limitations that prevent it from doing what I need. I need to develop this > quickly, which eliminates C or C++, and I have to keep in mind that not all > users may have Windows in the future, so using a MS product is not a realistic > solution. Is it possible to compile Python to machine code, or alternatively, > find a way to use the Python script without having Python installed on the > user's machine? Have a look at py2exe. It wraps up everythin you need in a single executable along with a few DLLs. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From Zooko Wed Oct 31 10:46:34 2001 From: Zooko (Zooko) Date: Wed Oct 31 10:46:34 2001 Subject: [Distutils] passing information in to setup.py Message-ID: [please Cc: zooko@zooko.com in any replies, thanks!] Hi folks! I wanted my makefile to pass configuration options into the invocation of setup.py and after reading the (very nice) distutils docs and not seeing how to do it, I went ahead and passed the information in as extra command line options and I edited the setup.py file to parse those options out and then to remove them from sys.argv so that the normal distutils option parser wouldn't choke on them. This is soooo ugly that it must not be the right way to do it, but it works for now. You can see the results here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mojonation/evil/common/crypto/Python/setup.py?rev=HEAD&content-type=text/vnd.viewcvs-markup If you know of a better way to do it, or if you think my way is better than none and you want to adopt it for standard distutils, then please let me know! Thanks a million for distutils! It is a wonderful tool. Regards, Zooko