Commit 60092578 authored by Julien Muchembled's avatar Julien Muchembled

cython_test: generate a cython_env.sh for development

parent f19b241c
...@@ -7,19 +7,10 @@ from time import gmtime, strftime, time ...@@ -7,19 +7,10 @@ from time import gmtime, strftime, time
from unittest import TextTestResult from unittest import TextTestResult
from erp5.util import taskdistribution, testsuite from erp5.util import taskdistribution, testsuite
{%- if prepend_path is defined %}
PATH = os.environ['PATH']
os.environ['PATH'] = {{ repr(prepend_path) }} + (PATH and os.pathsep + PATH)
{%- endif %}
os.environ['TEMP'] = {{ repr(tmpdir) }} os.environ['TEMP'] = {{ repr(tmpdir) }}
os.environ['PYTHON'] = sys.executable
os.environ['PYTHONPATH'] = os.pathsep.join( command = """. {{ cython_env_sh }}
sys.path[:-int(subprocess.check_output(( make all test
sys.executable, '-c', 'import sys;print(len(sys.path))')))])
command = """set -e {{ gettext_location }}/lib
make
LD_RUN_PATH=$1 LIBRARY_PATH=$1 make test
""" """
def parseTestStdOut(data): def parseTestStdOut(data):
......
...@@ -41,19 +41,14 @@ template = ...@@ -41,19 +41,14 @@ template =
key tmpdir directory:tmp key tmpdir directory:tmp
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key cython_repository cython-repository:location key cython_repository cython-repository:location
raw runTestSuite_py ${buildout:bin-directory}/${runTestSuite_py:interpreter} raw runTestSuite_py ${runTestSuite_py:bin-directory}/${runTestSuite_py:interpreter}
raw gettext_location ${gettext:location} raw cython_env_sh ${cython_env.sh:rendered}
{%- if 'part' in gcc %}
raw prepend_path {{ gcc.prefix }}/bin
{%- endif %}
[cython-repository] [cython-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = ${cython-repository:location} repository = ${cython-repository:location}
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
shared = true shared = true
context =
section gcc gcc
[cython-repository] [cython-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -64,16 +59,45 @@ sparse-checkout = /.gitignore ...@@ -64,16 +59,45 @@ sparse-checkout = /.gitignore
[runTestSuite.in] [runTestSuite.in]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_} url = ${:_profile_base_location_}/${:_buildout_section_name_}
md5sum = aea029e484875a1e6e69f9e2e1d9efdd md5sum = 02094e80cde9631081077fc96b401065
[runTestSuite_py] [runTestSuite_py]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = erp5.util
interpreter = ${:_buildout_section_name_}
[eggs]
recipe = zc.recipe.egg
eggs = eggs =
erp5.util
${numpy:egg} ${numpy:egg}
coverage coverage
pycodestyle pycodestyle
interpreter = ${:_buildout_section_name_}
[cython_env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template =
inline:{% set path, python = os.path.split(python) -%}
{% if 'part' in gcc -%}
{% set path = path + ':' + gcc.prefix + '/bin' -%}
{% endif -%}
export PATH={{ path }}:$PATH
export PYTHON={{ python }}
export PYTHONPATH={{ ':'.join(easy_install.working_set(eggs['eggs'].split(), [
eggs['develop-eggs-directory'],
eggs['eggs-directory'],
]).entries) }}$${PYTHONPATH:+:$PYTHONPATH}
# EmbedTest needs libintl.
export LD_RUN_PATH={{ gettext }}/lib$${LD_RUN_PATH:+:$LD_RUN_PATH}
export LIBRARY_PATH={{ gettext }}/lib$${LIBRARY_PATH:+:$LIBRARY_PATH}
{##}
context =
section eggs eggs
section gcc gcc
key gettext gettext:location
key python python:executable
import os os
import easy_install zc.buildout.easy_install
[versions] [versions]
slapos.recipe.template = 4.4 slapos.recipe.template = 4.4
......
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