rc/sfepy — Issue #6: make sfepy installable
Author: rc
Created: 2012-01-24 15:58:29+00:00
State: open

There is no 'make install'. This is required for various package management
systems, notably the SAGE one, see [1].

[1] http://www.sagemath.org/doc/developer/producing_spkgs.html

Migrated from http://code.google.com/p/sfepy/issues/detail?id=84

earlier comments

robert.cimrman said, at 2009-05-12T14:46:04.000Z:

What build/install system shall we use? There are many options, namely
- regular 'make install'
- cmake
- python distutils (-1)
- scons
- numpy distutils

I have started with numpy distutils, and already have some design issues:

SfePy has two kinds of scripts - the top level ones (like simple.py, runTests.py and
isfepy) that can go to PREFIX/bin, and auxiliary ones in the script/ directory. What
to do with the latter?

ondrej.certik said, at 2009-05-12T17:18:57.000Z:

I would suggest cmake, that way you can compile sfepy in parallel easily, and
discovery works nice too (e.g. picking up all the libraries).

As to scripts, the auxiliary ones should I think go to /usr/share/sfepy/scripts/,
e.g. PREFIX/share/sfepy/scripts.

robert.cimrman said, at 2009-05-13T06:40:59.000Z:

Can cmake install to the usual Python directory, i.e. site-packages, or does it know
how to install Python packages?

Maybe we can combine things: use cmake to build the extension modules, and then use
e.g. the numpy distutils.

Actually I find the numpy.distutils pretty good (especially compared to the plain
distutils), I will give it a shot first, as cmake is completely unknown territory for me.

ondrej.certik said, at 2009-05-13T08:01:58.000Z:

Ok, what you think is the best.

cmake can install anywhere you teach it. I use it for hermes and it seems to work
fine for me. But numpy distutils should work too, but it will not be possible to
compile in parallel I think.

robert.cimrman said, at 2009-05-13T08:14:53.000Z:

Could you go through the Makefile of sfepy, and look at the targets, namely
$(VERSIONH), version, reldist (this is used to make a release tarball) and htmldocs?

If you think that it will be easy to implement with cmake, then +1, but you will have
to help me :)

How does cmake handle subdirectories? Currently I just include all the Makefile.inc
files into the main Makefile.

I can already install scripts where I need them with numpy.distutils, but the above
targets wait for resolving anyway...

robert.cimrman said, at 2009-05-13T08:23:26.000Z:

You can try the numpy.distutils based development version - it install the python
files, no extension modules yet.

$ git clone git://github.com/rc/sfepy.git
$ cd sfepy
$ git checkout -b install origin/install
$ python setup.py install --root=/tmp

robert.cimrman said, at 2009-05-14T06:43:51.000Z:

Extension modules work - see 'extmods' branch on github.

$ make clean
$ python setup.py build_ext --inplace # (*)
$ $ ./runTests.py

So (*) can be used instead of the 'make' command!

robert.cimrman said, at 2009-05-15T14:01:31.000Z:

All test tasks listed in INSTALL work now [1] (tag basic_install_done), so let us
close this general issue. For specific installation tasks new issues should be created.

[1]
http://git.sympy.org/?p=sfepy.git;a=commit;h=1f80c411770ccec6d54e187aab2cbe9ecd684a67