Hi, I've updated the Python LLVM bindings for LLVM 1.5 (attached). I also thought of setting up a CVS repository for this, but before I do that I thought I'd ask if you want to take the Python bindings to the main LLVM CVS? I noticed that the C language bindings would be maintained there. Changes in Python-LLVM: - Updated to match LLVM 1.5 API - Added Windows build support (created MSVC++ project file) - Added bindings for LLVM Transforms API Systems built on: - Linux 2.6.10 i686 (GCC 3.3.5) - Windows XP Home SP2 (MSVC++ 7.1) As before, you'll need Boost.Python and Python to build the bindings. If you're interested, a previous version of the Python bindings was also sent to llvm-dev: http://mail.cs.uiuc.edu/pipermail/llvmdev/2005-February/003463.html Cheers, Jarno -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse f�r Mail, Message, More +++ -------------- next part -------------- A non-text attachment was scrubbed... Name: Python-LLVM.tgz Type: application/x-compressed Size: 48513 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050522/5f7a7bda/attachment.bin>
Hi Jarno, This is great! We would absolutely love to have python bindings for LLVM. From the look of your patch, I think we want this to become an LLVM project since it has configuration and compiler support that is new to the main LLVM repository. We don't want the main LLVM libraries to be dependent on Boost or Python. So, there's a couple things we need to have you do before this patch is accepted. 1. Please place it in a directory named something like "llvm-py", not in "lib" 2. Make this "llvm-py" directory look like an llvm project. You can find a sample project at llvm/projects/sample and a more full blown example in llvm/projects/Stacker. Please also make sure you read http://llvm.cs.uiuc.edu/docs/Projects.html which will help you set up a project. You might also find the Projects section of http://llvm.cs.uiuc.edu/docs/MakefileGuide.html useful. 3. Fix your Makefile to build a shared library properly. You have set TOOLNAME which is for building an executable tool not a shared library. You need to set LIBRARYNAME=..., not TOOLNAME=... 4. Fix the name of your project. It currently builds "llvm.so" which is not correct by our naming standards. It should result to something like "libLLVMpy.so" which will be obtained if you set LIBRARYNAME to "LLVMpy" 5. Consider waiting for or modifying this python interface latter to either directly use the (forthcoming) C interface or design the interface to have a similar structure and naming convention. 6. I looked (briefly) for a test suite but didn't find much. Could you please create a "test" directory that mimics the LLVM test directory so that "make check" will test out a few python programs that use the python interface to build working LLVM code. 7. Please submit gzipped, tar'd files with a ".tgz" suffix so that tar and gunzip can work on them without having to modify the file name (yes, this is a nit!) Once you've got the above accomplished, we can create a repository for the python interface and (with Oversight Group approval) give you cvs write access to it. That will allow you to make changes and maintain the python interface as LLVM grows without significant difficulty or burden. We look forward to adding Python to LLVM! Rei On Sun, 2005-05-22 at 11:45 +0200, js.nospam at wolke7.net wrote:> Hi, > > I've updated the Python LLVM bindings for LLVM 1.5 (attached). I also > thought of setting up a CVS repository for this, but before I do that > I thought I'd ask if you want to take the Python bindings to the main > LLVM CVS? I noticed that the C language bindings would be maintained > there. > > Changes in Python-LLVM: > - Updated to match LLVM 1.5 API > - Added Windows build support (created MSVC++ project file) > - Added bindings for LLVM Transforms API > > Systems built on: > - Linux 2.6.10 i686 (GCC 3.3.5) > - Windows XP Home SP2 (MSVC++ 7.1) > > As before, you'll need Boost.Python and Python to build the bindings. > If you're interested, a previous version of the Python bindings was > also sent to llvm-dev: > http://mail.cs.uiuc.edu/pipermail/llvmdev/2005-February/003463.html > > Cheers, Jarno > > -- > 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail > +++ GMX - die erste Adresse fr Mail, Message, More +++ > _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050522/8adbe1d2/attachment.sig>
Hi, some discussion below. Reid wrote:> 3. Fix your Makefile to build a shared library properly. You have set > TOOLNAME which is for building an executable tool not a shared > library. You need to set LIBRARYNAME=..., not TOOLNAME=...I remember having failed to build a functioning Python extension module with LIBRARYNAME and SHARED_LIBRARY flags. Anyway, I cannot remember the details now so will try again.> 4. Fix the name of your project. It currently builds "llvm.so" which > is not correct by our naming standards. It should result to something > like "libLLVMpy.so" which will be obtained if you set LIBRARYNAME > to "LLVMpy"I'd like to challenge the usefulness of the naming standard here. I see its value in case of system-wide C/C++ libraries (going to /usr/lib/*), but the Python modules go into a Python-specific directory (/usr/lib/python2.4/site-packages/*), so the name must be unique within Python extensions only.> 5. Consider waiting for or modifying this python interface latter to > either directly use the (forthcoming) C interface or design the > interface to have a similar structure and naming convention.The Python interface represents the C++ interface, so I don't understand the motivation to use C in the middle? In my view the Python and C bindings are independent of each other.> Once you've got the above accomplished, we can create a repository for > the python interface and (with Oversight Group approval) give you cvs > write access to it. That will allow you to make changes and maintain the > python interface as LLVM grows without significant difficulty or burden.OK, so I'll get back when I have news about the directory and Makefile restructuring. Regards, Jarno
Hi all, There's a place where I can find an updated version of the bindings versus the actual CVS? There's a CVS store for them? I cannot contact Jarno (wrong mail address...) Thanks in advance! --- Paolo On May 22, 2005, at 11:45 AM, js.nospam at wolke7.net wrote:> Hi, > > I've updated the Python LLVM bindings for LLVM 1.5 (attached).
On Thu, 4 Aug 2005, Paolo Invernizzi wrote:> There's a place where I can find an updated version of the bindings versus > the actual CVS? > There's a CVS store for them? > I cannot contact Jarno (wrong mail address...)I don't know what the status of the bindings are. Unfortunately, I never got a chance to play with them. :( -Chris> On May 22, 2005, at 11:45 AM, js.nospam at wolke7.net wrote: > >> Hi, >> >> I've updated the Python LLVM bindings for LLVM 1.5 (attached). > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.org/