← Back to team overview

ffc team mailing list archive

Re: [UFC-dev] FFC + Cygwin

 



Anders Logg wrote:
On Thu, Feb 01, 2007 at 10:59:05AM +0100, Garth N. Wells wrote:

Åsmund Ødegård wrote:
Wed, 31 Jan skrev Anders Logg:
On Wed, Jan 31, 2007 at 11:11:40PM +0100, Garth N. Wells wrote:
Anders Logg wrote:
On Wed, Jan 31, 2007 at 07:13:22PM +0100, Garth N. Wells wrote:
When running ffc under Cygwin, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/ffc", line 20, in ?
    from ffc.common.debug import *
  File "/usr/lib/python2.4/site-packages/ffc/__init__.py", line 2, in ?
    from ffc.compiler.compiler import *
  File "/usr/lib/python2.4/site-packages/ffc/compiler/compiler.py", line 37, in ?
    from ffc.format import ufcformat
  File "/usr/lib/python2.4/site-packages/ffc/format/ufcformat.py", line 14, in ?
    from ufc import *
ImportError: No module named ufc

I have installed ufc.
Do you get the same error if you just write a simple Python script
test.py containing only the line

from ufc import *

and then run it by python test.py?

The problem is that Cywgin does not have

   /usr/local/lib/python2.X/site-packages

in the path.

Is there a reason why ufc installs under /usr/local/lib/python2.x, while other FEniCS packages install under /usr/lib/python2.x?
I don't know, let's ask the other guys.

Can we change the default location for the installation of UFC to
/usr?

Garth, in the meantime, just change the variable PREFIX in the UFC
Makefile to /usr. The installation is just a single header file (and
some Python modules) so we have a very simple Makefile instead of a big
build system like scons, autotools etc.
In my opinion, default install prefix should _never_ be /usr unless the
native package system of your platform is used. Installing directly in /usr
tends to be messy. There is a reason for the PREFIX possibility, use it if
you deliberately want to mess thing up. /usr/local is the way to go.

Just my 2øre.

I agree. How about changing all project to install under /usr/local by default?

Garth

Sounds like a good idea, but I don't know how to do this. How does
distutils find where to install?


From http://docs.python.org/inst/standard-install.html

"Most Linux distributions include Python as a standard part of the system, so prefix and exec-prefix are usually both /usr on Linux. If you build Python yourself on Linux (or any Unix-like system), the default prefix and exec-prefix are /usr/local."

I'm going to change my mind and suggest that all FEniCS Python components install themselves wherever Python want to,

  python setup.py install

If we do something else, we run into the problem that packages are installed outside of the Python path which is a headache for users. UFC does

  python setup.py install --prefix=/usr/local

which is not necessarily in the Python path.

Garth


The manual (http://www.python.org/doc/2.4/inst/alt-install-windows.html)
only talks about how to choose /usr/local instead of /usr, not how to
specify this by default.

Ola?

/Anders
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev





References