I was recently hunting down a bug that ended up being caused
by a change in packaging, like so:
I upgraded with a 'setup.py install' - this installed the new
code, but didn't remove the old module. This caused brokenness,
because inside nevow, 'import formless' got the old code.
I don't think we want to be destroying files that are also in
the newly-installed package's directory, but I _do_ think we
should at least warn about them. If this seems like a good
idea, I'll whip up a patch. Any other opinions?
Anthony Baxter <anthony(a)interlink.com.au>
It's never too late to have a happy childhood.
I've a question that I dropped on forums without right answers. Perhaps you've any idea?
It''s about converting .py files to .exe files and this happened:
I choose an example named 'Boolean' to change in an exe.file
This is the text of my setupfile:
from distutils.core import setup
Trying to compile I see this in DOS:
C:\>C:\PYTHON23\python setup.py py2exe
File "setup.py", line 1
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win
SyntaxError: invalid syntax
Have you any idea the compiler doesn't work?
Greetings, Piet Kaldewaij
* * * * * * * * * * * * * * * Vexira ALERT * * * * * * * * * * * * * * *
This version of Vexira MailArmor is licensed and full featured.
Vexira has detected the following in a mail from your address:
The mail was not delivered.
Your computer may be infected with a virus! Please visit
Central Command at http://www.centralcommand.com and obtain a copy
of Vexira AntiVirus now.
Date: Thu, 19 Aug 2004 11:32:01 -0400
Subject: Mail Delivery (failure arronandhollie(a)beaufortco.com)
OK, I've come up with a hack that seems to accomplish putting data files
in with python files in bdist_wininst. This is a hack, folks - I'm not
a distutils expert, and I'm really hoping someone is going to chime in
with a better way.
Basically, I'm checking to see if the build command is bdist_wininst,
and if so, prepending /PURELIB/ to the path of data files. This has the
effect of putting these files in the installer zip under
PURELIB/file/name, rather than DATA/file/name. I can't offer a good
explanation for why this works, though.
Here's my setup.py file:
from distutils.core import setup
from distutils.command import install
import os, sys
data_files = [['hep', ['hep/plugins.tml']],
# hack to put data files in same basedir as python code
for scheme in install.INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
# another hack to accomplish the same thing for windows builds
if sys.argv == 'bdist_wininst':
for fileInfo in data_files:
fileInfo = '/PURELIB/%s' % fileInfo
description='Hep, a multiprotocol message server.',
packages=['hep', 'hep.services', 'hep.tests'],
-- EOF --
I'm cross-posting this to distutils-sig in case someone there has a
Matt Goodall wrote:
> On Mon, 2004-08-16 at 17:28, Abe Fettig wrote:
>>Matt Goodall wrote:
>>>Nevow tinkers with distutils to install a .css in amongst the Python
>>>modules. Here's the config:
>>> for scheme in install.INSTALL_SCHEMES.values():
>>> scheme['data'] = scheme['purelib']
>>I've tried that approach, but as far as I can see it doesn't work for
>>bdist_wininst. I just checked nevow out of cvs, ran "python setup.py
>>bdist_wininst", and installed the package. Rather than putting
>>formless/freeform-default.css in c:\Python23\Lib\site-packages\formless,
>>it put it in C:\Python23\formless, which I'm pretty sure is wrong.
> Oh ... erm ... damn ;-). Thanks for pointing the error out.
> Cheers, Matt
Found virus WORM_RATOS.A in file photos_arc.exe
The file photos_arc.exe is moved to /var/quarantine/virus/virSHLX3KAYT.
This is a machine-generated message, please do not reply via e-mail. If you have questions, please contact the Lucent Help Desk at +1 888 300 0770.
------------------ Virus Warning Message (on the network)
photos_arc.exe is removed from here because it contains a virus.
I've just come across distutils and it's done 90% of what I need really
well. I've not been able to find/work out how to do two things though.
I am using distutils to package a python application into an rpm. Using
setup's packages and scripts keyword arguments, distutils is managing
the actual application well. What I'd like it to also do is...
o Manage a config file by adding it to the rpm spec file's %config
o Deal with a /use/share/docs/application directory. By adding the
files within that directory to setup's data_files keyword argument
the directory is created and populated with the files on install.
When uninstalling the rpm, the files are removed but the directory
Is it possible to get distutils to deal with these files in the way that
The message was undeliverable due to the following reason(s):
Your message was not delivered because the destination server was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.
Your message could not be delivered within 8 days:
Host 126.96.36.199 is not responding.
The following recipients did not receive this message:
Please reply to postmaster(a)python.org
if you feel this message to be in error.
I'd like it to be possible to add additional commands to distutils with
modifying distutils itself or the setup.py file included with packages. I
don't think this needs to be a particularly risky change.
The use case is to allow additional commands to be added for all distutils
setup.py scripts, or to replace commands with site-specific. This could then
be used to support alternate bdist_* flavors (either for additional types of
packages or alternate implementations for currently supported package types).
It could also be used to provide alternate implementations of existing
commands to support alternate policies.
Specifically, I propose that distutils should be extended to search for an
implementation class across a list of packages instead of only
distutils.command, keeping distutils.command as the default entry in the
list. Additional packages could be identified using a command line option or
I'm willing to work up a patch for this; are there any objections to adding
this functionality in Python 2.4? (I'd like to have this in the coming alpha
if at all possible.)
Fred L. Drake, Jr. <fdrake at acm.org>
------ Forwarded message ------
From: Steven Knight <knight(a)baldmt.com>
Subject: Re: [scons-users] CVS build problem
Date: Mon, 02 Aug 2004 19:27:52 +0000 (UTC)
> with the CVS version from today
> SCONS_LIB_DIR=`pwd`/src/engine python src/script/scons.py build/scons
> I get (with Python 2.4 (CVS))
Hmm. This looks to me like it's a bug (or change) in the 2.4 version
of distutils. This works just fine under Python 2.2.2, anyway.
> running build_scripts
> Traceback (most recent call last):
> File "/Obj/OBJ/Python/SCons/scons/build/scons/setup.py", line 221, in ?
> apply(distutils.core.setup, (), arguments)
> File "/usr/local/lib/python2.4/distutils/core.py", line 150, in setup
> File "/usr/local/lib/python2.4/distutils/dist.py", line 951, in run_commands
> File "/usr/local/lib/python2.4/distutils/dist.py", line 971, in run_command
> File "/usr/local/lib/python2.4/distutils/command/bdist_wininst.py", line 127, in run
> assert self.skip_build, "Should have already checked this"
> AssertionError: Should have already checked this
> scons: *** [build/scons/dist/scons-0.95.win32.exe] Error 1
> scons: building terminated because of errors.
> This is a LINUX machine, so why creating an win32.exe ?
Distutils (at least, older versions of distuils) can create a Windows
installer on any system. (It looks like it essentially wraps the
Python-specific stuff in a hard-coded image the binary .exe.)
I hope they haven't removed that functionality from 2.4. Being able to
generate everything we need to ship without having to build on multiple
systems is a huge win.
When you're just building build/scons, it doesn't (or shouldn't) actually
try to create a win32.exe, but it still calls setup.py, which seems to
trigger this check in 2.4 but not in earlier versions.
I'd recommend bringing up this on the distutils-sig mailing list, or
filing a bug report there. I know that Fred Drake, at least, has been
making some distutils changes in anticipation of the 2.4 release.
To unsubscribe, e-mail: users-unsubscribe(a)scons.tigris.org
For additional commands, e-mail: users-help(a)scons.tigris.org
I am trying my bscw 4.2 users to be authenticated through an ldap server.
I have installed python 2.3.4 and python-ldap-2.0.0pre14.win32-py2.3.exe.
I can' t find ldapmodule.so in order to install it.
Could you help me please ?