Commit f37bbfd3 authored by Łukasz Nowak's avatar Łukasz Nowak

- generate script, which is invoking full, original python interpreter

Previously there was a try to use zc.recipe.egg directly, by using interpreter
parameter. But such interpreter is not able to accept -V option, so it is
required to invoke python by executing existing one.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32966 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f52b10b
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]
# 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/invokepython
python_version = 2.4
parts =
python
......@@ -31,12 +33,13 @@ configure-options =
patches = ${python2.4-dbm-patch:location}/${python2.4-dbm-patch:filename}
[pythonbin]
recipe = zc.recipe.egg
# XXX/Note: This is hackish way to have fully featured python interpreter
recipe = zc.recipe.egg:scripts
eggs = ${eggs:eggs}
interpreter = python${buildout:python_version}
invokepython
dependent-scripts = true
scripts =
python=${:interpreter}
invokepython=python${buildout:python_version}
ipython=ipython${buildout:python_version}
[requirements]
......
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