Subject: [UFC-dev] Bug in setup.py

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Mon, 19 Mar 2007 20:00:05 +0100

setup.py installs in /usr instead of /usr/local, but ufc-1.pc still
refers to /usr/local.

This just cost me half an hour, looking in all other possible places first...
Time to go home!

martin

---

From: Anders Logg <[email-masked]>
Date: Tue, 20 Mar 2007 14:57:55 +0100

> This just cost me half an hour, looking in all other possible places first...

Looks like you have an old version of ufc-1.pc or an old version of
ufc.h in /usr/include.

The current setup.py installs ufc.h under /usr/local/include and
write /usr/local/include to ufc-1.pc (unless specified otherwise with
--prefix).

/Anders

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Tue, 20 Mar 2007 16:51:04 +0100

> Looks like you have an old version of ufc-1.pc or an old version of

Nope.

> write /usr/local/include to ufc-1.pc (unless specified otherwise with

Yes, but it installs the python parts to /usr/lib, not /usr/local/lib.
Since I already had ufc installed under /usr/local, this version was still used.
And since I saw that ufc.h under /usr/local was updated, I missed for a while
that the python parts went under /usr.

The default prefix of /usr/local hardcoded in the setup.py file isn't
applied to the python module.

martin

---

From: Anders Logg <[email-masked]>
Date: Tue, 20 Mar 2007 16:55:31 +0100

> Yes, but it installs the python parts to /usr/lib, not

True.

> applied to the python module.

The setup.py file lets python decide where to install the Python parts
of the code (and it chooses /usr) and then we need to decide where to
put the ufc.h file. We chose to put it under /usr/local.

The best thing would be if we could ask distutils where it intends to
install things and then put the ufc.h file in the same place. But this
is problematic, since distutils does not know this until after the
setup() call and we need to specify the prefix for the ufc.h file in
the call to setup()...

/Anders