Subject: Re: [UFC-dev] [FFC-dev] FFC + Cygwin

From: Anders Logg <[email-masked]>
Date: Wed, 31 Jan 2007 23:18:58 +0100

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.

/Anders

---

From: Åsmund Ødegård <[email-masked]>
Date: Thu, 1 Feb 2007 00:31:43 +0100

> 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.

-- 
[simula.research laboratory]
                 Åsmund Ødegård
                 IT-Manager
                 phone: 67828291 / 90069915
                 http://www.simula.no/
-- auto sig --
HEB 10:27  But a certain fearful looking for of judgment and fiery indignation,
 which shall devour the adversaries.

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 01 Feb 2007 10:59:05 +0100

> you deliberately want to mess thing up. /usr/local is the way to go.

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

Garth

---

From: Anders Logg <[email-masked]>
Date: Thu, 1 Feb 2007 14:09:31 +0100

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

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

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

---

From: Ola Skavhaug <[email-masked]>
Date: Thu, 1 Feb 2007 14:16:41 +0100

> distutils find where to install?

If I've got this right, distutls installs in the site-packages directory of
the python interpreter, if nothing else is requested. It would be possible to
alter the argument list to distutils to enforce a different behaviour, e.g. by
changing prefix. I'll have a look, but I've never installed Python on window$.
 
> _______________________________________________
> UFC-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufc-dev

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 01 Feb 2007 14:31:38 +0100

> 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

> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>