Opened 20 years ago
Last modified 19 years ago
#31 closed defect
Move util.py and its extension out from pyvolution to utilities/numerical_tools — at Version 4
Reported by: | ole | Owned by: | ole |
---|---|---|---|
Priority: | normal | Milestone: | AnuGA ready for release |
Component: | Compilation and installation | Version: | 1.0 |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
This relates to the issues raised in ticket:20 and changeset:1856 about c-extensions.
Background:
- util.py provides general functionality such as gradient computations
- util.py relies on its C-extension and the associated header file for speed
- However, other C extensions (such as shallow_water) relies directly on util_ext.h
We need an elegant solution that
- Avoids code duplication
- Allows common libraries to appear in directories separate from e.g. pyvolution
- Minimises any extra setup requirements
One idea would be to move the functionality from util and its extensions to utilities/numerical_tools
and then have shallow_water_ext.c do
#include <utilities/numerical_tools.h>
This could be accomplihed by adding the root dir (currently also in PYTHONPATH) to the -I option when compiling. If this could be done automatically, this solution will work nicely. However, it would be undesirable to introduce another environmant variable specifying the root dir for compilation purposes.
A clean solution is required.
Look at how is Numeric/arrayobject.h is found and mimic that!
Change History (4)
comment:1 Changed 20 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 20 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 20 years ago by
Status: | new → assigned |
---|
comment:4 Changed 20 years ago by
Description: | modified (diff) |
---|