Subject: [Fenics-ufc] Install path

From: "Garth N. Wells" <[email-masked]>
Date: Wed, 18 Aug 2010 18:19:02 +0100

I just noticed that UFC installs '_ufc.so' and 'ufc.py' into

    site-packages

rather than

    site-packages/ufc

Is this intended?

Garth

---

From: Johan Hake <[email-masked]>
Date: Wed, 18 Aug 2010 10:32:23 -0700

> I just noticed that UFC installs '_ufc.so' and 'ufc.py' into

As ufc just comes as one python module I think this is ok. 

We could put ufc.py in 

  site-packages/ufc

and just add a __init__.py

that just contained:

  from ufc import *

Not sure what we gain on this. 

Johan

> Garth
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~fenics-ufc
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~fenics-ufc
> More help   : https://help.launchpad.net/ListHelp

---

From: Anders Logg <[email-masked]>
Date: Wed, 18 Aug 2010 19:51:19 +0200

> Not sure what we gain on this.

I think that would look better. At least that's what I'm more used to.

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 19 Aug 2010 17:07:07 +0100

> I think that would look better. At least that's what I'm more used to.

I've changed the new CMake script to install into 

    ${PYTHON_MODULE_PATH}/ufc

Garth

---

From: Johan Hake <[email-masked]>
Date: Thu, 19 Aug 2010 09:13:49 -0700

>     ${PYTHON_MODULE_PATH}/ufc

I assume we need to add an __init__.py file to that directory too. Otherwise 
the installation wont work. 

I can add this if you do not mind?

Johan

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 19 Aug 2010 17:18:02 +0100

> I can add this if you do not mind?

Go ahead.

Garth

---

From: Johan Hake <[email-masked]>
Date: Thu, 19 Aug 2010 09:37:44 -0700

On Thursday August 19 2010 09:18:02 Garth N. Wells wrote:
> > I assume we need to add an __init__.py file to that directory too.
> > Otherwise the installation wont work.
> > 

Done! Nice to be able to help with tiny things regarding the port to cmake :)

Johan

---

From: Johan Hake <[email-masked]>
Date: Thu, 19 Aug 2010 09:43:34 -0700

> Done! Nice to be able to help with tiny things regarding the port to cmake

Turned out I did not have write acces. I thought this was fixed some time ago?

Patch attached

Johan

> > > > Garth
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [email-masked]
# target_branch: bzr+ssh://bazaar.launchpad.net/~ufc-core/ufc/main/
# testament_sha1: f94d3e4ebc9c7f82d5addb2ac60f9a3448a2af50
# timestamp: 2010-08-19 09:42:46 -0700
# base_revision_id: [email-masked]
# 
# Begin patch
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2010-08-19 08:44:25 +0000
+++ CMakeLists.txt	2010-08-19 16:34:48 +0000
@@ -125,7 +125,9 @@
     )
 
   # Install _ufc.so and ufc.py
-  install(FILES ${SWIG_MODULE_LOCATION} ${CMAKE_CURRENT_BINARY_DIR}/ufc.py
+  install(FILES 
+    ${SWIG_MODULE_LOCATION} ${CMAKE_CURRENT_BINARY_DIR}/ufc.py 
+    src/ufc/__init__.py
     DESTINATION ${UFC_INSTALL_PYTHON_MODULE_DIR}/ufc
     COMPONENT Development
     )

=== added file 'src/ufc/__init__.py'
--- src/ufc/__init__.py	1970-01-01 00:00:00 +0000
+++ src/ufc/__init__.py	2010-08-19 16:34:48 +0000
@@ -0,0 +1,8 @@
+__author__ = "Johan Hake ([email-masked])"
+__copyright__ = "Copyright (C) 2010 Johan Hake"
+__date__ = "2010-08-19 -- 2010-08-19"
+__license__  = "Released to the public domain"
+
+# Import Python versions of the abstract classes in the UFC interface
+from ufc import (form, finite_element, dof_map, cell_integral,
+                 exterior_facet_integral, interior_facet_integral)

# Begin bundle

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 19 Aug 2010 17:47:30 +0100

On Thu, 2010-08-19 at 09:43 -0700, Johan Hake wrote:
> Turned out I did not have write acces. 

You do now. Go ahead and push.

Garth

> I thought this was fixed some time ago?
> 
> Patch attached
> 
> Johan
> 
> > Johan
> > 
> > > Garth
> > > 
> > > > Johan
> > > > 
> > > > > Garth
> > > > > 
> > > > > > --
> > > > > > Anders

---

From: Johan Hake <[email-masked]>
Date: Thu, 19 Aug 2010 09:50:55 -0700

On Thursday August 19 2010 09:47:30 Garth N. Wells wrote:
> > > Done! Nice to be able to help with tiny things regarding the port to
> > > cmake
> > > 
> > > :)
> > 

Alright!

Johan