[Pythonmac-SIG] Question about "setup.py build"
ronaldoussoren at mac.com
Thu Jan 25 09:19:01 CET 2007
On 24 Jan, 2007, at 23:26, Bob Ippolito wrote:
> On 1/24/07, Daniel Lord <daniellord at mac.com> wrote:
>> I admit to being a novice at this yet, but I couldn't find anything
>> relevant to this issue on-line:
>> I am trying to build a version of pysqlite that works with sqllite3 :
>> 1. Apple's installed version doesn't work with the latest so I
>> 2. sqllite3 won't build shared libs for universal binaries (typical
>> of a lot of linux/UNIX build since the developers never have that
>> problem except on OS X)
> Why would you want shared libs anyway? I'm pretty sure the Mac build
> script that comes with Python 2.5 (Mac/BuildScript/build-installer.py)
> will automatically download SQLite and compile it universally as a
> static lib. Take a look in there.
It does, the sqlite module in the binary distribution for python 2.5
links with our own copy of sqlite because the distribution also works
on 10.3 and Apple didn't ship sqlite with that release.
I'm also pretty sure that I didn't anything that would make it
impossible to build a univeral dynamic library, I use a static lib
because that's more convenient. The only reason to use a dylib when
building extensions is when you have multiple extensions that link to
the same library and share access (that's why the bundles ncurses in
py2.5 is a shared library).
>> 3. so I built Intel-only but....
>> 4. pysqlite keeps trying to build a universal build (CFLAGS="-O -g -
>> isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"; etc.
>> etc.) with "python setup.py build"
>> 5. But nowhere in the setup.py or setup.cfg is that set. I
>> explicitly unset CFLAGS and LDFLAGS to ensure it wasn't coming from
>> So where is it being set? By the Python build? Where? I jsut need a
>> little pointer or two and I'll do the rest. Thanks.
> The same place that everything else that distutils knows about is
> coming from, the Makefile in your Python library that was created when
> Python was built: lib/python2.4/config/Makefile
Barring bug adding '-arch', 'i386' to the compile and link flags for
an extension should do the right thing (that is, distutils will
recoginze these flags and remove the default -arch flags when the
user specified a specific architecture).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3562 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070125/2750d0ea/attachment-0001.bin
More information about the Pythonmac-SIG