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

From: "Johannes Ring" <[email-masked]>
Date: Tue, 8 Apr 2008 22:09:42 +0200 (CEST)

I think I found a bug in setup.py when installing UFC locally, e.g., like
this:

  python setup.py install --prefix=local

The problem is that the header file ufc.h is placed under
local/local/include/ and the pkgconfig file ufc-1.pc is placed under
local/local/lib/pkgconfig/ .

A patch that fixes the problem is attached.

Johannes

diff -r d055843c80a6 setup.py
--- a/setup.py	Mon Feb 18 11:26:46 2008 +0100
+++ b/setup.py	Tue Apr 08 22:05:35 2008 +0200
@@ -29,5 +29,5 @@ setup(name = "UFC",
       url = "http://www.fenics.org/ufc/",
       packages = ["ufc"],
       package_dir = {"ufc": "src/utils/python/ufc/"},
-      data_files = [("%s/include" % prefix, ["src/ufc/ufc.h"]),
-                    ("%s/lib/pkgconfig" % prefix, ["ufc-%d.pc" % major])])
+      data_files = [("include", ["src/ufc/ufc.h"]),
+                    ("lib/pkgconfig", ["ufc-%d.pc" % major])])