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


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

Python3 on MacOsX Lion?

Started byK Richard Pixley <rich@noir.com>
First post2012-01-02 11:32 -0800
Last post2012-01-04 00:37 +0100
Articles 8 — 5 participants

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


Contents

  Python3 on MacOsX Lion? K Richard Pixley <rich@noir.com> - 2012-01-02 11:32 -0800
    Re: Python3 on MacOsX Lion? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-01-02 16:03 -0500
      Re: Python3 on MacOsX Lion? K Richard Pixley <rich@noir.com> - 2012-01-02 13:23 -0800
        Re: Python3 on MacOsX Lion? Tamer Higazi <th982a@googlemail.com> - 2012-01-03 00:03 +0100
        Re: Python3 on MacOsX Lion? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-01-02 21:23 -0500
        Re: Python3 on MacOsX Lion? Ned Deily <nad@acm.org> - 2012-01-02 21:43 -0800
    Re: Python3 on MacOsX Lion? Ned Deily <nad@acm.org> - 2012-01-02 21:21 -0800
    Re: Python3 on MacOsX Lion? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2012-01-04 00:37 +0100

#18343 — Python3 on MacOsX Lion?

FromK Richard Pixley <rich@noir.com>
Date2012-01-02 11:32 -0800
SubjectPython3 on MacOsX Lion?
Message-ID<eDnMq.3172$Ik5.2555@newsfe03.iad>
Where would I look to find the current expected status of python3 on 
MacOsX Lion?

The distributed binaries aren't capable of allowing extensions that use gcc.

I can build the source naked, but then it lacks some libraries, notably, 
readline.

Attempting to build the full Mac packages fails, even with the few tiny 
patches I used for 2.7.2.

Is anyone working on this?  Are there pre-release patches available?

Should I be asking elsewhere?

--rich

[toc] | [next] | [standalone]


#18349

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2012-01-02 16:03 -0500
Message-ID<mailman.4319.1325538227.27778.python-list@python.org>
In reply to#18343
On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley <rich@noir.com> wrote:
> Where would I look to find the current expected status of python3 on MacOsX
> Lion?
>
> The distributed binaries aren't capable of allowing extensions that use gcc.
>
> I can build the source naked, but then it lacks some libraries, notably,
> readline.
>
> Attempting to build the full Mac packages fails, even with the few tiny
> patches I used for 2.7.2.
>
> Is anyone working on this?  Are there pre-release patches available?
>
> Should I be asking elsewhere?
>
> --rich
> --

Have you tried building through Macports?

[toc] | [prev] | [next] | [standalone]


#18350

FromK Richard Pixley <rich@noir.com>
Date2012-01-02 13:23 -0800
Message-ID<WepMq.67154$U16.54498@newsfe15.iad>
In reply to#18349
On 1/2/12 13:03 , Benjamin Kaplan wrote:
> On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley<rich@noir.com>  wrote:
>> Where would I look to find the current expected status of python3 on MacOsX
>> Lion?
>>
>> The distributed binaries aren't capable of allowing extensions that use gcc.
>>
>> I can build the source naked, but then it lacks some libraries, notably,
>> readline.
>>
>> Attempting to build the full Mac packages fails, even with the few tiny
>> patches I used for 2.7.2.
>>
>> Is anyone working on this?  Are there pre-release patches available?
>>
>> Should I be asking elsewhere?
>>
>> --rich
>> --
>
> Have you tried building through Macports?

No, I haven't.  Macports scares me.  When I tried them, or fink, in the 
past, they rapidly polluted my boot disk and I didn't have any way to 
unpollute it other than reloading from scratch.

In freebsd, netbsd, or any of the linux distributions, I can trivially 
create a virtual machine in about 20 minutes, screw with it as I like, 
and toss it in seconds.  In modern linux, I can create a root file 
system with btrfs, snapshot, chroot to the snapshot and munge away. 
When I'm done, I can just toss the snapshot.  (Can do snapshots in 
vmware too).

If I screw up my boot drive in MacOsX, I'm in for hours of recovery time 
reloading from Time Machine.  While that's a lot better than it used to 
be now that Time Machine is available, (reloading can now be done 
largely unattended), it's not a price I'm willing to pay in order to 
attempt to use Macports.

