Subject: [UFL-dev] ufl-0.pc

From: "Johannes Ring" <[email-masked]>
Date: Mon, 6 Apr 2009 10:37:48 +0200 (CEST)

Hi,

Is there a reason for setup.py to generate and install the ufl-0.pc
pkg-config file? It only specifies -I<prefix>/include under Cflags but
nothing seems to be installed under <prefix>/include.

Johannes

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Mon, 6 Apr 2009 10:52:39 +0200

No reason, probably a remnant of the ufc setup.py.

Martin

On Mon, Apr 6, 2009 at 10:37 AM, Johannes Ring <[email-masked]> wrote:
> _______________________________________________
> UFL-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufl-dev
>

---

From: "Johannes Ring" <[email-masked]>
Date: Tue, 7 Apr 2009 14:48:05 +0200 (CEST)

OK. Here is a patch that cleans up setup.py if you would like.

Johannes

>> nothing seems to be installed under <prefix>/include.
# HG changeset patch
# User Johannes Ring <[email-masked]>
# Date 1239108257 -7200
# Node ID bcb15654701e13d3f993a2a0be238c1bbb758746
# Parent  26c85777f73b6aefbbfc941917afeee3d9bb1bae
Don't generate/install unused pkg-config file.

diff -r 26c85777f73b -r bcb15654701e setup.py
--- a/setup.py	Tue Apr 07 14:40:52 2009 +0200
+++ b/setup.py	Tue Apr 07 14:44:17 2009 +0200
@@ -9,26 +9,6 @@
 # Version number
 major = 0
 minor = 1
-
-# Set prefix
-try:
-    prefix = [item for item in sys.argv[1:] \
-              if "--prefix=" in item][0].split("=")[1]
-except:
-    try:
-        prefix = sys.argv[sys.argv.index('--prefix')+1]
-    except:
-        prefix = sys.prefix
-print "Installing UFL under %s..." % prefix
-
-# Generate pkgconfig file
-file = open("ufl-%d.pc" % major, "w")
-file.write("Name: UFL\n")
-file.write("Version: %d.%d\n" % (major, minor))
-file.write("Description: Unified Form Language\n")
-file.write("Cflags: -I%s\n" % repr(pjoin(prefix,"include"))[1:-1])
-# FIXME: better way for this? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-file.close()
 
 scripts = [pjoin("scripts", "ufl-analyse"),
            pjoin("scripts", "ufl-convert"),
@@ -55,6 +35,5 @@
       url = "http://www.fenics.org/ufl/",
       scripts = scripts,
       packages = ["ufl", "ufl.algorithms"],
-      package_dir = {"ufl": "ufl"},
-      data_files = [(pjoin("lib", "pkgconfig"), ["ufl-%d.pc" % major])])
+      package_dir = {"ufl": "ufl"})