[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] c++ og java eller python på mange platforme med autoconf og automake???



On Sun, 23 Feb 2003 15:35:02 +0100, Erwin S. Andreasen wrote:

> Python's distributionsmekanisme er "distutils". Med disse kan man
> skrive et Python script som kan kompilere/installere ens Python modul
> på en fremmed maskine med de rigtige flag/compiler etc. osv. 

Jo, men er jeg nød til at angive på forhånd hvilken kompiler/flags 
jeg har brug for, og om de rette libs er installeret, eller kan
scriptet selv finde ud af den slags irriterende detailer??

> Denne
> information gemmes i en "setup.py" fil og brugeren kører "python 
> setup.py install" for at compilere/installere pakken. Et trivielt
> eksempel:
> 
> from distutils.core import setup, Extension
> setup(name = "results", version = "1.0",
>     ext_modules = [Extension("results", ["results.c"])])
> 
> Denne kompilerer og installerer en resultsmodule.so med kode fra
> results.c. Dette kan naturligvis også bruges hvis dit Python modul er
> faktisk Python kode og ikke en udvidelse, eller en blanding.

Interessant - kan denne måde at kompilere pythom moduler skrevet i C/C++
erstatte autoconf/automake i flexibilitet  

> 
> boost::python er IMHO simplere end de andre systemet til embedding af
> C/C++ kode i Python. Fx ser min kode ud således:
> 

Tak for dette gode tip - jeg har kun rodet med SWIG, som jeg syntes
funkede OK. Jeg kigger ind i boost::python!!


mange hilsen, Marc Cromme


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *