|
From: <mi...@st...> - 2002-03-28 21:47:34
|
Hans Aschauer wrote: > On Wednesday, 27. March 2002 15:42, Michael Str=F6der wrote: > > Could someone please give me a hand with the distutil > stuff? It's far less struggle to add a module to a DistUtils package than you believe. Have a look at ext_modules and py_modules list in setup.py to ge= t the idea. I will happily extend setup.py. >>Make sure to place it in a different sub-module - at least the Python >>interface part for it. > > At the moment, I have no plans for an high-level python interface. Wha= t > I plan to do (and have paritally done) is a simple wrapper for the C > functions in ldap_schema (i.e. str2objectclass and friends). You can provide very primitive C wrapper functions in module _ldap and le= ave the Python parts up to me (applies to SASL and schema). I will start with= the SASL stuff this weekend and check in what I believe the Python parts should look like. > Is it ok to just plug these wrappers into function.c? Please go for a separate C source schema.c. The C code is already kludgy enough. Maybe take template.c as a start. > Probably it would be necessary to plug this into the > Lib/ldap/functions.py mechanism, right? I'd suggest to write a new Python wrapper class in a separate module ldap.schema (Lib/ldap/schema.py). The class methods could also contain so= me sanitizing (say Pythonizing ;-) which is more convenient to implement in Python itself. > I am not really sure if the > underlying C functions are thread safe... From my knowledge about OpenLDAP I'm almost sure they're not. That's wh= at the module-wide thread lock is for. Ciao, Michael. |