streamlined python recipes, dispensing the use of the localbin egg

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34171 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c22f00d3
import sys, os
def invokepython():
os.environ['PYTHONPATH'] = ':'.join(sys.path)
os.execl(sys.executable, *sys.argv)
from setuptools import setup, find_packages
name = "invokepython"
version = '0.1'
setup(
name = name,
version = version,
author = "Lukasz Nowak",
author_email = "luke@nexedi.com",
description = "ZC Buildout recipe to invoke full python interpreter",
license = "ZPL 2.1",
keywords = "python interpreter",
packages = find_packages(),
scripts = [name+".py",],
include_package_data = True,
classifiers=[
"License :: OSI Approved :: Zope Public License",
"Framework :: Buildout",
"Operating System :: POSIX :: Linux",
],
zip_safe=False,
entry_points = """
[console_scripts]
invokepython = invokepython:invokepython
""",
)
[buildout]
software_home = ${:directory}
extends =
../profiles/versions.cfg
../profiles/software-definition.cfg
......@@ -13,12 +15,13 @@ extends =
../software-profiles/ocropus.cfg
../software-profiles/oood.cfg
../software-profiles/openoffice-bin.cfg
../software-profiles/python-common.cfg
../software-profiles/python-2.4.cfg
../software-profiles/varnish.cfg
../software-profiles/zope-2.8.cfg
../profiles/common.cfg
python = software_definition
python = python2.4
versions = versions
parts =
......@@ -39,7 +42,6 @@ parts =
products-other
openoffice-bin
oood
pythonbin
[show-requirements]
recipe = plone.recipe.command
......@@ -49,4 +51,4 @@ command =
update-command = ${:command}
[software_definition]
software_home = ${buildout:directory}
software_home = ${buildout:software_home}
......@@ -9,7 +9,6 @@ mysql_software = ${:software_home}/parts/mysql-tritonn-5.0
oood_software = ${:software_home}/parts/oood
openoffice_software = ${:software_home}/parts/openoffice-bin
zope_software = ${:software_home}/parts/zope-2.8
executable = ${:software_home}/parts/python2.4/bin/python2.4
products-zope = ${:zope_software}/lib/python/Products
products-erp5 = ${:software_home}/parts/products-erp5
products-erp5-development = ${:software_home}/parts/products-erp5-development
......
......@@ -18,8 +18,8 @@ version-suffix-packages =
[itools]
# use a custom build for itools, to add lib64 to the include path
depends = ${python:location}
recipe = zc.recipe.egg:custom
python = python2.4
egg = itools
include-dirs = /usr/include/glib-2.0:/usr/lib/glib-2.0/include/:/usr/lib64/glib-2.0/include/
......@@ -78,6 +78,14 @@ eggs =
threadframe
timerserver
uuid
python = python2.4
dependent-scripts = true
interpreter = python${python2.4:version}
extra-paths =
${zope-2.8:location}/lib/python
scripts =
python=${:interpreter}
ipython=ipython${python2.4:version}
[requirements]
development =
......
[buildout]
# http://bluedynamics.com/articles/jens/build-python-in-buildout
# based on https://svn.plone.org/svn/collective/buildout/bda-naked-python/buildout2.4.cfg
develop += local-eggs/localbin
# extend your buildout with python-common.cfg before extending with this file
python_version = 2.4
parts =
python
pythonbin
python2.4
[python2.4-dbm-patch]
recipe = hexagonit.recipe.download
......@@ -14,47 +10,12 @@ url = http://bugs.gentoo.org/attachment.cgi?id=109117
download-only = true
filename = attachment.cgi
[python]
recipe = hexagonit.recipe.cmmi
[python2.4]
<= python-common
python_version_major = 2.4
python_version_minor = 6
python_version_full = ${buildout:python_version}.${:python_version_minor}
url =
http://python.org/ftp/python/${:python_version_full}/Python-${:python_version_full}.tgz
prefix = ${buildout:parts-directory}/python${buildout:python_version}
configure-options =
--enable-unicode=ucs4
--with-threads
--with-readline
--with-dbm
--with-zlib
--with-ssl
--with-bz2
patches = ${python2.4-dbm-patch:location}/${python2.4-dbm-patch:filename}
[pythonbin]
# XXX/Note: This is hackish way to have fully featured python interpreter
recipe = zc.recipe.egg:scripts
eggs = ${eggs:eggs}
invokepython
extra-paths =
${zope-2.8:location}/lib/python
dependent-scripts = true
scripts =
invokepython=python${buildout:python_version}
ipython=ipython${buildout:python_version}
[requirements]
binary =
g++
gcc
make
development =
/usr/include/bzlib.h
/usr/include/curses.h
/usr/include/gdbm.h
/usr/include/jpeglib.h
/usr/include/openssl/ssl.h
/usr/include/termcap.h
/usr/include/zlib.h
# this next setting should always match the name of this part
name = python2.4
# XXX maybe add the tarfile patch as well?
patches =
${python2.4-dbm-patch:location}/${python2.4-dbm-patch:filename}
[buildout]
# http://bluedynamics.com/articles/jens/build-python-in-buildout
extends = https://svn.plone.org/svn/collective/buildout/bda-naked-python/buildout2.6.cfg
python_version = 2.6
# extend your buildout with python-common.cfg before extending with this file
[pythonbin]
recipe = plone.recipe.command
command = ln -s ${python:executable} ${buildout:bin-directory}/python${buildout:python_version}
parts =
python2.6
[python2.6]
<= python-common
python_version_major = 2.6
python_version_minor = 5
# this next setting should always match the name of this part
name = python2.6
# part template for building python distributions
# http://bluedynamics.com/articles/jens/build-python-in-buildout
# based on https://svn.plone.org/svn/collective/buildout/bda-naked-python/buildout2.4.cfg
[python-common]
# override these three variables in parts that extend this one:
#python_version_major = 2.4
#python_version_minor = 6
#name = python2.4 # unfortunately there is no way to get the part name here
# This is actually the default setting for prefix, but we can't use it in
# other settings in this part if we don't set it explicitly here.
prefix = ${buildout:parts-directory}/${:name}
version = ${:python_version_major}
executable = ${:prefix}/bin/python${:version}
recipe = hexagonit.recipe.cmmi
python_version_full = ${:python_version_major}.${:python_version_minor}
url =
http://python.org/ftp/python/${:python_version_full}/Python-${:python_version_full}.tgz
configure-options =
--enable-unicode=ucs4
--with-threads
--with-readline
--with-dbm
--with-zlib
--with-ssl
--with-bz2
[requirements]
binary =
g++
gcc
make
development =
/usr/include/bzlib.h
/usr/include/curses.h
/usr/include/gdbm.h
/usr/include/jpeglib.h
/usr/include/openssl/ssl.h
/usr/include/termcap.h
/usr/include/zlib.h
[buildout]
software_home = ${:directory}
versions = versions
extends =
profiles/versions.cfg
profiles/software-definition.cfg
software-profiles/zope-2.8.cfg
software-profiles/python-common.cfg
software-profiles/python-2.4.cfg
software-profiles/python-2.6.cfg
software-profiles/mysql-tritonn-5.0.cfg
software-profiles/erp5.cfg
profiles/common.cfg
python = python2.4
parts = eggs
[software_definition]
software_home = ${buildout:software_home}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment