Re: [cx-oracle-users] libclntsh.so and setup.py
Brought to you by:
atuining
From: Lassi T. <la...@ce...> - 2012-02-09 18:33:11
|
Hi, > The standard linux/macosx way to look for libraries is to search the LD_LIBRARY_PATH, that is what cx_Oracle should use! We build py2-cx-oracle RPMs using setup.cfg, with the following sort of thing. This is a bit of a short-hand skeleton which our RPM builder expands to the real spec file, but the following should be the relevant bits. $ORACLE_ROOT is where we put our instant client, the headers are under 'include' and libraries under 'lib'. At the build time, $PATH, $LD_LIBRARY_PATH etc have been set so they include instant client directories (and python, and all other externals we use). %i is where we install into. I'm actually pretty happy cx-oracle does *not* go poking around the system trying to find things, but instead lets us specify where to find things. It's a bonus if it fails hard if things aren't where we think they should be, so the configuration is guaranteed to be consistent. %prep %setup -n cx_Oracle-5.1 %patch -p1 cat >> setup.cfg <<- EOF [build_ext] include_dirs = $ORACLE_ROOT/include library_dirs = $ORACLE_ROOT/lib EOF %build python setup.py build %install python setup.py install --prefix=%i Regards, Lassi |