Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80108 > unrolled thread

Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

Started byNed Deily <nad@acm.org>
First post2014-11-01 15:25 -0700
Last post2014-11-01 15:25 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py? Ned Deily <nad@acm.org> - 2014-11-01 15:25 -0700

#80108 — Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py?

FromNed Deily <nad@acm.org>
Date2014-11-01 15:25 -0700
SubjectRe: Build Question: How to Add -Wl, --option Before Objects In Setup.py?
Message-ID<mailman.15400.1414880724.18130.python-list@python.org>
In article 
<CAHu5Praf_9rkGYw5yzP4Tqs3DZsx0qM70esUNukNoDCqzTmj2g@mail.gmail.com>,
 Cyd Haselton <chaselton@gmail.com> wrote:
> On Sat, Nov 1, 2014 at 1:47 PM, Cyd Haselton <chaselton@gmail.com> wrote:
[...]
> > Sure enough, nm -D libm.so shows that sincos is NOT available in that
> > library on my Android device. Now to figure out what to do about it.
[...]
> UPDATE:  After doing a bit of research it looks like it would be
> easier to build Python without sincos...is that possible?
> If not, I'll need to figure out how to get bionic libm sources with a
> proper Makefile (instead of Android's build system)

While sin() and/or cos() are primarily used in the expected places in 
the Python standard library (like the math module), sin() is also used 
in the implementation of type "complex" objects, code that is part of 
the core interpreter.  I see that there is an old, undocumented, and 
unsupported macro to disable building of complex number support.  But 
more hacking is needed to even get a somewhat working build with it 
these days and then, without complex support, many tests in the standard 
library fail and what you end up isn't really Python.  So, I think 
rather than hacking up Python, you should try to fix the broken 
platform.  There seem to be a number of project that claim to support 
Python on Android.  Perhaps they could be of help.

FWIW, the macro is "WITHOUT_COMPLEX":

./configure [...] CPPFLAGS='-DWITHOUT_COMPLEX'

and Lib/optparse.py would need to be patched to comment out its use of 
"complex".

Again, good luck!

-- 
 Ned Deily,
 nad@acm.org

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web