Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'url:pypi': 0.03; 'third- party': 0.04; 'base.': 0.05; '(b)': 0.07; 'binary': 0.07; 'compiler': 0.07; 'deployed': 0.07; 'environments': 0.07; 'linux,': 0.07; 'paths': 0.07; 'fink': 0.09; 'setup.py': 0.09; 'skip:/ 10': 0.09; 'suggestions.': 0.09; 'windows,': 0.09; 'python': 0.11; 'windows': 0.15; '"python': 0.16; '16:00': 0.16; ':-).': 0.16; 'gnu/linux.': 0.16; 'install".': 0.16; 'installer,': 0.16; 'macosx': 0.16; 'mean,': 0.16; 'setuptools': 0.16; 'specifying': 0.16; 'subject:failed': 0.16; 'variations': 0.16; 'subject:python': 0.16; 'url:)': 0.16; 'wrote:': 0.18; '(not': 0.18; 'wed,': 0.18; 'trying': 0.19; 'deployment': 0.19; 'first.': 0.19; 'packages.': 0.19; 'projects,': 0.19; 'seems': 0.21; '>>>': 0.22; 'admin': 0.22; 'to:name:python-list@python.org': 0.22; 'install': 0.23; 'installation': 0.23; '(a)': 0.24; 'subject: .': 0.24; 'earlier': 0.24; 'paul': 0.24; 'versions': 0.24; 'sort': 0.25; "i've": 0.25; 'possibly': 0.26; 'least': 0.26; 'supported': 0.26; 'header:In-Reply-To:1': 0.27; 'fixed': 0.29; 'locations': 0.30; 'newer': 0.30; "i'm": 0.30; 'included': 0.31; 'that.': 0.31; 'too.': 0.31; 'usually': 0.31; '13,': 0.31; 'default,': 0.31; 'gcc': 0.31; 'releases,': 0.31; "they'll": 0.31; 'yourself.': 0.31; 'python.org': 0.32; 'option': 0.32; 'run': 0.32; 'another': 0.32; 'linux': 0.33; 'url:python': 0.33; 'guess': 0.33; 'trouble': 0.34; 'core': 0.34; 'could': 0.34; 'but': 0.35; 'add': 0.35; 'building': 0.35; 'there': 0.35; 'format.': 0.36; 'installing': 0.36; 'doing': 0.36; 'next': 0.36; 'charset:us-ascii': 0.36; 'possible': 0.36; 'url:org': 0.36; 'should': 0.36; 'effort': 0.37; 'virtual': 0.37; 'being': 0.38; 'manager': 0.38; 'apple': 0.38; 'e.g.': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'recent': 0.39; 'ability': 0.39; 'does': 0.39; 'itself': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'users': 0.40; 'how': 0.40; 'easy': 0.60; 'commands': 0.60; 'most': 0.60; 'managers': 0.61; 'new': 0.61; 'range': 0.61; 'simple': 0.61; 'header:Message-Id:1': 0.63; 'kind': 0.63; 'stand': 0.64; 'provide': 0.64; 'more': 0.64; 'different': 0.65; 'chance': 0.65; 'situation': 0.65; 'smith': 0.68; 'default': 0.69; 'obvious': 0.74; 'received:204': 0.75; 'lack': 0.78; '*really*': 0.84; '2.7.': 0.84; '3.4': 0.84; 'actually,': 0.84; 'hand.': 0.84; 'installer': 0.84; 'received:204.14': 0.84; 'resistance': 0.84; 'scratch,': 0.84; 'ships': 0.84; 'wars': 0.84; 'wheel': 0.84; '2013,': 0.91; 'careful': 0.91; 'discovering': 0.91; 'releases.': 0.91; 'task,': 0.91; 'thing,': 0.91; 'url:latest': 0.91; 'endorsed': 0.93 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: python 2.7.x on MacOSX: failed dlopen() on .so's From: Ned Deily In-Reply-To: <1384392275.2758.153.camel@homebase> Date: Wed, 13 Nov 2013 23:06:45 -0800 Content-Transfer-Encoding: quoted-printable References: <1384370183.3496.472.camel@pdsdesk> <1384383583.3496.505.camel@pdsdesk> <1384392275.2758.153.camel@homebase> To: "python-list@python.org" X-Mailer: Apple Mail (2.1510) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 94 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384412810 news.xs4all.nl 15979 [2001:888:2000:d::a6]:45100 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59414 On Nov 13, 2013, at 17:24 , Paul Smith wrote: > On Wed, 2013-11-13 at 16:00 -0800, Ned Deily wrote: >>> The reason I've set PYTHONHOME is ultimately I need this = installation to >>> be relocatable. It's going to be shared across lots of different >>> systems and they'll have the ability to copy it wherever they want. >>=20 >> That could be problematic. You need to be *really* careful about how >> you do that. You stand a chance with a non-shared installation. >=20 > You mean, --disable-shared? That's what I want, ultimately, but I was > going to start with the default configuration first. --disable-shared is the default, the same as not specifying = --enable-shared. > I'm discovering that this is tricky. I don't want to bring OS wars = into > it, but this kind of thing is so simple and just works on GNU/Linux. = I > guess I've been spoiled :-). Well, if you are building from scratch, you would likely run into some = of the same issues on Linux systems, too. There are many variations in = configurations that are mutually incompatible. If you mean "due to the = lack of a system package manager" like yum or apt-get, there are various = third-party package managers for OS X: MacPorts, homebrew, and fink = being the most well-known. They all provide Pythons and many = third-party Python packages. > I'm somewhat dreading my next effort after MacOS: the same thing, on > Windows :-/. >=20 > And another task, which seems like it will be fun: building GDB on > MacOSX with Python support enabled... Keep in mind that on newer OS X releases, Apple no longer ships gcc or = gdb. The standard compiler is clang and it has its own debuggers. >> For the python.org OS X binary installers, we go to a fair amount of >> trouble to build Pythons that will work across a range of OS X >> releases. You might want to consider using one of them as a base. >> It's usually a lot less work than trying to make it work yourself. >=20 > Hm, that's an idea. I don't HAVE to build Python myself, actually, I > just need (a) it to be relocatable, and (b) to add these extra modules > to it so I can use it across systems without installing them > individually by hand. I'm not sure I know what you mean by "relocatable". Like the = third-party package manager solutions, the python.org installers place = the Pythons they install in fixed locations (under /Library/Frameworks = with links from /usr/local/bin) but one that does not conflict with any = system files, including the Apple-supplied system Pythons. I don't know exactly what you are trying to do but a couple of = suggestions. A number of widely-used Python projects, like Numpy, = provide their own OS X installer package (.mpkg or .pkg) that installs = into the site-packages directory of the python.org Python 2.7. That's = the sort of traditional way of doing it. A more recent development is deploying Python packages (not Python = itself) using the "wheel" format. = (http://wheel.readthedocs.org/en/latest/). The wheel is a = cross-platform format and replaces earlier binary distribution formats = like eggs. It is supported by recent versions of pip = (https://pypi.python.org/pypi/pip), which itself replaces earlier = installer commands like easy-install or using "python setup.py install". = Using pip and wheels have been endorsed by the Python core development = team as the new one obvious way for distributions (PEP 453). pip will = be automatically included with Python 3.4 but it is very easy to install = and use with current Pythons (3.3.x and 2.7.x). You should be able to = use pip and wheels, possibly platform-specific wheels, for deploying to = all of your platforms: Linux, OS X, and Windows. For OS X and Windows, = the deployment would be very similar: install Python from a python.org = installer, install pip (and its current setuptools dependency), install = additional wheels. On the various Linux systems, some of those steps = could be replaced by using the system-supplied packages. Also, if it is = not desired or possible to install everything into a shared location on = the deployed systems, e.g. there are multiple users or the user does not = have admin privileges, you could either use the pip --user option or use = virtual environments (virtualenv) in which to install wheels. That may not help in your situation but those are the paths of least = resistance these days. -- Ned Deily nad@acm.org -- []