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


Groups > comp.lang.python > #97809

OS X Python: can I explicitly set MACOSX_DEPLOYMENT_TARGET for extensions?

Path csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'think,': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:set': 0.09; 'python': 0.10; 'extensions': 0.13; 'explicitly': 0.15; 'subject: \n ': 0.15; 'compilers': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'deployment': 0.18; 'variable': 0.18; 'versions': 0.20; 'seems': 0.23; 'tried': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'distribute': 0.27; 'skip:m 30': 0.27; '(e.g.,': 0.27; 'environment': 0.29; 'work.': 0.30; '(i.e.,': 0.30; 'fixed': 0.31; 'older': 0.32; 'that,': 0.34; 'python.org': 0.35; 'installing': 0.35; 'newer': 0.35; 'there': 0.36; 'framework': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'setting': 0.37; 'received:org': 0.37; 'means': 0.39; 'does': 0.39; 'build': 0.40; 'to:addr:python.org': 0.40; 'some': 0.40; 'default': 0.61; 'more': 0.63; 'past,': 0.66; 'searches.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Andrew Jaffe <a.h.jaffe@gmail.com>
Subject OS X Python: can I explicitly set MACOSX_DEPLOYMENT_TARGET for extensions?
Date Mon, 19 Oct 2015 12:20:45 +0100
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host cpc37-slam6-2-0-cust33.2-4.cable.virginm.net
X-Mozilla-News-Host news://news.gmane.com:119
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.31.1445253666.878.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1445253666 news.xs4all.nl 23790 [2001:888:2000:d::a6]:50089
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:97809

Show key headers only | View raw


I use the python.org framework build of Python under recent versions of 
OS X (i.e., 10.11 El Capitan). I need to build some extensions that rely 
on recent versions of compilers (e.g., C++-11 features). However the 
python.org python is built to work on older systems as well, for 
backward compatibility.

Hence, it has the environment variable MACOSX_DEPLOYMENT_TARGET=10.6. 
This means that extensions are built by default with a toolchain that, I 
think, mimics gcc-4.2, in particular in terms of what stdlib it searches.

In the past, I have fixed this by installing more recent compilers with 
homebrew and explicitly setting CC, CXX, etc before installation.

However, I have tried just setting MACOSX_DEPLOYMENT_TARGET=10.11, and 
that seems to work. Is this safe? Are there any downsides? (I don't need 
to distribute these builds, just use them locally?)

Conversely, are there any upsides? Does a newer deployment target allow 
more recent compilers and/or higher optimizations?

-Andrew

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

OS X Python: can I explicitly set MACOSX_DEPLOYMENT_TARGET for extensions? Andrew Jaffe <a.h.jaffe@gmail.com> - 2015-10-19 12:20 +0100

csiph-web