[Relax-devel] Re: python to c++ (January 09, 2006 - 06:17)

Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Headers

 

You can change all the paths in the setup.py file, but to get
distutils to function so that you get a functional program rather than
a distributable module requires a large number of things to be
changed.  It's quite ugly, very long, destroys all the portability
advantages of distutils, and is very painful.

Would you know how to change the email address so that certain
messages appear to be sent from edward at nmr-relax.com rather than
edward.dauvergne at gmail.com?

Edward


On 09/01/06, Andrew Perry <andrewjamesperry@xxxxxxxxx> wrote:
> I'm not a big fan of Makefiles, but hey, if they work thats what counts.
>
> I think you can change the installation path with distutils in a
> similar way to GNU configure .. just do "python setup.py
> --prefix=/home/bla" . You could probably hardwire this in the setup.py
> script if you really wanted it to go somewhere into a home dir instead
> of /usr/lib/pythonX.X/site-packages.
>
> The LAPACK/BLAS stuff sounds promising.
>
> On 1/9/06, Edward d'Auvergne <edward.dauvergne@xxxxxxxxx> wrote:
> > I think I'm on the right track with the low level Python/C API.  I've
> > worked out how to build the shared objects and get them to import into
> > relax.  Now I need a bit more C knowledge to get the functions
> > functional.  This approach is probably the best as I now know how to
> > include Fortran code as well.  You use one of the C/Fortran APIs to
> > use the Fortran functions in the C code, the functions of which are
> > used by the Python code.  That way I can start using the fast linear
> > algebra functions of LAPACK or BLAS (maybe even ATLAS) to massively
> > speed up the number crunching in relax.
> >
> > Oh, the use of the distutils package for compiling the code and
> > installing relax did not work very well.  It seems to be designed for
> > site-packages, building the code creates a directory called 'build' in
> > the base directory, followed by a directory named after the build
> > architecture, then a few other directories, and finally the name of
> > the actual directory the module belongs to (eg 'maths_fns').  Running
> > 'python setup.py install' then copies the compiled *.so file into the
> > 'site-packages' directory of the global python install.  Modifying
> > distutils to be useful seems like too much of a pain.  It will be very
> > useful once I spin the minimisation code out into it's own project but
> > for relax, distulits is not the right approach.
> >
> > I've therefore decided to use Makefiles.  I've migrated my scripts for
> > cleaning up the byte compiled python files, the *.o and *.so files,
> > etc into the Makefile (without any modification of the rm command).
> > There is also the relax manual compilation script, HTML version of the
> > manual compilation script, the packaging script, etc which can be
> > migrated to make rules.  It's a lot simpler than the distutil package,
> > although much less portable.
> >
> > Edward
> >
> >
> > P.S.  I hope you don't mind me forwarding this to the relax-devel mailing list.
> >
> >
> > On 08/01/06, Andrew Perry <andrewjamesperry@xxxxxxxxx> wrote:
> > > I found yet another python to "something faster maybe" converter:
> > >
> > > http://shed-skin.blogspot.com/
> > >
> > > Probably won't be much use yet, but I've added it to my list :)
> > >
> >
>


Related Mails




Powered by MHonArc, Updated Tue Jan 10 18:00:22 2006