--rich

[toc] | [prev] | [next] | [standalone]


#18354

FromTamer Higazi <th982a@googlemail.com>
Date2012-01-03 00:03 +0100
Message-ID<mailman.4322.1325545390.27778.python-list@python.org>
In reply to#18350
Hi Rich!
Why don't you ask the maintainer who built the macport?!
Why don't you try to to figure out with "WHAT" kind of tools they have 
built the mac port and "WHERE" to get them either. And ask him also how 
to set the flags to build the 64bit edition.

Then you don't have to be afraid of any prebuild mac port editions. This 
is how I would do it.

Tamer


Am 02.01.2012 22:23, schrieb K Richard Pixley:
> On 1/2/12 13:03 , Benjamin Kaplan wrote:
>> On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley<rich@noir.com>  wrote:
>>> Where would I look to find the current expected status of python3 on 
>>> MacOsX
>>> Lion?
>>>
>>> The distributed binaries aren't capable of allowing extensions that 
>>> use gcc.
>>>
>>> I can build the source naked, but then it lacks some libraries, 
>>> notably,
>>> readline.
>>>
>>> Attempting to build the full Mac packages fails, even with the few tiny
>>> patches I used for 2.7.2.
>>>
>>> Is anyone working on this?  Are there pre-release patches available?
>>>
>>> Should I be asking elsewhere?
>>>
>>> --rich
>>> -- 
>>
>> Have you tried building through Macports?
>
> No, I haven't.  Macports scares me.  When I tried them, or fink, in 
> the past, they rapidly polluted my boot disk and I didn't have any way 
> to unpollute it other than reloading from scratch.
>
> In freebsd, netbsd, or any of the linux distributions, I can trivially 
> create a virtual machine in about 20 minutes, screw with it as I like, 
> and toss it in seconds.  In modern linux, I can create a root file 
> system with btrfs, snapshot, chroot to the snapshot and munge away. 
> When I'm done, I can just toss the snapshot.  (Can do snapshots in 
> vmware too).
>
> If I screw up my boot drive in MacOsX, I'm in for hours of recovery 
> time reloading from Time Machine.  While that's a lot better than it 
> used to be now that Time Machine is available, (reloading can now be 
> done largely unattended), it's not a price I'm willing to pay in order 
> to attempt to use Macports.
>
> --rich

[toc] | [prev] | [next] | [standalone]


#18364

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2012-01-02 21:23 -0500
Message-ID<mailman.4328.1325557391.27778.python-list@python.org>
In reply to#18350
On Mon, Jan 2, 2012 at 6:03 PM, Tamer Higazi <th982a@googlemail.com> wrote:
> Hi Rich!
> Why don't you ask the maintainer who built the macport?!
> Why don't you try to to figure out with "WHAT" kind of tools they have built
> the mac port and "WHERE" to get them either. And ask him also how to set the
> flags to build the 64bit edition.
>
> Then you don't have to be afraid of any prebuild mac port editions. This is
> how I would do it.
>
> Tamer
>

That's not quite how Macports works. Macports is a package manager.
Each package has a port file with (among other things)
1) A location to download the source tarball
2) A list of patches to apply
3) A list of dependencies
4) Sets of config arguments and build scripts for different variants

