[Python.NET] questions from a new PythonNet user

Hamilton Link helink at sandia.gov
Sat Nov 15 02:38:55 CET 2008


Hi there, I've just started working with PythonNet and I have a few 
questions about getting it built and running.  Any help would be 
appreciated, here is my current situation and questions.  Sorry for the 
long email but I figured details can only help you help me.

I would like to be able to download and build PythonNet from scratch on 
Windows XP (32-bit) and on Ubuntu.  If I have to build the .net 
assemblies on XP for use in Ubuntu that's fine.  On Ubuntu I have python 
2.5.2, gcc 4.3.2, and mono 1.9.1.  I have the python dev and mono dev 
things installed as well, and my /etc/mono/config file is populated with 
the extra bits from the pythonnet distribution.  On Windows I have 
Visual Studio Pro 2008 and python 2.5.2.  On both platforms I have the 
latest (r100) from svn, and on Ubuntu I also have the 
pythonnet-2.0-alpha2 distribution.

On Ubuntu once I put the svn-retrieved setup.py I was able to rebuild 
the pythonnet-2.0-alpha2 version of clr.so to be a 64-bit library; once 
I had done this and set my GAC I was able to use "mono python.exe" (or 
simply python.exe) and make a .net System.Drawing.Point object and get 
its field values.  Yay... except that starting python and doing "import 
clr" made a heroic effort and then died.  I'm using python2.5-UCS4 
because in python, "len(u'\U00010800')" returns 1, is that correct?  
Anyway, the error text is attached.  I can't get very far building the 
.net components checked out from svn because from what I can tell ilasm2 
doesn't like some of the #define and #include and etc. in the code.  Is 
it possible to build everything with Mono or no?

On Windows I can build everything with no errors or warnings under VS 
Pro.  Pity mostly I want to use it under unix.  I believe the assemblies 
should work but there's this nasty little bit of .il that ends up 32- or 
64-bit specific.  So I need to know how to target 64-bit from a 32-bit 
host and I'm not entirely sure what to configure in this case.  I can 
see how to configure for different python versions and UCS2/4, so that's 
not a problem.  If I can get guidance on targeting 32- or 64- by 
inclusion of the proper .il file, I think I can build all the different 
versions I need of the .net stuff and then I just need to be able to 
build (or possibly just invoke) a working built version of clr.so over 
on the unix side.

I suppose the first question is,
Why are there no apparent build instructions in the distribution?

It seems that there are more than half a dozen build configurations 
(python 2.3, 4, 5, and 6, plus UCS2/4 distinctions for 5 and 6, plus 
clr.so/.dll being built for a 32- or 64-bit system) and a couple of 
possible build environments (VS or Mono+make), so breaking this all down 
for first timers would really, really be appreciated.  If I've just 
missed them, I apologize, but the only thing I've been able to find so 
far is
http://feihonghsu.blogspot.com/2008/02/installing-pythonnet-20-alpha-2-on.html
and
http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html
which are _great_ but they are at an unaffiliated web site, are only 
Visual Studio instructions, and don't cover targeting 32/64 bit.  I 
should also mention that if there really aren't official build 
instructions I will happily write some up (cribbing somewhat from Mr. 
Feihong Hsu if he agrees) as soon as I have a clear understanding of the 
process and can do it successfully, and I'll stick that into svn if I 
can or post it to the mailing list for a dev to add if I can't.

How actively maintained is PythonNet at the moment?

It looks like since the project was made to work patches have become 
infrequent, which I will take to mean that things work reasonably well.  
But this putative .net SP1 patch ( 
http://mail.python.org/pipermail/pythondotnet/2008-January/000771.html ) 
was not apparently folded into SVN, was there a reason for this?

The distribution at 
http://sourceforge.net/project/showfiles.php?group_id=162464 is missing 
setup.py, is this an oversight (I notice it is in the svn distribution)?

Finally, is there active development towards a 2.0 final, or has the 
project hit a bit of a plateau with 2.0 alpha2?

Thank you very much for your time,
hamilton


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pythonnetError.txt
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20081114/1b1e699e/attachment.txt>


More information about the PythonDotNet mailing list