Python3 on MacOsX Lion?

  • Thread starter K Richard Pixley
  • Start date
K

K Richard Pixley

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
 
B

Benjamin Kaplan

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?
 
K

K Richard Pixley

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
 
T

Tamer Higazi

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:
 
B

Benjamin Kaplan

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.
 
N

Ned Deily

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.
 
N

Ned Deily

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
 
I

Irmen de Jong

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top