Richard, if something goes wrong with Macports, nuking /opt/local does
a pretty good job of cleaning it up. And even if you don't want to use
Macports, you can still grab their patches. They're all here:
http://trac.macports.org/browser/trunk/dports/lang/python32. You can
dig through the portfile to see what patches and config flags they're
using to build it.
>
> Am 02.01.2012 22:23, schrieb K Richard Pixley:
>>
>> On 1/2/12 13:03 , Benjamin Kaplan wrote:
>>>
>>> On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley<rich@noir.com>  wrote:
>>>>
>>>> Where would I look to find the current expected status of python3 on
>>>> MacOsX
>>>> Lion?
>>>>
>>>> The distributed binaries aren't capable of allowing extensions that use
>>>> gcc.
>>>>
>>>> I can build the source naked, but then it lacks some libraries, notably,
>>>> readline.
>>>>
>>>> Attempting to build the full Mac packages fails, even with the few tiny
>>>> patches I used for 2.7.2.
>>>>
>>>> Is anyone working on this?  Are there pre-release patches available?
>>>>
>>>> Should I be asking elsewhere?
>>>>
>>>> --rich
>>>> --
>>>
>>>
>>> Have you tried building through Macports?
>>
>>
>> No, I haven't.  Macports scares me.  When I tried them, or fink, in the
>> past, they rapidly polluted my boot disk and I didn't have any way to
>> unpollute it other than reloading from scratch.
>>
>> In freebsd, netbsd, or any of the linux distributions, I can trivially
>> create a virtual machine in about 20 minutes, screw with it as I like, and
>> toss it in seconds.  In modern linux, I can create a root file system with
>> btrfs, snapshot, chroot to the snapshot and munge away. When I'm done, I can
>> just toss the snapshot.  (Can do snapshots in vmware too).
>>
>> If I screw up my boot drive in MacOsX, I'm in for hours of recovery time
>> reloading from Time Machine.  While that's a lot better than it used to be
>> now that Time Machine is available, (reloading can now be done largely
>> unattended), it's not a price I'm willing to pay in order to attempt to use
>> Macports.
>>
>> --rich
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#18375

FromNed Deily <nad@acm.org>
Date2012-01-02 21:43 -0800
Message-ID<mailman.4332.1325569400.27778.python-list@python.org>
In reply to#18350
In article <WepMq.67154$U16.54498@newsfe15.iad>,
 K Richard Pixley <rich@noir.com> wrote:
> On 1/2/12 13:03 , Benjamin Kaplan wrote:
[...]
> > Have you tried building through Macports?
> No, I haven't.  Macports scares me.  When I tried them, or fink, in the 
> past, they rapidly polluted my boot disk and I didn't have any way to 
> unpollute it other than reloading from scratch.
> 
> In freebsd, netbsd, or any of the linux distributions, I can trivially 
> create a virtual machine in about 20 minutes, screw with it as I like, 
> and toss it in seconds.  In modern linux, I can create a root file 
> system with btrfs, snapshot, chroot to the snapshot and munge away. 
> When I'm done, I can just toss the snapshot.  (Can do snapshots in 
> vmware too).
> 
> If I screw up my boot drive in MacOsX, I'm in for hours of recovery time 
> reloading from Time Machine.  While that's a lot better than it used to 
> be now that Time Machine is available, (reloading can now be done 
> largely unattended), it's not a price I'm willing to pay in order to 
> attempt to use Macports.

Whether you use a third-party package manager like MacPorts or Fink is a 
personal decision, of course, and there pros or cons for using either.  
But both MacPorts and Fink are specifically designed *not* to pollute 
your existing system.  They both go to great lengths to install 
everything under their own unique directory subtrees, by default, 
/opt/local for MacPorts and /sw for Fink.  I don't have much recent 
experience with Fink but I do with MacPorts.  Other than a very few and 
documented exceptions, *everything* that MacPorts installs is under that 
/opt/local prefix and there are no conflicts with any Apple-installed 
files so it is really quite trivial to install and remove without fear 
of corrupting your base system.  The whole process is documented here:

http://guide.macports.org/chunked/installing.macports.uninstalling.html

-- 
 Ned Deily,
 nad@acm.org

[toc] | [prev] | [next] | [standalone]


#18371

FromNed Deily <nad@acm.org>
Date2012-01-02 21:21 -0800
Message-ID<mailman.4330.1325568108.27778.python-list@python.org>
In reply to#18343
In article <eDnMq.3172$Ik5.2555@newsfe03.iad>,
 K Richard Pixley <rich@noir.com> wrote:
> Where would I look to find the current expected status of python3 on 
> MacOsX Lion?
> 
> The distributed binaries aren't capable of allowing extensions that use gcc.
> 
> I can build the source naked, but then it lacks some libraries, notably, 
> readline.
> 
> Attempting to build the full Mac packages fails, even with the few tiny 
> patches I used for 2.7.2.
> 
> Is anyone working on this?  Are there pre-release patches available?

The short answer is: yes, it is being worked on but it has been taking 
longer than it should.

