Aloha
Using homebrew would save you some headaches, I usually do a
brew install python
giving you a clean base to work from, which is also properly installed.
After that fork the repos (brew is all git inside, see the instructions
on the main site) for a new tap 'stackless' and modify the ruby script
analogous to the attached rb file.
I didn't do any builds after the 2.7.3 version in my script, because I'm
currently mostly on pypy due to $$work, but still interested in bringing
this finally into homebrew proper, although the wanted to keep me in the
outer layers, not accepting 'yet another python'
Hope this helps, happy new year and good luck!
Werner
PS: Please keep XCode and its cmdline tools updated!
On 1/1/14 7:26 AM, Robert Babiak wrote:
Just wanted to say hi.
I am having problems compiling stackless on Mac OS 10.9 with the out of
the box GCC 4.2.
The reason i was trying to compile it is there is a big fix in Python
2.7.6 that fixes a crash with the interactive shell that was new for OS
10.9 that I was trying to get. I think this is the issue that was fixed
http://bugs.python.org/issue18458
The latest Stackless for mac that i could find that was prebuilt was
2.7.1 but windows appears to be on 2.7.5 :(
I configured it with
./configure --enable-framework --with-universal-archs=intel
--enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk
Let me know if there is anything more I can do to help, my programing
time is limited with classes starting again shortly, but I will do what
I can to help this awesome platform to progress.
Thanks - rob
Here are a few of the errors that I am seeing on a make:
In file included from
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:10:
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h:70:116:
error: expected
function body after function declarator
CFRange CFDataFind(CFDataRef theData, CFDataRef dataToFind, CFRange
searchRange, CFDataSearchFlags compareOptions)
AVAILABLE_MAC_OS_X_VERSION_1...
In file included from
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:13:
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h:83:106:
error: expected
function body after function declarator
CFStringRef
CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode(CFAllocatorRef
allocator, uint32_t lcid) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h:87:89:
error: expected
function body after function declarator
uint32_t CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier(CFStringRef
localeIdentifier) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h:100:90:
error: expected
function body after function declarator
CFLocaleLanguageDirection
CFLocaleGetLanguageCharacterDirection(CFStringRef isoLangCode)
AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h:103:85:
error: expected
function body after function declarator
CFLocaleLanguageDirection CFLocaleGetLanguageLineDirection(CFStringRef
isoLangCode) AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
--
Life: Bah, I will worry about it when it is over.
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless
require 'formula'
# Was a Framework build requested?
def build_framework?; ARGV.include? '--framework'; end
# Are we installed or installing as a Framework?
def as_framework?
(self.installed? and File.exists? prefix+"Frameworks/Python.framework") or build_framework?
end
class Distribute < Formula
url 'http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz'
md5 'ecd75ea629fee6d59d26f88c39b2d291'
end
class Pip < Formula
url 'http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz'
md5 '62a9f08dd5dc69d76734568a6c040508'
end
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Stackless < Formula
homepage 'http://www.stackless.com/'
url 'http://www.stackless.com/binaries/stackless-272-export.tar.bz2'
sha1 '7a6d8016dbcb55a5e19b87ff36fe12bdf6d021d2'
if Formula.factory('python').installed?
opoo "stackless python replaces the standard python install.
Your python binaries will be overwritten.
If this bothers you, you can restore python with `brew link python`."
end
depends_on 'pkg-config' => :build
depends_on 'readline' => :optional # Prefer over OS X's libedit
depends_on 'sqlite' => :optional # Prefer over OS X's older version
depends_on 'gdbm' => :optional
def options
[
["--framework", "Do a 'Framework' build instead of a UNIX-style build."],
["--universal", "Build for both 32 & 64 bit Intel."],
["--static", "Build static libraries."]
]
end
# Skip binaries so modules will load; skip lib because it is mostly Python files
skip_clean ['bin', 'lib']
def install
# Python requires -fwrapv for proper Decimal division with Clang. See:
# https://github.com/mxcl/homebrew/pull/10487
# http://stackoverflow.com/questions/7590137/dividing-decimals-yields-invalid-results-in-python-2-5-to-2-7
# https://trac.macports.org/changeset/87442
ENV.append_to_cflags "-fwrapv"
if build_framework? and ARGV.include? "--static"
onoe "Cannot specify both framework and static."
exit 99
end
args = ["--prefix=#{prefix}"]
if ARGV.build_universal?
args << "--enable-universalsdk=/" << "--with-universal-archs=intel"
end
if build_framework?
args << "--enable-framework=#{prefix}/Frameworks"
else
args << "--enable-shared" unless ARGV.include? '--static'
end
# allow sqlite3 module to load extensions
inreplace "setup.py",
'sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))', ''
system "./configure", *args
# HAVE_POLL is "broken" on OS X
# See: http://trac.macports.org/ticket/18376
inreplace 'pyconfig.h', /.*?(HAVE_POLL[_A-Z]*).*/, '#undef \1'
system "make"
ENV.j1 # Installs must be serialized
system "make install"
# Post-install, fix up the site-packages and install-scripts folders
# so that user-installed Python software survives minor updates, such
# as going from 2.7.0 to 2.7.1.
# Remove the site-packages that Python created in its Cellar.
site_packages.rmtree
# Create a site-packages in the prefix.
prefix_site_packages.mkpath
# Symlink the prefix site-packages into the cellar.
ln_s prefix_site_packages, site_packages
# This is a fix for better interoperability with pyqt. See:
# https://github.com/mxcl/homebrew/issues/6176
if not as_framework?
(bin+"pythonw").make_link bin+"python"
(bin+"pythonw2.7").make_link bin+"python2.7"
end
# Tell distutils-based installers where to put scripts
scripts_folder.mkpath
(effective_lib+"python2.7/distutils/distutils.cfg").write <<-EOF.undent
[install]
install-scripts=#{scripts_folder}
EOF
# Install distribute and pip
Distribute.new.brew { system "#{bin}/python", "setup.py", "install" }
Pip.new.brew { system "#{bin}/python", "setup.py", "install" }
end
def caveats
framework_caveats = <<-EOS.undent
Framework Python was installed to:
#{prefix}/Frameworks/Python.framework
You may want to symlink this Framework to a standard OS X location:
mkdir -p ~/Library/Frameworks/Python.framework/Versions
ln -s "#{prefix}/Frameworks/Python.framework/Versions/2.7" ~/Library/Frameworks/Python.framework/Versions/2.7
ln -s ~/Library/Frameworks/Python.framework/Versions/2.7 ~/Library/Frameworks/Python.framework/Versions/Current
ln -s ~/Library/Frameworks/Python.framework/Versions/2.7/Python ~/Library/Frameworks/Python.framework/Python
ln -s ~/Library/Frameworks/Python.framework/Versions/2.7/Resources ~/Library/Frameworks/Python.framework/Resources
EOS
general_caveats = <<-EOS.undent
A "distutils.cfg" has been written to:
#{effective_lib}/python2.7/distutils
specifing the install-scripts folder as:
#{scripts_folder}
If you install Python packages via "pip install x" or "python setup.py install"
(or the outdated easy_install), any provided scripts will go into the
install-scripts folder above, so you may want to add it to your PATH.
Distribute has been installed. To update distribute itself outside of Homebrew:
#{scripts_folder}/pip install --upgrade distribute
See: https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python
EOS
s = general_caveats
s += framework_caveats if as_framework?
return s
end
# lib folder,taking into account whether we are a Framework build or not
def effective_lib
# If we're installed or installing as a Framework, then use that location.
return prefix+"Frameworks/Python.framework/Versions/2.7/lib" if as_framework?
# Otherwise use just 'lib'
return lib
end
# include folder,taking into account whether we are a Framework build or not
def effective_include
# If we're installed or installing as a Framework, then use that location.
return prefix+"Frameworks/Python.framework/Versions/2.7/include" if as_framework?
# Otherwise use just 'include'
return include
end
# The Cellar location of site-packages
def site_packages
effective_lib+"python2.7/site-packages"
end
# The HOMEBREW_PREFIX location of site-packages
def prefix_site_packages
HOMEBREW_PREFIX+"lib/python2.7/site-packages"
end
# Where distribute will install executable scripts
def scripts_folder
HOMEBREW_PREFIX+"share/python"
end
def test
# See: https://github.com/mxcl/homebrew/pull/10487
`#{bin}/python -c 'from decimal import Decimal; print Decimal(4) / Decimal(2)'`.chomp == '2'
end
end
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless