Python-libnjb on macosx

T

Timothy Grant

I was working on some things that use Glenn Strong's excellent libnjb
wrapper on my Linux box. I have since bought a PowerBook and have been
trying to get everything working correctly under OS/X.

This morning I got Python-libnjb to build without errors using the
following command:

ld -dynamic -dylib -L/sw/lib -L/sw/lib/python2.3/config njb_c_wrap.o
-o _njb_c.dylib -lpython2.3 -lnjb -lSystem -framework IOKit -ldylib1.o

However, when I try and import NJB.py I get the following:

(timothygrant@bastard%) pythonw NJB.py
Traceback (most recent call last):
File "NJB.py", line 2, in ?
import njb_c, sys, os, os.path, stat
File "/Users/timothygrant/src/Python-libnjb/njb_c.py", line 5, in ?
import _njb_c
ImportError: Inappropriate file type for dynamic loading

I'm guessing this means that while I got the library to build, I
didn't get it to build correctly. However, I'm enough of an OS/X
neophyte that I don't know which direction to turn.

Any suggestions?
 
R

Robert Kern

Timothy said:
I was working on some things that use Glenn Strong's excellent libnjb
wrapper on my Linux box. I have since bought a PowerBook and have been
trying to get everything working correctly under OS/X.

This morning I got Python-libnjb to build without errors using the
following command:

ld -dynamic -dylib -L/sw/lib -L/sw/lib/python2.3/config njb_c_wrap.o
-o _njb_c.dylib -lpython2.3 -lnjb -lSystem -framework IOKit -ldylib1.o

Try to write a distutils setup.py script. It should take care of the
correct linker arguments for you.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top