The 64-bit/32-bit installers from python.org for Python 2.7.x and Python 
3.2.x have been being built on 10.6 with gcc-4.2.  OSX 10.7 (Lion) was 
initially released with Xcode 4.1 which still included a version of 
gcc-4.2 similar to what has been available all along in 10.6 (Snow 
Leopard).  However, more recently, Apple has released Xcode 4.2 which 
finally removed gcc-4.2 and now only includes updated versions of 
llvm-gcc-4.2 (gcc front-end with an llvm code generator backend) and 
clang (clang front-end with an llvm backend).  Apple has made it clear 
that they want developers and other users to move eventually to clang 
and that llvm-gcc is an interim step towards the migration to clang. 
While there are other reasons for that move (like the change in gcc 
licensing), I believe Apple believes that clang will provide an 
all-around better build experience (better code, better checking, better 
diagnostics, more flexibility).  But, as with any major change to a 
build compiler and environment, lots of nitty and often knotty problems 
are to be expected.  (For an idea of the breadth of them, peruse the 
MacPorts project mailing lists for all the issues they've been 
discovering in the many open source packages they support since they've 
moved to using clang by default.)  Python is no exception.   There are 
already a couple of fixes that have been applied for upcoming Python 
releases to deal with either llvm-gcc or clang issues.

To further complicate things, prior to the release of Lion, Apple made a 
preliminary version of Xcode 4 available for Snow Leopard through the 
Mac App Store but appears to have removed it for new purchases after 
Lion was released although it seems that previous purchasers and paying 
members of the Mac Developer program can get updates for it.  So, now 
some 10.6 users also no longer have gcc-4.2, although they do have the 
supported option of reverting to the most recent Xcode 3 release for 
10.6 which is free and still available through the Apple Developer 
Connection website.

The PSF (via python.org) also supplies 32-bit-only installer variants 
for OS X 10.3+ which were great for building applications to run on 
multiple versions of OS X.  But since Xcode 4 doesn't ship the necessary 
SDK (10.4u) and gcc-4.0, that installer version is also problematic on 
10.7.  We need to be careful in developing any fixes that we don't 
inadvertently break anything for older OS X releases like 10.5.  So, 
it's all a bit of mess at the moment with *a lot* of variables.

I had hoped to complete a comprehensive set of tests of the most 
important combinations of build environments with the three current 
active branches of python development (2.7.x, 3.2.x, and the future 3.3) 
for 10.7, 10.6, as well as baselines on 10.5 and 10.4 several weeks ago 
but, unfortunately, other events intervened.  Such is the downside of 
all-volunteer projects.  But I will be working on completing this over 
the next couple of weeks and, after review by the other core developers, 
will summarize the known issues and suggested fixes on the python.org 
website (with pointers posted here).  I expect that we will then need to 
push maintenance releases of 2.7.x and 3.2.x.  In the meantime, the 
safest approach is to continue to build on OS X 10.6 with Xcode 3 
installed.

-- 
 Ned Deily,
 nad@acm.org

[toc] | [prev] | [next] | [standalone]


#18468

FromIrmen de Jong <irmen.NOSPAM@xs4all.nl>
Date2012-01-04 00:37 +0100
Message-ID<4f039123$0$6861$e4fe514c@news2.news.xs4all.nl>
In reply to#18343
On 2-1-2012 20:32, K Richard Pixley wrote:
> Where would I look to find the current expected status of python3 on MacOsX Lion?
> 
> The distributed binaries aren't capable of allowing extensions that use gcc.
> 
> I can build the source naked, but then it lacks some libraries, notably, readline.
> 
> Attempting to build the full Mac packages fails, even with the few tiny patches I used
> for 2.7.2.
> 
> Is anyone working on this?  Are there pre-release patches available?
> 
> Should I be asking elsewhere?
> 
> --rich


I suggest installing it via Homebrew. Install homebrew first if you haven't already,
http://mxcl.github.com/homebrew/

Then,

$ brew install python3
 ....wait a bit...
$ python3
 ...profit!


(It's probably wise to brew install gdbm, readline, and sqlite first. These will then be
used by the python brew installations. If you don't, they might be unavailable or be the
older system-provided versions)

Regards
Irmen

[toc] | [prev] | [standalone]


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


csiph-web