# -*- python -*-
# Python 3.2 installation file, KSL supercomputing team
from ksl.process.install.installer import *
from copy import copy
from string import Template

base = installer()
variants = []

base.name='python3'
base.version='3.2'
base.release='1'
base.license='BSD-like'
base.vendor='Python Software Foundation'
base.url='http://www.python.org/'
base.summary='python interpreter and core libraries' 
base.packager='aron'
base.source='Python-3.2.tar.gz'
base.category='tools'
base.description=\
"""Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java. Some of its key distinguishing features include:

* very clear, readable syntax
* strong introspection capabilities
* intuitive object orientation
* natural expression of procedural code
* full modularity, supporting hierarchical packages
* exception-based error handling
* very high level dynamic data types
* extensive standard libraries and third party modules for virtually every task
* extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for IronPython)
* embeddable within applications as a scripting interface
"""

base.paths    = ['./bin']
base.binaries = ['python3']
base.includes=['./include']
base.libdirs=['./lib']
base.libs=['libpython3.2']
base.compile_modules=['gnu','ppc64_target']
base.required_modules=['readline']
base.notes="""
"""

s1 = (templated_shell_command,
      Template('./configure --prefix=$target_dir --enable-shared --disable-ipv6 --without-threads --enable-unicode=ucs2 --enable-readline CPPFLAGS=$$KSL_READLINE_CFLAGS'))
a1 = (templated_shell_command,
      Template('./configure --prefix=$target_dir --enable-shared --disable-ipv6 --enable-unicode=ucs2 --enable-readline CPPFLAGS=$$KSL_READLINE_CFLAGS'))
s2 = make
s3 = make_install 

ppc64_install = (s1, s2, s3)

base.tag = ''

ppc64 = copy(base)
ppc64.build_host = 'ppc64'
ppc64.install_steps = ppc64_install
ppc64.target_arch = 'ppc64'
ppc64.mod_magic = 'prepend-path PYTHONPATH $::env(KSL_PYTHON3_DIR)/lib/python3.2'
variants.append(ppc64)


