[IronPython] Compiling Packages with clr.BuildModules and build

Dino Viehland dinov at microsoft.com
Mon Oct 20 20:38:46 CEST 2008


I believe the fix for this is simple if you want to give it a shot.  In ClrModule.cs in BuildPackageMap there is a loop that looks like:

                do {
                    if (pkgName != string.Empty) {
                        fullName = pkgName + "." + fullName;
                    }

                    dirName = Path.GetDirectoryName(dirName);
                } while (packageMap.TryGetValue(dirName, out pkgName));

It shouldn't actually be a loop, it should just be:

                if (packageMap.TryGetValue(Path.GetDirectoryName(dirName), out pkgName)) {
                    fullName = pkgName + "." + fullName;
                }



-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Monday, October 20, 2008 7:48 AM
To: Discussion of IronPython
Subject: [IronPython] Compiling Packages with clr.BuildModules and build

Hello guys,

I've been trying to compile Python packages Pyc and the latest
sourcecode drop - change set 41685.

The good news is that compiling packages works. Even better, compiling
packages with sub-packages works. Unfortunately, compiling packages with
sub-packages with sub-sub-packages is broken. The generated assemblies
have the bottom level paths screwed and so imports from them fail.

I can provide a test case if you need it, but it should be
straightforward to reproduce. :-)

Needless to say this means that we still can't run a binary Resolver on
IronPython 2.

All the best,

Michael Foord

--
http://www.ironpythoninaction.com/

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list