|
From: <kin...@us...> - 2025-08-16 14:11:41
|
Revision: 7293
http://sourceforge.net/p/teem/code/7293
Author: kindlmann
Date: 2025-08-16 14:11:39 +0000 (Sat, 16 Aug 2025)
Log Message:
-----------
with the long overdue removal of the experimental-vs-not library distinction in building Teem, the machinery for describing the libraries to Python is simplified. Previous tweaks to these files left things broken while some other Teem source simplifications were pursued, but now all the Python/cffi code is working again
Modified Paths:
--------------
teem/trunk/python/cffi/build_teem.py
teem/trunk/python/cffi/exult.py
Modified: teem/trunk/python/cffi/build_teem.py
===================================================================
--- teem/trunk/python/cffi/build_teem.py 2025-08-16 14:06:45 UTC (rev 7292)
+++ teem/trunk/python/cffi/build_teem.py 2025-08-16 14:11:39 UTC (rev 7293)
@@ -353,8 +353,9 @@
ARGS = parse_args()
VERB = ARGS.v
if ARGS.gch:
- (_hdr_path, _, _have_libs) = exult.check_path_tinst(ARGS.install_path)
- cdef_write('./cdef', _hdr_path, _have_libs)
+ (_hdr_path, _) = exult.check_path_tinst(ARGS.install_path)
+ print(f'### {_hdr_path=}')
+ cdef_write('./cdef', _hdr_path, exult.tlib_all())
else:
ffi = exult.Tffi('../..', ARGS.install_path, 'teem', VERB)
if not ARGS.wrap:
Modified: teem/trunk/python/cffi/exult.py
===================================================================
--- teem/trunk/python/cffi/exult.py 2025-08-16 14:06:45 UTC (rev 7292)
+++ teem/trunk/python/cffi/exult.py 2025-08-16 14:11:39 UTC (rev 7293)
@@ -53,8 +53,8 @@
'nrrd': ['nrrdEnums.h', 'nrrdDefines.h'],
# ell: ellMacros.h does not add to ell API
}
-# as of Teem v2 the "experimental" notion is gone, which simplifies
-# how these dependencies are declared
+# as of Teem v2 the per-library "experimental" notion is gone, which simplifies
+# how the libraries and their dependencies are declared
_tldeps = {
'air': [], # (don't need airExistsConf.h)
'hest': ['air'],
@@ -166,8 +166,7 @@
def check_path_thdr(path_thdr: str):
"""
Main purpose is to do sanity check on Teem include path path_thdr and the header files
- found there. Having done that work, we can also return information learned along the way:
- we return the list of libraries for which the .h headers are present
+ found there.
"""
itpath = path_thdr + '/teem'
if not os.path.isdir(itpath):
@@ -180,7 +179,7 @@
f'Missing header(s) {" ".join(missing_hdrs)} in {itpath} '
'for one or more of the Teem libs'
)
- return all_hdrs
+ return
def check_path_tinst(path: str):
@@ -201,8 +200,8 @@
f'Need both {path_thdr} and {path_tlib} to be subdirs of teem install dir {path}'
)
check_path_tlib(path_tlib)
- have_libs = check_path_thdr(path_thdr)
- return (path_thdr, path_tlib, have_libs)
+ check_path_thdr(path_thdr)
+ return (path_thdr, path_tlib)
class CdefHdr:
@@ -405,7 +404,6 @@
(
self.path_thdr,
self.path_tlib,
- self.have_tlibs,
) = check_path_tinst(path_tinst)
self.path_tinst = path_tinst
# initialize other members; these will be updated if self.desc() is called to describe
@@ -426,10 +424,6 @@
self.name = 'teem'
self.top_tlib = 'meet'
else:
- if not top_tlib in self.have_tlibs:
- raise Exception(
- f'Requested top lib {top_tlib} not in this Teem build: {self.have_tlibs}'
- )
self.isteem = None
self.name = None
self.top_tlib = top_tlib
@@ -462,7 +456,7 @@
raise Exception('Can use .desc() only when making non-Teem module ')
if 'lliibb' == name:
raise Exception("Sorry, can't risk over-writing template wrapper lliibb.py")
- if 'teem' == name or name in self.have_tlibs:
+ if 'teem' == name or name in tlib_all():
raise Exception('Need non-Teem name for non-Teem library')
if name.startswith('_'):
raise Exception(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|