On 17 Jan, 2007, at 0:21, Russell E Owen wrote:

At 3:01 PM -0800 1/16/07, Russell E Owen wrote:
The following recipe seems to work, but I don't know if it's really the right way to go. It is based on extrapolating from the current recipes. None of them seem to do the same job and I've not found any docs on writing recipes:

def check(cmd, mf):
        m = mf.findNode('email')
        if m is None or m.filename is None:
                return None
        oldNames = [
                'base64MIME',
                'Charset',
                'Encoders',
                'Errors',
                'Generator',
                'Header',
                'Iterators',
                'Message',
                'MIMEAudio',
                'MIMEBase',
                'MIMEImage',
                'MIMEMessage',
                'MIMEMultipart',
                'MIMENonMultipart',
                'MIMEText',
                'Parser',
                'quopriMIME',
                'Utils',
                'message_from_string',
                'message_from_file',
        ]
        oldModules = ["email." + name for name in oldNames]

        return dict(
                modules = oldModules,
        )

I spoke too soon. I had my patched urllib in place, masking the effect of the recipe. This simple recipe does work and does emulate other recipes:

def check(cmd, mf):
    m = mf.findNode('email')
    if m is None or m.filename is None:
        return None
    return dict(
        packages = ['email'],
    )

I've added a recipe that's close to this one. The only difference is that I've added an if statement that makes sure the recipe isn't used for version of python before 2.5. I haven't tested the recipe yet, I didn't have setuptools installed in my 2.5 tree and the cheeseshop seems to be down at the moment.

Ronald

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to